Purpose of fsck at boot (was: Skipping fsck during boot with systemd?)
Le Wednesday 10 December 2014 11:10:52, Frédéric Marchal a écrit :
> Le Wednesday 10 December 2014 09:49:51, Gian Uberto Lauri a écrit :
> > You run fsck on power up because the 'system does not remember' if it
> > was shut-off cleanly or not. If the disks are clean and the last check
> > is not too old, fsck just report this and does nothing. Else it takes
> > care of the safety of your data.
>
> Are you implying that the only purpose of fsck at boot is to recover from
> an unclean shutdown?
>
> To my understanding, errors creeping into the file system are unavoidable
> in the real world, even without serious system crashes.
>
> On the computer I'm using here (Debian Wheezy), automatic fsck at boot has
> been disabled from the beginning. At this time, the root partition has been
> mounted 249 times since the last check. Presumably, fsck assumed, from a
> casual glance at boot time, that there was nothing to fix.
>
> Yet, running e2fsck -n -f /dev/disk/by-uuid/whatever reports several errors
> such as orphaned inode list, block bitmap differences, wrong free blocks
> count, inode bitmap differences, wrong free inodes count.
>
> Are these errors not supposed to be fixed by a periodic deeper file system
> check?
Following this post, I restarted the computer in single user mode. I had to
ifdown eth0 before I could mount -o remount,ro /dev/sda3 but then I could run
e2fsck -f /dev/sda3 on the boot/root partition.
And surprise! No error at all!
I restarted the computer in normal mode and, for sure, e2fsck -n -f /dev/sda3
reports the same errors as above.
Is it an artifact induced by the ext4 journal?
Frederic
Reply to: