Re: EXT3: failed to claim external journal device.

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

 



> > 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
> > e2fsprogs-1.36-6.2
> > -----------------------------------------
> > mke2fs -O journal_dev   /dev/mapper/home_jou_vol_grp-home_jou 400000
> > mke2fs -E stride=16 -O sparse_super,dir_index -j -J
> > device=/dev/mapper/home_jou_vol_grp-home_jou 
> > /dev/mapper/home_vol_grp-home
> >
> > 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
numbers.
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:
http://thread.gmane.org/gmane.comp.file-systems.ext2.devel/2950

Johann
--- Begin Message ---
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@xxxxxxxxxxxxxx>
---

 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!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Ext2-devel mailing list
Ext2-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ext2-devel

--- End Message ---
_______________________________________________

Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux