Minutes from the Technical Board, 2008-07-15

Jesse Ruffin jesse at eloquentpeasant.net
Wed Aug 13 18:21:26 UTC 2008

On Mon, Aug 11, 2008 at 11:52:25AM +0100, Matt Zimmerman wrote:
> == Filesystem checking / AutoFsck ==
> A suggestion was made to the technical board that Ubuntu could be smarter
> about how and when it performs filesystem integrity checks (fsck).
> Decision: This should be discussed more widely in the developer community
 > Action: Scott to start a thread on ubuntu-devel/-discuss

I would say that there should be a gui tool for users to help them set it to their preferences. It should allow them to choose after how many days, or boots, to run it. It should also let them choose to run at startup, shutdown, or both.

It is unlikely that there will ever be a silver bullet for fsck. Laptop users may not want it to happen at shutdown, as they may be low on power; desktop users may want a faster startup time at boot. Long running servers may want it seldom, or frequently, depending on their i/o crunch and administrator paranoia.

### Begin fsck rant ###

Myself, I like fsck during boot. Assurance that my files are in a good state before the kernel, or I, mess with them is the most practical way to deal with errors from crashes and power loss. fsck at shutdown would not catch such cases, so it would have to be used in tandem with a startup check. All the errors caught by a shutdown fsck will be caught by a startup fsck except for on disk kernel corruption. On disk kernel corruption is a definite problem, and a good reason for having more than one, and keeping them on a separate partition or drive.

The problems that these two don't handle are corruption appearing after hibernation, and disk corruption at run time.

The problem with post hibernation checks is that the filesystem may be in an inconsistent state. This is why it is dangerous to hibernate, restart into a full startup, and restart again into your hibernated state. One way to fix this would be to alter the hibernation shutdown to fully shutdown the filesystem, and then add a check on reboot before processes accessing the filesystem are unfrozen. That method is extremely complicated due to user processes with files open, definitely infeasible, and probably impossible.

The other method is continuous online checking. This would solve both hibernation and run-time corruption. Sadly most of our filesystems are not designed with this behavior in mind. Few filesystems are even designed to check quickly, which would make the online check either slow and possibly resource intensive, or incremental checks with reduced utility.

These problems will likely persist until we have a filesystem designed to specifically handle them.

Aren't we glad that users always have excellent raid arrays with clear data protection and backup policies. Yeah.

### End fsck rant ###

Personally, I set fsck to check all my volumes at every boot. But all my volumes are reiserfs except /boot which is a very small ext3 volume with fast fsck time.

Just my two cents.

Jesse Ruffin

More information about the Ubuntu-devel-discuss mailing list