Fix Synology DS412+ DSM 5.2 file system

I have been using a Synology DS412+ (with DSM 5.2) for almost 1 years now and I am happy with it.

The other day, I forgot to switch on my Prolink IPS1000 UPS and electricity went out. Electricity on, I switched on my UPS and my DS came up okay, I can browse the files and DS was checking parity integrity. Electricity went out again and I afraid checking would take long and UPS couldn’t hold enough, so I shut down.

When electricity was on again and my DS was up, I found out the following problem.

  1. Disk management showed error “Connection failed. Please check your network settings.”
  2. Disk management was not showing anything but blank area.
  3. Info Center showed incorrect capacity and usage was over 100%.
  4. I can browse but DS warned me of not enough storage on widget.
  5. CPU usage was 99% on widget.

DSM Info center storage error
DSM storage manager error
DSM widget errors

After googling I narrowed it down to file system problem and the following posts to my rescue.

  1. Synology Nas: Run Fsck To Check and Repair a Linux File System (2012) – this post is complicated by installing third party package
  2. How to give your disks and files a health check and repair basic faults (2013) – this post instruction on stopping services do not work for 5.2
  3. Filesystem check with DSM5 (2015) – has a lot of helpful commands especially from this post and this reply

However, they are for DSM 4/5 and I couldn’t found 5.2 specific instruction. However the following step by step worked for my case.

  1. enable SSH through GUI
  2. configure DSM not to beep on volume degrade or crash though GUI
  3. connect to DS using root account
  4. dismount volume
  5. activate volume
  6. check file system
  7. repair file system

It took about 30 minutes to check in read-only mode and another 30-minutes to repair file system of (4.9 TB storage space, 78% usage)

Enable SSH through GUI

  • Go to Control Panel > Terminal & SNMP
  • Check Enable SSH Service checkbox
  • Click Apply button

Configure DSM not to beep on volume degrade or crash through GUI

  • Go to Control Panel > Hardware & Power
  • Under General tab, Beep Control section uncheck Volume degrades or crashes

without this your DS will beep when you dismount volume

Connect to DS using root account

  • open your terminal of choice and run the following (replace my_ds_ip with your DS IP address)
    ssh root@my_ds_ip
  • you would be prompted to trust the IP (answer yes)
  • then you would be prompted to enter password (enter your DS admin password) and you should see a prompt

Dismount volume

  • using ssh session run the following command

    syno_poweroff_tasks -d

make sure you use -d debug option so that you can use ssh. Wait some time to get back to prompt

Activate volume

  • using ssh session run the following command
    vgchange -ay

and you should see

    1 logical volume(s) in volume group "vg1000" now active

Check file system

  • check file system
    e2fsck -nvf -C 0 /dev/vg1000/lv
  • n tells not to make changes
  • v tells file system check to be verbose
  • f forces file system check

I found more than 10 errors in 5 passes.

Repair file system

  • run the following command to repair
    e2fsck -y /dev/vg1000/lv
  • -y option answer every question with yes

  • don’t try -p option as it will ask for you to run e2fsck MANUALLY (which is the above command)
  • After successfully running you will see summary of the result
  • type reboot in ssh session to restart

4 thoughts on “Fix Synology DS412+ DSM 5.2 file system”

  1. Thanks for this, that helped a lot. However you need to make a correction “syno_poweroff_tasks -d” should be “syno_poweroff_task -d” with the ‘s’ on tasks.

  2. What to do instead of “vgchange -ay” if I don’t have a volume group but independent volumes: volume1,volume2,volume3,volume4?

  3. Thank you so much for posting this! I just managed to regain acces to my files.
    Will have to replace 1 of 2 disks to get a reliable raid set again.
    However, i suspect the errors in my disks were caused by some dsm update…

  4. Worked for me too on DSM 6.1… that command save my life.

    e2fsck -y /dev/vg1000/lv

    It took about 18 hours to complete on a 7TB volume with 6TB used.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: