[Pkg-sysvinit-devel] Bug#568251: Bug#568251: Please support fsck on shutdown

Henrique de Moraes Holschuh hmh at debian.org
Sat Feb 6 15:52:33 UTC 2010


On Fri, 05 Feb 2010, Goswin von Brederlow wrote:
> Henrique de Moraes Holschuh <hmh at debian.org> writes:
> > 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.
> 
> Obviously.
> 
> >> 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.
> 
> The check for this is exactly the same as during boot.

Sort of.  Boot either has to check any dirty filesystems, or halt and go
into a sulogin-or-shutdown loop.   You must NOT skip a dirty filesystem
check at boot and continue with system startup, EVER.  We can't even offer
that as a choice, it is known to cause worse data loss if the fs is corrupt.

> > 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.
> 
> Or laptop on battery. Same us boot there though.

See above for the boot stuff.  But yes, we could/should skip gratuitous
shutdown fscks when on battery, as they're just a convenience.

Do you have any (tested) patches to propose?  The idea is sound, but the
details on this one are really important.

-- 
  "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