Sorry I'm so slow in responding. Have you figured anything out, or can I still help?
On Tue, 2005-05-31 at 23:15 -0700, Russell Senior wrote: > I went and did a silly thing. > > I had a 200 gig disk with a jfs filesystem and a duplicate (dd'd from > one to the other). Then I decided I wanted to create a raid1 array > from the two disks, so I did the following: > > # mdadm --create /dev/md1 --auto=yes --level=1 --raid-devices=2 /dev/hdm1 > /dev/hdp1 > > and was subsequently able to mount and read (or seem to) the > pre-existing data, but when I rebooted, I got an error from fsck.jfs, > which I can replicate verbosely as follows: > > # fsck -v /dev/md1 > fsck 1.37 (21-Mar-2005) > fsck.jfs version 1.1.7, 22-Jul-2004 > processing started: 5/31/2005 22.52.14 > > FSCK Device /dev/md1 is currently mounted READ ONLY. > Using default parameter: -p > The current device is: /dev/md1 > Open(...READ/WRITE EXCLUSIVE...) returned rc = 0 > Incorrect jlog length detected in the superblock (P). > Incorrect jlog length detected in the superblock (S). > Superblock is corrupt and cannot be repaired > since both primary and secondary copies are corrupt. > > CANNOT CONTINUE. > > Now, I didn't really expect this to work and I have a backup of the > data, but I wonder if this is reparable in-place with the proper > jfs_debugfs incantation (or similar). I haven't made any > modifications to the raid1 device /dev/md1 except mounting/umounting > it read/write briefly. > > The /dev/md1 device is 193 sectors smaller than the underlying > partition /dev/hd?1. Comparing the md5sums of the first 200 sectors > of /dev/md1 and /dev/hd?1, they are identical so perhaps the smaller > number of sectors is reflected at the tail. The jfs superblock > appears to be present, it is just reporting a different fs size than > the raid1 device. At the end of the jfs partition is reserved space that you should be able to shorten. Run "jfs_debugfs /dev/md1". It is interactive, so from the prompt, you can type "s2p" to see the superblock (in an alternate format). You will want to decrease the numbers in fields [24] and [27] by 25. This corresponds to 25 4K blocks, or 200 sectors that are used to log the output of fsck for diagnostic reasons. The value of field 27 should be 50, so the command "m 27 25" will change it to 25. You need to do the same for field 24. > This is on a debian/testing box, with a custom-built 2.6.11.11 kernel. > > Thanks for any ideas/guidance! Good luck, Shaggy -- David Kleikamp IBM Linux Technology Center ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ Jfs-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jfs-discussion
