recover data from linear raid
Dimitris Zilaskos
dzila at tassadar.physics.auth.gr
Mon Jun 26 15:21:44 UTC 2006
I managed to get the hard disk of the retired system and this is
its raid-related boot log:
md: Autodetecting RAID arrays.
[events: 0000004d]
[events: 0000004d]
md: autorun ...
md: considering hdb1 ...
md: adding hdb1 ...
md: adding hdc1 ...
md: created md0
md: bind<hdc1,1>
md: bind<hdb1,2>
md: running: <hdb1><hdc1>
md: hdb1's event counter: 0000004d
md: hdc1's event counter: 0000004d
md0: max total readahead window set to 512k
md0: 2 data-disks, max readahead per data-disk: 256k
raid0: looking at hdb1
raid0: comparing hdb1(244195904) with hdb1(244195904)
raid0: END
raid0: ==> UNIQUE
raid0: 1 zones
raid0: looking at hdc1
raid0: comparing hdc1(293049600) with hdb1(244195904)
raid0: NOT EQUAL
raid0: comparing hdc1(293049600) with hdc1(293049600)
raid0: END
raid0: ==> UNIQUE
raid0: 2 zones
raid0: FINAL 2 zones
raid0: zone 0
raid0: checking hdb1 ... contained as device 0
(244195904) is smallest!.
raid0: checking hdc1 ... contained as device 1
raid0: zone->nb_dev: 2, size: 488391808
raid0: current zone offset: 244195904
raid0: zone 1
raid0: checking hdb1 ... nope.
raid0: checking hdc1 ... contained as device 0
(293049600) is smallest!.
raid0: zone->nb_dev: 1, size: 48853696
raid0: current zone offset: 293049600
raid0: done.
raid0 : md_size is 537245504 blocks.
raid0 : conf->smallest->size is 48853696 blocks.
raid0 : nb_zone is 11.
raid0 : Allocating 88 bytes for hash.
md: ... autorun DONE.
>>
>> As Christian said, specific error message help a lot.
>> Assume the two devices are hdc and hde,
>>
>> fdisk -l /dev/hdc
>> fdisk -l /dev/hde
>> mdadm -E /dev/hdc
>> mdadm -E /dev/hde
>>
>> and my best guess
>>
>> mdadm --build /dev/md0 --level linear --raid-disks 2 /dev/hdc /dev/hde
>> fsck -n /dev/md0
>>
>> (and linux-raid at vger.kernel.org might be a better mailing list for
>> this particular sort of problem).
>
> Disk /dev/hdb: 250.0 GB, 250059350016 bytes
> 255 heads, 63 sectors/track, 30401 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id System
> [root at node004 root]# fdisk -l /dev/hdc
>
> Disk /dev/hdc: 300.0 GB, 300090728448 bytes
> 255 heads, 63 sectors/track, 36483 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id System
> [root at node004 root]# mdadm -E /dev/hdb
> /dev/hdb:
> Magic : a92b4efc
> Version : 00.90.00
> UUID : 293be3e8:5a7ac6e7:adefc469:84f8aefb
> Creation Time : Fri Jun 23 15:47:10 2006
> Raid Level : linear
> Device Size : 244198464 (232.89 GiB 250.06 GB)
> Raid Devices : 2
> Total Devices : 2
> Preferred Minor : 0
>
> Update Time : Fri Jun 23 15:48:43 2006
> State : clean, no-errors
> Active Devices : 2
> Working Devices : 2
> Failed Devices : 0
> Spare Devices : 0
> Checksum : f790e07f - correct
> Events : 0.2
>
> Rounding : 32K
>
> Number Major Minor RaidDevice State
> this 0 3 64 0 active sync /dev/hdb
> 0 0 3 64 0 active sync /dev/hdb
> 1 1 22 0 1 active sync /dev/hdc
> [root at node004 root]# mdadm -E /dev/hdc
> /dev/hdc:
> Magic : a92b4efc
> Version : 00.90.00
> UUID : 293be3e8:5a7ac6e7:adefc469:84f8aefb
> Creation Time : Fri Jun 23 15:47:10 2006
> Raid Level : linear
> Device Size : 244198464 (232.89 GiB 250.06 GB)
> Raid Devices : 2
> Total Devices : 2
> Preferred Minor : 0
>
> Update Time : Fri Jun 23 15:48:43 2006
> State : clean, no-errors
> Active Devices : 2
> Working Devices : 2
> Failed Devices : 0
> Spare Devices : 0
> Checksum : f790e054 - correct
> Events : 0.2
>
> Rounding : 32K
>
> Number Major Minor RaidDevice State
> this 1 22 0 1 active sync /dev/hdc
> 0 0 3 64 0 active sync /dev/hdb
> 1 1 22 0 1 active sync /dev/hdc
> [root at node004 root]# mdadm --build /dev/md0 --level linear --raid-disks 2
> /dev/hdb /dev/hdc
> mdadm: array /dev/md0 built and started.
>
> fsck -n /dev/md0
> fsck 1.32 (09-Nov-2002)
> e2fsck 1.32 (09-Nov-2002)
> Couldn't find ext2 superblock, trying backup blocks...
> fsck.ext2: Bad magic number in super-block while trying to open /dev/md0
>
> The superblock could not be read or does not describe a correct ext2
> filesystem. If the device is valid and it really contains an ext2
> filesystem (and not swap or ufs or something else), then the superblock
> is corrupt, and you might try running e2fsck with an alternate superblock:
> e2fsck -b 8193 <device>
>
> fsck -b 8193 /dev/md0
> fsck 1.32 (09-Nov-2002)
> e2fsck 1.32 (09-Nov-2002)
> fsck.ext2: Bad magic number in super-block while trying to open /dev/md0
>
> The superblock could not be read or does not describe a correct ext2
> filesystem. If the device is valid and it really contains an ext2
> filesystem (and not swap or ufs or something else), then the superblock
> is corrupt, and you might try running e2fsck with an alternate superblock:
> e2fsck -b 8193 <device>
>
>
> During a recovery attemp today by mistake I created a mirror array
> with hdb as the primary and hdc as the secondary. I interrupted the array
> creation almost immediately, but part of the hdc was overwritten. However the
> array never held more than 70 gbytes of data, so I hope everything is intact
> on hdb :/
>
>
> Thank you all for your kind help:)
> --
> ============================================================================
>
> Dimitris Zilaskos
>
> Department of Physics @ Aristotle University of Thessaloniki , Greece
> PGP key : http://tassadar.physics.auth.gr/~dzila/pgp_public_key.asc
> http://egnatia.ee.auth.gr/~dzila/pgp_public_key.asc
> MD5sum : de2bd8f73d545f0e4caf3096894ad83f pgp_public_key.asc
> ============================================================================
>
> _______________________________________________
> Ext3-users mailing list
> Ext3-users at redhat.com
> https://www.redhat.com/mailman/listinfo/ext3-users
>
More information about the Ext3-users
mailing list