[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Question About Relocating Journal on Other Device

On Sun, Aug 19, 2001 at 01:00:24AM -0400, William von Hagen wrote:
> Hi. I'm using e2fsprogs 1.23 on a Roswell system with a patched 2.4.7 
> kernel (using patch ext3-2.4-0.9.5-247) and am trying to create an ext3 
> filesystem whose journal is located on another device. The incantation I'm 
> trying is:
> mke2fs -j -J device=/dev/hdc2 /dev/hdc3
> I keep getting an error along the lines of "mke2fs: Journal superblock not 
> found". I've tried creating different types of filesystems (ext2, ext3, 
> etc.) on the target device for journaling, but this didn't seem to change 
> anything. Could someone point out the error or my ways? I could certainly 
> try a newer kernel, but the error seems to be coming from mke2fs.

First of all, please be warned that using an external journal is still
very much a feature in testing, and some of the details of how
external journal works will likely change in the future, in order to
support having multiple filesystems share a single journal, and to
prevent users from accidentally running mke2fs on an external journal
device, etc.

The trick is that you have to format the external journal device via a
separate command first:

mke2fs -O journal_dev /dev/hdc2

Only then can you create filesystems which use that journal device as
an external journal:

mke2fs -J device=/dev/hdc2 /dev/hdc3  

(the -j option is implied by the -J, so there's no reason to specify
it if you're feeling lazy.  :-)

Note, by the way, that there's no real point in creating an external
journal device on the same physical disk as the disk.  What you really
want to do is to put the external journal on a separate spindle, so
that journal writes don't cause seeks on the primary disk.  (And since
writes to the journal take place in a circular log, there's
essentially no seeks on the journal device at all.)  By putting the
journal device on the same disk as the filesystem, you end up
incurring the same number of seeks that you would by placing the
journal in the filesystem itself.  (Well, you do avoid some indirect
block lookups for the journal inode, but I doubt that's enough to make
a measurable difference.)

							- Ted

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]