Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   EXT3 Users (http://www.linux-archive.org/ext3-users/)
-   -   Problem creating external journal with ext3 (http://www.linux-archive.org/ext3-users/263625-problem-creating-external-journal-ext3.html)

Jeff Layton 03-15-2009 06:21 PM

Problem creating external journal with ext3
 
Afternoon,

I've been trying to create a new ext3 that has an external journal.
I have two 500GB SATA drives (/dev/sda and /dev/sdb) that I'm
using for my experiments. I partitioned /dev/sda into a single
partition (/dev/sda1) and I partitioned /dev/sdb into two partitions,
/dev/sdb1 that is 1024M in size and /dev/sdb2 that is the remainder.
I want to create an ext3 file system on /dev/sda1 and use /dev/sdb1
as an external journal. (BTW - I'm running the 2.6.28.7 kernal and
1.41.4 for efs2progs).

I've tried various commands and they all fail. What I'm currently
trying,

mke2fs -O journal_dev /dev/sdb1
mke2fs -t ext3 -O ^has_journal /dev/sdba1
tune2fs -o journal_data -j -J device=/dev/sdb1 /dev/sda1

gives me an error at the very end:

tune2fs: The ext2 superblock is corrupt
while trying to open journal on /dev/sdb1

Any ideas?

TIA!

Jeff

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Jeff Layton 03-15-2009 06:25 PM

Problem creating external journal with ext3
 
Jeff Layton wrote:

mke2fs -t ext3 -O ^has_journal /dev/sdba1

Already found a typo (just in the email, not on the system).
Should be,

mke2fs -t ext3 -O ^has_journal /dev/sda1

Sorry for the churn,

Jeff

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

"Michael Neish" 03-16-2009 03:39 PM

Problem creating external journal with ext3
 
Can you verify if the journal has the same block size as the fs?

/not an ext3 expert

> Afternoon,
>
> I've been trying to create a new ext3 that has an external journal.
> I have two 500GB SATA drives (/dev/sda and /dev/sdb) that I'm
> using for my experiments. I partitioned /dev/sda into a single
> partition (/dev/sda1) and I partitioned /dev/sdb into two partitions,
> /dev/sdb1 that is 1024M in size and /dev/sdb2 that is the remainder.
> I want to create an ext3 file system on /dev/sda1 and use /dev/sdb1
> as an external journal. (BTW - I'm running the 2.6.28.7 kernal and
> 1.41.4 for efs2progs).
>
> I've tried various commands and they all fail. What I'm currently
> trying,
>
> mke2fs -O journal_dev /dev/sdb1
> mke2fs -t ext3 -O ^has_journal /dev/sdba1
> tune2fs -o journal_data -j -J device=/dev/sdb1 /dev/sda1
>
> gives me an error at the very end:
>
> tune2fs: The ext2 superblock is corrupt
> while trying to open journal on /dev/sdb1
>
> Any ideas?
>
> TIA!
>
> Jeff
>
> _______________________________________________
> Ext3-users mailing list
> Ext3-users@redhat.com
> https://www.redhat.com/mailman/listinfo/ext3-users
>
>


_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Jeff Layton 03-16-2009 07:11 PM

Problem creating external journal with ext3
 
Michael Neish wrote:

Can you verify if the journal has the same block size as the fs?

/not an ext3 expert



They had the same block size (but I will rerun the steps and force
the block size).

Jeff

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Theodore Tso 03-17-2009 01:20 AM

Problem creating external journal with ext3
 
On Sun, Mar 15, 2009 at 02:21:58PM -0500, Jeff Layton wrote:
> Afternoon,
>
>
> mke2fs -O journal_dev /dev/sdb1
> mke2fs -t ext3 -O ^has_journal /dev/sdba1
> tune2fs -o journal_data -j -J device=/dev/sdb1 /dev/sda1

Ah, I see what is happening. When we added some consistency checks to
prevent insane filesystems from causing e2fsprogs to core dump, we
accidentally broke the ability of e2fsprogs manipulate journal device
files. Oops. This is a regression in e2fsprogs 1.41.4, that we'll
fix in e2fsprogs 1.41.5. I've included the patch below.

- Ted

commit 341b52dfa8c2afc11d8410de9bd381b03e75c6af
Author: Theodore Ts'o <tytso@mit.edu>
Date: Mon Mar 16 22:16:44 2009 -0400

libext2fs: external journal devices should not cause ext2fs_open2 to fail

This fixes a regression introduced in commit 79a9ab14 which caused
attempts to open external journals to fail due to overly strict
filesystem consistency checks.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index cdfeaec..f6fe3f0 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -243,10 +243,6 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
goto cleanup;
}
fs->fragsize = EXT2_FRAG_SIZE(fs->super);
- if (EXT2_INODES_PER_GROUP(fs->super) == 0) {
- retval = EXT2_ET_CORRUPT_SUPERBLOCK;
- goto cleanup;
- }
fs->inode_blocks_per_group = ((EXT2_INODES_PER_GROUP(fs->super) *
EXT2_INODE_SIZE(fs->super) +
EXT2_BLOCK_SIZE(fs->super) - 1) /
@@ -273,6 +269,11 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
return 0;
}

+ if (EXT2_INODES_PER_GROUP(fs->super) == 0) {
+ retval = EXT2_ET_CORRUPT_SUPERBLOCK;
+ goto cleanup;
+ }
+
/*
* Read group descriptors
*/


_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Jeff Layton 03-17-2009 11:25 AM

Problem creating external journal with ext3
 
Theodore Tso wrote:

On Sun, Mar 15, 2009 at 02:21:58PM -0500, Jeff Layton wrote:


Afternoon,


mke2fs -O journal_dev /dev/sdb1
mke2fs -t ext3 -O ^has_journal /dev/sdba1
tune2fs -o journal_data -j -J device=/dev/sdb1 /dev/sda1



Ah, I see what is happening. When we added some consistency checks to
prevent insane filesystems from causing e2fsprogs to core dump, we
accidentally broke the ability of e2fsprogs manipulate journal device
files. Oops. This is a regression in e2fsprogs 1.41.4, that we'll
fix in e2fsprogs 1.41.5. I've included the patch below.

- Ted



Thanks! I'll give the patch a whirl and keep an eye out for 1.41.5.

Jeff

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users


All times are GMT. The time now is 03:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.