Automatic fsck

Matt Zimmerman mdz at ubuntu.com
Tue Aug 12 15:34:55 UTC 2008


On Tue, Aug 12, 2008 at 06:17:36PM +0300, Lars Wirzenius wrote:
> ti, 2008-08-12 kello 15:07 +0100, Matt Zimmerman kirjoitti:
> > Indeed.  The best we could do in a scenario like this would be to flag the
> > filesystem dirty so that it gets checked the next time it's possible.
> 
> I assume you mean the next time the system is rebooted. That might be a
> long time in the future: servers especially might run for months without
> a reboot. Even laptops might not reboot until there's a kernel security
> update that affects them. If the filesystem really is corrupted, it
> would be best to deal with it as soon as possible, before (more) data is
> lost.

There isn't any reasonable way to deal with this synchronously.

> I'd rather notify the server admin via e-mail (which is the standard way
> of doing such things for servers), and the desktop user via a
> notification area alert of some kind, triggered in some suitable way.

That could be done in addition to marking it dirty.

> > > I say we look into fixing e2fsck to do online consistency checking
> > > without borking over changing filesystem contents. Don't other OS/FS
> > > combos do this well?
> > 
> > This requires the cooperation of the kernel, and I don't think this exists
> > in ext3.
> 
> An ext[234] solution would also be specific to that filesystem. An LVM
> solution would be generic for all filesystems.

The LVM solution isn't viable anyway; there's no guarantee that the metadata
on disk is in any way consistent while the filesystem is mounted.  The
problem in your test isn't only that the filesystem is changing from
underneath it, it's also that it may not have been consistent in the first
place.

-- 
 - mdz




More information about the Ubuntu-devel-discuss mailing list