Integrating Synology DS with FreeIPA

I recently decided to replace my outdated Synology DS 1010+ NAS (in service 24×7 for over 8 years without major issues) with a new DS 1618+ NAS. Of course the new NAS is a lot faster, has an additional drive bay but to me most important was to replace the hardware and benefit from the newer version of DSM (Synology’s NAS software platform). However, this post is not about my new NAS (there are sufficient other sites describing / testing / comparing these devices).

Of course, now that I am integrating everything with FreeIPA (replacing my MacOS OpenDirectory setup) I also needed the Synology NAS to be fully integrated with FreeIPA. Jack Henschel’s excellent post that gave me some clue’s but wasn’t quite clear in how things worked and what was really needed. The article itself was clear in the steps to take but not everything worked for me immediately so I had to find out why and how to fix that and document that in this post.

Continue reading “Integrating Synology DS with FreeIPA”

Restoring Synology NAS Crashplan existing configuration

In addition to yesterday’s post about running Crashplan on a Synology Disk Station,I thought it was worth mentioning that the key advantage of using PC Load Letter‘s packages is that they nowadays also fully support Crashplan’s auto update feature. So once installed, there is no need to update the package anymore, Crashplan will update itself to the latest version automatically.

Unfortunately this is not visible in Synology’s Package Centre, which hapily shows an updated version of Crashplan is available whenever an updated package is available. Since it is always a good idea to have the latest package installes as it may resolve other issues (i.e. one day autoupdate support started to work now it also it seems to preserve its configuration upon reinstall), it is still a good idea to upgrade every now and then.

One of the key drawbacks of upgrading in the past was that de configuration was lost and the new installation would even become a fresh computer instead of retaining the existing configuration. I had to deal with this several times in the past, normally ending up copying back a backup of the config file manually through an SSH CLI. This did not really work like I wanted as it is manual wotk and felt like a hack, which made me look for the right way to do this. After some searching I found an article on the Crashplan support pages on reconnecting an Existing Backup, which desribes how the GUID of a Crashplan installation (the unique ID that identifies the Crashplan network) can be changes to that of the previous installation so that identity and configuration settings of the previous installation are restored. fo this semi-manual approach. To lookup the GUID of the installation to be restored, one can lookup the GUID from your Crashplan account’s computer overview and selecting the name of the computer, which will also display the GIUD. Follow the instructions to reconnect an Existing Backup.

Recently Crashplan as automated the semi-manual process for Adopting Another Computer  so that the semi-manual process is no longer needed. As described in the Crashplan support page, there is now an option available to adopt another computer after re-installation of the Crashplan client (which is exactly what will happen in case a new version of PC Load Letter‘s package is installed). With this option, restoring all settings has become very easy and since all files are still there, and since all files are still there (no need to restore any files) it only requires a check with the remote systems to ensure everything have already been backed up.
 

Synology DSM 4.0 is out

Today Synology has released version 4.0 of DSM, their (Linux-based) OS for their NASes. As it had some features I wanted to explore (especially VLAN’s, the Antivirus package and "Cloud Station"), I decided to upgrade right away.

Unfortunately the upgrade didn’t work through the built-in update function. I went to the Synology website and tried to download it manually. This failed from the European server, which I suspect would be the reason the built-in update function also didn’t work. I guess there were either problems or all too many European customers tried to upgrade tonight. A manual download from the US server and upload through the web interface worked though and the upgrade process itself went fine.

When I logged in after the upgrade I noticed the revamped GUI that was already announced. So far it seems that Sonylogy as trying to create a more clear distinction between core functionality and packages, which in my opinion a good thing as it means unused packages (like the mail server) can be uninstaled. After the upgrade my Synology DS-1010+ was very busy re-indexing media files and "converting" my photo’s. I wonder what that is for, suspect it is for their photo album and hope it won’t touch my original photo’s.

After the upgrade my Synology DS-1010+ was showing up as a windows machine again in my Mac’s Finder. Fortunately my quick hack still worked, so that was resolved quickly. While working on the command line, I noticed some things changed, notably the ipkg software in /opt was no longer in $PATH, something I need to look into later. Apart from this the upgrade does not seem to have negative side effects.

Finally Synology has added VLAN support, unfortunately not in a very usefull way. It is now possible to specify on which VLAN an interface is so that the packets are tagged correctly. However, it is not possible to create virtual interfaces to have a single interface on more than one VLAN, which kind of means that you cannot do anything more than before (I could setup the VLAN in the switch to achieve the same). Technically everything is possible with VLAN’s now though as under the hood it’s all Linux and using the standard VLAN modules, but it will require a bit of hacking to get it working as desired.

When I wanted to look at the AntiVirus and Cloud station, it turned out that these required me to install a package. That was fine, but it didn’t work (network errors), again too many users or network problems at Synology’s web servers? When I tried a little later it worked though and the AntiVirus package installed without problems, but after that it again told me about network connection problems. I will have a look at the Cloud Station later I guess). The AntiVirus looks like a very neat solution for me having a Linux box scan my NAS over the network on a weekly basis. One can schedule different jobs to scan all or some folders at specific moments. I guess this means the NAS does not support on-access scanning, but that’s something I can live with. It is unclear however how often and when (and from where) the virus definitions are updated, but it looks (based on the messages on the screen and in the logs) that is refreshes this before each scan.

All in all a successful upgrade and definitely promising new features I need to look into further.

Changing the Synology icons for Mac OS X Finder

I have been the happy owner of a Synology DS-1010+ NAS for some time now. The NAS works without problems since I got it and although it took a short while, it fully supports Mac OS X Lion after the last upgrade to DSM 3.2.

One of the things that had annoyed me for some time though, was that on the Mac Finder, the Synology NAS is shown as if it was a Windows host, both for the AFP shares as well as its TimeMachine function. Functionally nothing wrong, but not as I wanted. Since I had been playing with AFP and Avahi on Linux and set this up correctly in the past based on this blog post of Simon Wheatley,I decided to check whether I could achieve the same on my NAS.

Screenshot of Mac Finder after the patchAfter a bit of debugging I found out that the Synology NAS (DSM 3.2) was also using avahi, but that its configuration files were re-generated every time the avahi service was restarted based on the configuration of the NAS. To show the right icons in the finder meant 2 simple changes to the file /usr/syno/etc/rc.d/S99avahi.sh, which changes how the Synology NAS to what is depicted to the right

In the function AddTimeMachine(), one has to add the following just before the </service-group> tag:

  <service>
    <type>_device-info._tcp</type>
    <port>0</port>
    <txt-record>model=TimeCapsule</txt-record>   
  </service>

and in the function AddAFP(), the following must be added just before the </service-group> tag:

  <service>
    <type>_device-info._tcp</type>
    <port>0</port>
    <txt-record>model=Xserve</txt-record>   
  </service>

Next, the avahi service must be restarted/reloaded with the following command:

/usr/syno/etc/rc.d/S99avahi.sh reload

and after logging in again on you Mac the Finder will start showing the right icons (apparently this information is cached).

The resulting S99avahi.sh file for DSM3.2 that can be used as a drop-in replacement is attached to this post.