This week I decided to take advantage of some sales on hard drives to replace a couple of the older drives in my Synology NAS that were out of warranty, moving from 2Tb to 4Tb.
I’ve done this process before when moving from 1Tb to 2Tb drives, it’s quite straight forward if very time consuming. Just power down the unit and swap the drives out one at a time, power up and tell the NAS to repair the volume with each new drive in turn, and then once all done expand the volume to use the new space.
In this case everything was going fine, until it came time to expand the volume. At that point the web UI gave me an annoyingly vague
System failed to expand [Volume 1]. message, and as indicated the space was not added.
I had to ssh into the NAS to find out the actual reason for the failure.
2021-10-20T00:45:06-04:00 DiskStation kernel: [26243.457139] EXT4-fs warning (device dm-0): ext4_resize_begin:44: There are errors in the filesystem, so online resizing is not allowed
This lead to lots of searching the web and experimenting with how to fix the issue. Turns out it was relatively simple, but not exactly intuitive. The solution I found was in this Synology forum comment.
For posterity, here’s what I needed to do.
- ssh into the NAS, sudo to root
- run this command, which shuts down all services (except ssh apparently)
syno_poweroff_task -d– this also unmounted the filesystem
- restart the volume manager using
- check the filesystem using
fsck.ext4 -vf /dev/vg1000/lv– this took about 1/2hr for me, but will vary depending what’s on your volume
- reboot the NAS
Interestingly, the fsck didn’t find any errors on the filesystem, which is good because if it had I would’ve had to run it again with
-yvf parameters instead. But just completing the fsck marked the filesystem as clean, and I was able to expand the filesystem in the web UI as normal.