venerdì 24 agosto 2018

Forcing fsck on Zyxel NAS 326

As you probably know Zyxel has removed the possibility to check file system of their SOHO NAS.
They declare as god faith, If the file system is dirty, we will give you the possibility to do this check.

BUT THIS IS NOT TRUE!

df -h on my NAS reports 97% of busy space.
/dev/md2                  2.7T      2.6T     51.1G  98% /i-data/86da92de

du -hd1 on the main volume reports
647.5G /i-data/86da92de/

Before to describe the trick, I would like to clarify my environment.
- Zyxel NAS 326  V5.21(AAZF.2)
- Metarepository + random tools and tweaks package installed

This is the raw command list I used, where you have to replace your actual volume name

kill $(lsof |grep /i-data/86da92d|awk '{print $2}')
umount -f /i-data/86da92de
umount /usr/local/apache/htdocs/desktop,/pkg
e2fsck -v /dev/md2

The 1st command kills all the process using our volume
The 2nd and 3rd commands remove the volume mount points
The 4th command actually does the file system check reporting it as DIRTY!

Zyxel support is totally inconsistent, they limit their selves to close support tickets they don't like.