Synology DSM 5.1-5021Released & Apps Updated

Synology has updated DSM 5.1 and several of their packages.

Synology has updated DiskStation Manager 5.1 to version 5.1-5021. The update includes (from the Synology DSM release notes):

Version:5.1-5021     
What’s New

This update includes all bug fixes as well as security fixes in the previously released critical updates since DSM 5.1-5004.
Fixed Issues

  • Enhanced data security by disabling “Mount automatically on start-up” after restoring an encrypted shared folder.
  • Fixed a vulnerability that allows senders to access unintended destinations during a backup job.
  • Enhanced stability on Amazon S3 on large file backup.
  • Upgraded OpenVPN to 2.3.6 to address a security vulnerability.
  • Fixed a vulnerability that allows local users to initiate a denial of service by queuing the maximum number of file descriptors (CVE-2014-7824).
  • Upgraded PHP to 5.5.19 to address multiple vulnerabilities (CVE-2014-3669, CVE-2014-3670, CVE-2014-3668, and CVE-2014-3710).
  • Improved DTV dongle compatibility.
  • Improved file-copying stability on DS2015xs.
  • Fixed an issue where DS213+ and DS413 could power up unexpectedly when backup tasks are scheduled.
  • Minor bug fixes.

Synology has also updated many of their packages (a.k.a. applications) with minor enhancements and bug fixes. Of the packages I use, the following have been updated:

  • Audio Station
  • Cloud Station
  • Cloud Sync
  • Download Station
  • Note Station
  • Video Station

All the changes are minor, the only one I personally noticed is that Note Station now sorts the Notebooks in the sidebar list which makes them easier to find.

I updated both my Synology DS415+ and Synology DS212+ without having a problem.

 

Synology DS212+ Rebuild

The system drive of my Synology NAS ran out of space. I resolved the immediate problems but there was still damage done. I decided the quickest solution was a complete system rebuild.

Synology feature image tile - blackI recently ran out of system drive disk space on my Synology 212+ NAS. While I was able to free up the space and resolve the immediate problems I was still having less critical problems. Photos were no longer being indexed and thumbnails weren’t being created. In addition, the system monitor application and widget weren’t reporting any usage information. There may have been other issues but I stopped looking once I decided that a rebuild was the fastest way to recovery. I already had good and verified backups. Since the NAS was accessible again I was able to verify configuration settings to make sure I had the latest information.

Attempts to fix the problem while trying to preserve the data and not do a full firmware wipe and re-install all failed to resolve the problem. Most of the rebuild was easy enough, simple file copies from my backups, but there were some issues worth mentioning.

Configuration Backup

In addition to the file backups I also backup the Synology configuration once a week but I did it again just to make sure I have the latest configuration.

This is done through the Control Panel as show in the following screenshots. The results is a single file with a .dss extension.

Synology DSM 5 Control Panel
Select “Updates and Restore” from the Synology Control Panel
Synology Configuration Backup
Select the “Configuration Backup” tab then click the “Backup Configuration” button
Confirm the backup
Confirm the backup by clicking “Yes”

Reset Procedure

The reset procedure worked as described, with one change. In step 6 I had to do the reboot manually, otherwise the NAS was in “Migratable” mode and not install mode.

DSM 5 Synology Assistant
Migratable – not what I want – it didn’t fix my problems.
DSM 5 Synology Assistant
Not Installed – what I want

The reset procedure is:

  1. Have the Synology system in the ready state.
  2. Look at the back of the Synology System, find a small reset hole near the USB ports.
  3. Using a paper clip, gently depress and hold down the recessed button for about four seconds.
  4. The system will beep once.
  5. After hearing the system beep once, release the button and press it again for another four seconds.
  6. The system will beep three times and execute a reboot. This is where I had to manually reboot.
  7. After rebooting, launch the Synology Assistant and install the firmware.
  8. Restore the configuration file.

The configuration file restore is done through the same screens as the configuration backup except the “Restore Configuration” button is selected.

Share Creation & Package Installs

I had to recreate my shares. While the user IDs were restored with the configuration I did have to set the share permissions and any disk quotas.

Packages also had to be re-installed and any configuration manually entered. Any package which requires an index needs to rebuild that index. For me this was Audio Station, Video Station and Photo Station. Photo Station was a hassle and gets a section dedicated to it down below.

Photo Station Re-Install

Photo Station was the biggest hassle among all of this. This was mainly due to the DSM 5 Photo Station Uploader. I has actually just used the DSM 4 Photo Uploader to move the Photos to my DSM 212J and it wasn’t bad. But I upgraded to the DSM 5 uploader to be on the latest version, which in theory is always best.

The DSM 5 uploader definitely uploaded the photos faster than the DSM 4 uploader, but it missed many of the thumbnails so the Synology NAS started to do its own, much slower, thumbnail creation.

The Photo Uploader does the thumbnail creation on the computer (which in my case is a Mac Mini). I could see multiple convert processes running during the upload and my Mac wasn’t otherwise busy. I had to group the uploads in relatively small batches. Because of my directory structure this was at most 2,000 files per upload. I definitely had problems anytime I tried to upload more than 4,000 files. It’s like something started to break around 2,000 files and it came completely off the rails after about 3,000.

But even this wasn’t perfect. There were several times I went in and deleted directory trees where the upload failed to upload thumbnails. The re-upload then worked OK. But this was tedious and in the end out of about 40,000 uploaded files Synology told me it had about 8,000 files to index. This took a few days.

The uploader is capable of running multiple upload windows on the desktop . This made things worse when I tested it so only doing one upload process at a time is recommended based on my experience.

If the NAS is busy, say with an unrelated file copy, the photo upload will also miss more thumbnails than it uploads. I quickly learned not to even try uploading the photos until the rest of my files were restored.

While not a bug, one thing to keep in mind is the way that Photo Uploader handles the “skip files that have been uploaded” option. In my testing it seems the uploader only looks at the file name and not any other attributes. For example, I put all my original photos in specific directory tree (albums). I have other albums (directories) with “best of”, edited photos or by a topic for viewing. The same name is frequently used across all albums even if there is some minor editing. With this option selected only the first file encountered gets uploaded and the rest are skipped. The file names are remembered from session to session.

Using the photo uploader as part of the reset process does work, it’s just very time consuming. I’ll be testing the built in application backup to see if it works any faster.

Wrapping Up

The good news is I was able to completely restore my Synology NAS from my standard backups without any lost data. Under lessons learned I need to look for a better way to restore the Photo Station files. I like Photo Station and expect the number of photos it manages to grow. Hopefully the application backup will work faster.

Looping Synology NAS Logon

My Synology DS 212+ acted like it was possessed by a demon. I eventually traced the problem and resolved it.

Synology feature image tile - blackMy Synology DS212+ NAS went wonky today. Wonky seems like an appropriate technical term. It had stopped indexing some photos I uploaded so I took the usual troubleshooting step and rebooted. Then things went down hill from there.

After the reboot, and logging on with the admin ID, I would keep getting the initial Welcome Wizard although it wouldn’t let me actually do anything and run through the wizard. Despite this, I could access the file shares.

Screenshot showing welcome wizard

After the usual browser troubleshooting steps I hadn’t made any progress. I found that I could access the server from my iPhone if I used DSM Mobile. But as soon as I would try the full DSM I’d get the wizard.

DSM Mobile gave me enough access so that I could give my regular ID system administrator privileges. Once I did that I could logon to the full website with my regular ID but with greater access to check things out. That’s when I noticed that the DSM Upgrade gave me a out of disk message. A full system volume sure would explain a lot although there’s not much I could do from the GUI.

Screenshot showing out of disk message

First I enabled SSH:

Screenshooting showing SSH setting

Then I used terminal to SSH into the Synology NAS as root. The root password is the same password given to the Admin ID.

>ssh root@192.168.1.100    (IP address of Synology NAS)

One connected I ran the following commands:

 >mkdir /tmp/work/  
 >mount /dev/md0 /tmp/work/  
 >cd /tmp/work/  

Then I worked my way down to find out which directory is using too much and then the large files:

>du -hs *

This will list all the directories and their sizes. I change into the largest directory (mine was nearly 2GB and was var). I switched into the directory and executed ds -hs * again. Eventually I found I had two 800+ MB files in /var/log/httpd. Both were archived logs so I deleted them as follows:
>rm sys-cgi_log.1
>rm sys-cgi_log.1.xz

I still had a much smaller sys-cgi_log file so it seemed safe to delete those two.

I rebooted after deleting the files.

I still had to run through the welcome wizard when I logged on with admin. I simply picked the option to “skip” any configuration and was brought to the DSM desktop. My user specific desktop settings were gone but all files and services are there.

The monitoring app and widget can’t connect to the service so won’t run. This is a minor annoyance. A search of the forums shows a re-install as a solution. If this is the only problem I have, I’ll wait to see if the next patch fixes the problem.

What caused the log to grow so large still needs some research. But for now I’ll monitor their size.

Synology NAS: UPS Sharing

AFter gathering cobwebs all year there’s finally signs of life. Between losing a UPS and wanting to rearrange my electronics I needed to get creative with power protection. The built in Synology network ups service was perfect for my needs.

I recently found myself down one UPS and needing to re-arrange my computer/NAS setup. Based on where I wanted to put my Windows Home Server and two Synology NAS’s I only had the convenience of two nearby outlets. For a third UPS I’d need some long cables which isn’t the best idea. A little digging and I found I could have one NAS tell the other when power went out and trigger a shutdown if it stayed down. It was surprisingly easy and didn’t require any network capable UPS.

Here’s what I have:

  • Synology 1511+ with one expansion bay running DSM 4.2 and with a static IP address
  • Synology 212+ NAS running DSM 4.2 and with a static IP address
  • CyberPower 1500 AVR with a USB cable for NAS to UPS communication and enough battery backup power outlets for both NAS’s and the ethernet switch they share.
  • The ethernet switch is located in the same place as the Synology boxes.

Setting It Up

  1. Hook up one NAS to the UPS normally. I picked the Synology 1511+ for this. Hook the communication cable to the UPS.
  2. Enable the UPS in Control Panel -> Hardware  then the UPS tab. Check Enable UPS Support then pick the shutdown delay you want. I prefer short  waits, just make sure the UPS will have enough juice for both NAS’s. Do NOT check “Shutdown UPS when system enters safe mode” unless you are absolutely sure your other NAS will be shut down before this NAS enters safe mode. I do not use this setting.
    Screenshot showing UPS settingsYou may want to save this and verify the UPS is working. But I’ll move on.
  3. Check “Enable network UPS server”
    Screenshot showing network UPS setting
  4. Click the permitted disk stations button and enter the IP address of the other NAS(es) that will share the UPS. It is strongly recommended that all these NAS’s have their power plugged into this same UPS and that they all use the same ethernet switch (or hub) and that it also be plugged into this UPS.
    Screenshot showing all network settings
  5. Click OK to save everything and move on to the remote UPS. In my case a Synology 212+.
  6. Make sure that the NAS is does not have a data cable connected to a UPS. Go to Control Panel -> Hardware and the UPS tab.
  7. Check enable UPS support.
    Select “Synology UPS Server” as the type
    Enter the IP address of the NAS UPS server (the one we set up above).
    Select the amount of time to wait before entering safe node.
    Screenshot showing remote UPS settingsClick OK to save everything.

As previously mentioned both NAS’s and the ethernet switch they share should be plugged into the same UPS. If the network connection goes down the remote UPS will not get the power loss notifications if the switch doesn’t have power.

This blog has been gathering cobwebs all year. It nice to get back into writing. Hope this was helpful.

Field Notes: Synology Photo Station 5

I’ve been using Synology’s Photo Station application for awhile. I’ve compiled some notes based on my experience.

Image of Synolog DeskStation 212jI’ve been playing around with Synology Photo Station and wanted to document some notes from my experience. These notes are from a DS212+ running the DSM 4.1 beta. Currently I’m using DSM 4.1-2567 and Photo Station 5.2-2284 although most of this also applies to DSM 4. The main difference is that performance seems to improve with each release.

Uploading Files

There’s a lot of complaints about the thumbnail generation process bringing the Synology NAS to its knees. Performance has improved, but the initial upload could be problematic if there’s a lot of images (or videos). My files were almost all photos, just a handful of small videos.

  • Uploading a large number of photos should be done using the Synology Assistant software from a computer. I ran it from my Windows PC but there are Mac and Linux versions too.
  • Copying a large number of files (20K+) directly to the photo share did not work well. Photo Station was unusable for a couple of days (at which point I gave up). The NAS itself was slower but still usable. In earlier versions the NAS itself was sometimes unusable during this process.
  • Uploading a large number of photos (20K+) through the Synology Assistant also had problems. Photo Station was slow for a couple of days (at which point I gave up waiting) and would sometimes report errors (such as when deleting a photo). In some cases Photo Station seemed to “lose” files. The album was created but no thumbnails were created and Photo Station reported the directory as empty. The primary process running at this time was Postgres which is used as the backend database to store information. Postgres would use any CPU cycles it could get. It would relinquish the CPU to other processes so the NAS itself performed well, but that CPU stayed pegged at 100% and Photo Station was slow, sometime painfully slow.

I took the following approach to the initial upload and things were smooth.

  • I deleted all the tags from the photo files. It’s possible that the Postgres processing was trying to process these tags (there were about 9,000 unique tags, For the most part I wanted to redo the tags so I deleted most of them before uploading.
  • I uploaded in smaller batches, still using Synology Assistant. I use a folder structure for my photos so just uploaded the individual directory trees in an order that made sense, This was about 2,000 photos at a time, although one upload was a little over 4,000.
  • During the upload the CPU usage stayed under 100% for the most part and things settled down shortly after the upload finished. Postgres processing was minimal which makes me think the tag removal had something to do with it. I did save a copy of the tagged photos and may do some comparisons if I get a chance.
  • Even during the upload the NAS itself performed fine. Photo Station itself was a little slow but usable without any of the timeouts that were common before.