On Thu, 2006-10-26 at 12:46 -0400, Daniel Drake wrote:
> I have a few questions about filesystem checking and JFS.
> Firstly, are there any situations, *except* when the filesystem is not
> clean, where a standard invokation of jfs_fsck will cause a disk check
> to happen?
Two things will cause jfs_fsck to do the full check. One is if the
superblock is marked dirty. This can happen if some corruption is
detected by the kernel. Normally this also results in the file system
being mounted read-only (unless overridden with errors=continue). The
other case is when the file system was not shut down properly, and there
is a failure replaying the journal. This is phase 0, and normally the
only phase that runs after an unclean shutdown, and it should be rather
> For example, ext2/ext3 has a feature where it fsck will check the disk
> after X days or Y mounts even when the filesystem is clean.
jfs doesn't have this option (and nobody has ever asked for it).
> Secondly, is it recommended to force a check of JFS filesystems (even
> when clean) regularly? These systems will have approx 700GB of
> heavily-used JFS. For ext2/3, the tune2fs man page suggests that regular
> forced checking is very important - does the same apply here?
I wouldn't recommend forcing a check unless you suspect that something
is wrong (for instance, I/O errors being reported).
> Some context: I'm trying to avoid the really long startup delays while
> jfs_fsck scans the huge partitions, possibly by making the checks only
> happen on shutdown. However, I now suspect that these long startup
> checks are *only* running after unclean shutdowns, as opposed to being
> some time-based thing. In this case, moving the fs checks into the
> shutdown procedure would be redundant, but I am left wondering whether
> we should enforce time-based checks if the FS doesn't do it for us.
I would suspect that this is only happening after an unclean shutdown.
I am curious what would be triggering a full check. Is phase 0 failing?
This may be a bug. jfs_fsck keeps a log of its most recent run. You
can extract it with the command, "jfs_fscklog -d -e /dev/<device> -f
<output file>" and send that file to me. (You don't need to cc the
list.) If the last boot was clean, this won't help, so you'll need to
wait until it does the full check again.
> Any clarification appreciated!
IBM Linux Technology Center