Force fsck on ext4 non root partition at reboot

moxmox

Well-Known Member
Aug 14, 2019
63
8
48
45
This is a non-root filesystem but I cannot umount it once the system is up and running. (even using init 1 I could still not unmount it, lsof didn't appear to tell me what was using it)

so I have tried to force a fsck on boot, but using tune2fs -c 1 /dev/sdXY on the relevant partition does not seem to do anything.

Is it ignored because of some proxmox specific code?

root partion is a zfs mirror
 
Normaly you should use this in grub line /etc/default/grub
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.repair=preen"
With that, check starts automaticliy. If you would force a check type this:
Code:
touch /forcefsck
After reboot every filesystem would be checked.
https://wiki.ubuntuusers.de/Dateisystemcheck/