Fixing file system corruption on Synology NAS
I recently recycled my hard-drives on my Synology DS1010+ as one of the drives started to fail. Migration of the drives was easy, but I did notice that I had file-system corruption when looking at dmesg:
htree_dirblock_to_tree: bad entry in directory Multiply-claimed block(s) in inode
The Synology does not have a facility to check the file-system during boot up, and the following instructions will allow you to run a file-system repair (if possible, make a backup of critical files before):
- Make sure that you have SSH enabled and log into the Synology via SSH
- Shutdown all services except SSH (this will unmount the volume):
syno_poweroff_task -d
- Enable the volume:
vgchange -ay
- Check for errors, but do not fix:
e2fsck -nvf -C 0 /dev/vg1/lv
- Try to fix the file-system errors
e2fsck -pvf -C 0 /dev/vg1/lv
- If -pvf can’t work, use -yvf instead.
e2fsck -yvf -C 0 /dev/vg1/lv
- Reboot the Synology
🍺 Pay it forward: If any of my content helped you in any way, then follow me on Twitter or send me some coins:
(BTC) 36nBgsAhBBzkTvJMut851XVj47bUrdsmQx
(ETH) 0xE572b3B1187a3Ab77D72f7d6AeCd18DF26306cfC
(BAT) 0x48c65D6f768D92d4a23E4e9d25329E7De67c14d9
(LTC) M8TNsiQWe591HTkDtLubZeftbejfPMcoUy
(Ripple) rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg (Tag: 2478959347)
(XLM) GDQP2KPQGKIHYJGXNUIYOMHARUARCA7DJT5FO2FFOOKY3B2WSQHG4W37 (Memo ID: 909493707)
Affiliates: Binance (#altcoins), Coinbase (buy/sell ETH/BTC, get 10$), CoinTracking.info (get 10% off), TradingView (trend reports) or old-school PayPal.
Recent Comments