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

Re: EXT3: failed to claim external journal device.

Johann, Andreas,
Thanks for the pointers, they certainly explain the issue we were seeing. Has the mount/util-linux external journal patch been accepted ?


Johann Lombardi wrote:
Here's the system information and command line used to create the
filesystem :
SuSE SLES9 2 , kernel 2.6.5
ada718-5:/ # rpm -qa | grep e2fs
mke2fs -O journal_dev   /dev/mapper/home_jou_vol_grp-home_jou 400000
mke2fs -E stride=16 -O sparse_super,dir_index -j -J

Any ideas?
I believe the kernel does the journal device lookup by the device
major/minor, and those are not fixed for LVM devices.  

If the filesystem was _cleanly_ unmounted, you can try to remove/reattach the
external journal. It will update the superblock with the new major/minor
You can proceed as follows:
# tune2fs -f -O^has_journal /dev/mapper/home_vol_grp-home
# tune2fs -J device=/dev/mapper/home_jou_vol_grp-home_jou /dev/mapper/home_vol_grp-home

It will work until the journal device's major/minor numbers change again 
(the next reboot?).

Bull recently posted a patch here for mount to automatically find the
correct block device for this journal UUID.

Actually, it was on ext2-devel:


[Ext2-devel] [PATCH] ext2: return FSID for statvfs
Pekka Enberg <penberg cs helsinki fi>
Tue, 06 Dec 2005 22:22:48 +0200
akpm osdl org
akpm osdl org
linux-kernel vger kernel org, ext2-devel lists sourceforge net

This patch changes ext2_statfs() to return a FSID based on least significant
64-bits of the 128-bit filesystem UUID. This patch is a partial fix for
Bugzilla Bug <http://bugzilla.kernel.org/show_bug.cgi?id=136>.

Signed-off-by: Pekka Enberg <penberg cs helsinki fi>

 super.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Index: 2.6/fs/ext2/super.c
--- 2.6.orig/fs/ext2/super.c
+++ 2.6/fs/ext2/super.c
@@ -1038,6 +1038,7 @@ restore_opts:
 static int ext2_statfs (struct super_block * sb, struct kstatfs * buf)
 	struct ext2_sb_info *sbi = EXT2_SB(sb);
+	struct ext2_super_block *es = sbi->s_es;
 	unsigned long overhead;
 	int i;
@@ -1052,7 +1053,7 @@ static int ext2_statfs (struct super_blo
 		 * All of the blocks before first_data_block are
 		 * overhead
-		overhead = le32_to_cpu(sbi->s_es->s_first_data_block);
+		overhead = le32_to_cpu(es->s_first_data_block);
 		 * Add the overhead attributed to the superblock and
@@ -1073,14 +1074,16 @@ static int ext2_statfs (struct super_blo
 	buf->f_type = EXT2_SUPER_MAGIC;
 	buf->f_bsize = sb->s_blocksize;
-	buf->f_blocks = le32_to_cpu(sbi->s_es->s_blocks_count) - overhead;
+	buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead;
 	buf->f_bfree = ext2_count_free_blocks(sb);
-	buf->f_bavail = buf->f_bfree - le32_to_cpu(sbi->s_es->s_r_blocks_count);
-	if (buf->f_bfree < le32_to_cpu(sbi->s_es->s_r_blocks_count))
+	buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count);
+	if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count))
 		buf->f_bavail = 0;
-	buf->f_files = le32_to_cpu(sbi->s_es->s_inodes_count);
+	buf->f_files = le32_to_cpu(es->s_inodes_count);
 	buf->f_ffree = ext2_count_free_inodes (sb);
 	buf->f_namelen = EXT2_NAME_LEN;
+	buf->f_fsid.val[0] = le32_to_cpup((void *)es->s_uuid);
+	buf->f_fsid.val[1] = le32_to_cpup((void *)es->s_uuid + sizeof(u32));
 	return 0;

This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
Ext2-devel mailing list
Ext2-devel lists sourceforge net

Franco Bladilo
Linux/HPCC Administrator
Research Computing Support Group
Rice University
bladilo rice edu

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