Re: journaling filesystem

Pierre Phaneuf (
Thu, 14 May 1998 13:54:42 -0400

Cloyce D. Spradling wrote:

> : > On AIX, the journal is kept on a separate journal device, which is
> : > common to all the mounted filesystems.
> I wasn't going to pipe up before this, because it really wasn't
> important. Now it's been misinterpreted, so it's important. :)
> AIX has one JFS log per volume group, and that log is shared between all
> of the filesystems in that volume group. So because we don't have a logical
> volume manager (well, md is close in a couple of ways), under linux each
> volume group is effectively one disk.

This is an oversight from my part. I never used more than a single
volume group, so I never noted the correlation between them and the
jfslog. Under AIX, it makes sense to have a single jfslog per VG, since
I guess you normally built a VG for "logically/physically" separated
devices, like removable disks for example. In Linux, the logic doesn't
transpose that well. I can see a single journal for all the filesystems
on all my internal disks for example, even if I have 4 disks. But a
filesystem on a Jaz disk would need its own journal (on the same disk).

The preceding paragraph is almost exclusively extrapolations, so feel
free to correct me!

> : 1. does not harm compatibility with existing filesystems & kernels
> We're talking about an entirely new filesystem type here, right? I don't
> see any compatibility issues with this at all, in any case.

A journaling extension to ext2fs could be possible. You'd get a fast
fsck in case of crash.

> : 4. can use one fast disk as the log for a dozen slow disks
> That's true, but what happens when the disk with the log fails, but the FS
> is actually okay? Do we throw out the baby with the bathwater? This
> scenario is possible with AIX, but I've never been able to make it happen.
> : 5. can run multiple logs for redundancy
> This is probably the solution for #4.

I know this is possible with AIX (since a volume group can include
multiple disks), and yet it seemed acceptable (if you lost the disk with
the log, it probably didn't only contain the log, but a part of data
which is also lost, at which point having the log or not doesn't really
have importance). If the Linux JFS allows a separate device for the log,
I would hope fsck could do its work (albeit more slowly) without the
journal. Having the journal means you know what was going on at the time
of the crash, and how to correct it with the right information, but
doesn't stop you from doing it the old way, doesn't it?

> BTW, for the record (to the best of my knowledge, that is), AIX's JFS log
> only records changes in filesystem metadata, not user data. AIX's syncd
> flushes stuff to disk every 60 secs. And while I suppose it's possible,
> I've never (in the last 3.5 years) detected a case in which user data was
> corrupted or lost. But then again, I don't work in support. :)

Oh yes? Doesn't that make it slighly less useful? If it doesn't protect
the data itself? But then, I don't know much about the exact workings of
fsck, but I think it only checks for the filesystem coherency, right?
Which would happen to be only metadata, not the user data...

Pierre Phaneuf

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to