[blfs-support] Filesystem recovery messages at every boot
tourula at gmail.com
Fri May 10 02:21:41 PDT 2013
Arthur Radley wrote:
> But a small amount of additional explanation of what was and is now
> happening would be appreciated. I accept out-of-hand the explanation
> that before, my root filesystem was not being remounted read-only during
> shutdown or reboot. It's just that I still wonder what state or
> condition required recovery before, what was being done about it, and
> why it is no longer required after adding the command to remount the
> root filesystem ro at shutdown and reboot.
All filesystems should be either unmounted or mounted read-only during
shutdown to ensure all pending write operations are completed and no
data is lost. If that happens without errors, the filesystem is marked
"clean" and no repairs are needed during the next boot.
Before util-linux 2.22, the "umount -a -r" command in the mountfs script
unmounted the root filesystem or remounted it as read-only (I can't
confirm anymore which one it actually did). In util-linux 2.22 and
later, that command doesn't seem to do anything to the root filesystem,
and some checking or repairing is required during the next boot. I don't
know if this is a bug in util-linux.
Adding "mount -n -o remount,ro /" command to the mountfs script ensures
the root filesystem is cleanly remounted in read-only mode before
shutdown. As Pierre pointed out, this is what Slackware does, and I
think Debian does it too.
I don't know what exactly happens in that recovery thing during boot,
but I didn't notice any data loss, so I guess it wasn't too serious.
This is pretty much everything I understand about this matter, and it
might not be 100% correct, but I hope this helps.
More information about the blfs-support