Re: Notes on support for multiple devices for a single filesystem

Dave Kleikamp
2008-12-17T22:19:13Z

On Wed, 2008-12-17 at 15:04 -0700, Andreas Dilger wrote:
> On Dec 17, 2008 08:23 -0500, Christoph Hellwig wrote:

> > An alternative way, supported by optionally by ext3 and reiserfs and
> > exclusively supported by jfs is to open the journal device by the device
> > number (dev_t) of the block special device. While this doesn't require
> > an additional mount option when the device number is stored in the filesystem
> > superblock it relies on the device number being stable which is getting
> > increasingly unlikely in complex storage topologies.
>
> Just as an FYI here - the dev_t stored in the ext3/4 superblock for the
> journal device is only a "cached" device. The journal is properly
> identified by its UUID, and should the device mapping change there is a
> "journal_dev=" option that can be used to specify the new device. The
> one shortcoming is that there is no mount.ext3 helper which does this
> journal UUID->dev mapping and automatically passes "journal_dev=" if
> needed.

An additional FYI. JFS also treats the dev_t in its superblock the same
way. Since jfs relies on jfs_fsck running at boot time to ensure that
the journal is replayed, jfs_fsck makes sure that the dev_t is accurate.
If not, then it scans all of the block devices until it finds the uuid
of the journal device, updating the superblock so that the kernel will
find the journal.

Shaggy
--
David Kleikamp
IBM Linux Technology Center