[Pkg-sysvinit-devel] Bug#568251: Bug#568251: Please support fsck on shutdown
Henrique de Moraes Holschuh
hmh at debian.org
Thu Feb 4 21:22:32 UTC 2010
On Wed, 03 Feb 2010, Goswin von Brederlow wrote:
> recently we discussed the anoyance that is fsck during boot on irc and
> came to the conclusion that on many systems the shutdown would be a
> btter time to do this.
As long as fsck on startup remains. We need that to avoid further damage to
corrupted filesystems.
> Wouldn't it be nice if during shutdown it would run fsck whenever the
> next boot would do so? That way the next morning you do not have to
> wait for the fsck before starting to work.
Well, we do NOT have a way to tell fsck to ignore check-after-n-umounts and
check-after-n-days that some filesystems implement. The only available fix
I know of is to:
1) DISABLE these misfeatures in the filesystem so that fsck won't trigger on
an otherwise clean filesystem during boot
2) re-implement the check-after-whatever-trigger through a script that calls
fsck -f every once in a while
and we certaily could call that script on shutdown, if the user wants us to.
Just make triple-sure to coordinate with the UPS monitoring stuff, because
if you trigger the fsck when the box is going down due to an UPS low battery
shutdown, very bad things could happen. The proper fix to that would be to
add a new shutdown runlevel for the UPS stuff to use, I suppose.
> Implementation wise I think it would be best if it continous the
> shutdown if fsck fails and let the user handle that case by a repeated
> fsck during the next boot.
I think you could do it using fsck -fn. But this is NOT going to work on
every filesystem out there. If you use fs-type-based whitelisting, it might
be usable (after all, not all filesystems need this either... just those
that have auto-check triggers when clean...)
> PS: It might even check / too after mounting it read-only again, right?
Yes.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
More information about the Pkg-sysvinit-devel
mailing list