Synology File System Check

Synology File System Check

How to run a Synology File System Check on a ext4 file system?

Synology File System Check

DSM used:  DSM 6.2

When checking the log files on a ext4 file system under /var/log I discovered the log file fsck. It appears that every time the system is started the following command is run for Synology File System Check:  /sbin/e2fsck -pvf. From the GUI on my Synology NAS it is not possible to start a Synology File System Check on a ext4 file system.

-p Automatic repair (no questions)

-n Open the filesystem read-only, and assume an answer of 'no' to all questions. Allows e2fsck to be used non-interactively. This option may not be specified at the same time as the -p or -y options.

-v Be verbose

-f Force checking even if filesystem is marked clean

How to run the Synology File System Check on a ext4 manually?

Running this commands are at your own risk. Always make sure you have a good backup as there are risks off data loss.

turn on telnet and don't forget to turn it off again. It is a security issue, passwords go unencrypted over the line. In control panel under Terminal & SNMP you can turn telnet on. You need a telnet program on your computer to connect to the Synology NAS. Don't use SSH because when running the below commands you will loose connection.

df -h and search for volume needed. For example volume1: /dev/vg1000/lv

syno_poweroff_task -d or umount /volume1, if this doesn't work try umount /volume1 -f -k (-k is for killing processes accessing the file)

(syno_poweroff_task) -d debug mode. This command is for killing all processes.

vgchange -ay

-a (--available) for activate or deactivate -y|--yes ]

commands to check the file system:

e2fsck -nvf -C 0 /dev/vg1000/lv (-n option see above)

fsck.ext4 -pvf -C 0 /dev/vg1000/lv or e2fsck -pvf -C 0 /dev/vg1000/lv (-p option see above)

-C 0

-C fdThis option causes e2fsck to write completion information to the specified file descriptor so that the progress of the filesystem check can be monitored. This option is typically used by programs which are running e2fsck. If the file descriptor number is negative, then absolute value of the file descriptor will be used, and the progress information will be suppressed initially. It can later be enabled by sending the e2fsck process a SIGUSR1 signal. If the file descriptor specified is 0, e2fsck will print a completion bar as it goes about its business. This requires that e2fsck is running on a video console or terminal.

After completion run:  reboot

Do you want Diktio Solutions to help you. Click Here to contact Diktio Solutions.