Re: Is there a tool to examine raw metadata?

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

 



On Wed, 20 Nov 2013 13:26:10 -0500 Veedar Hokstadt <veedar@xxxxxxxxx> wrote:

> Greetings,
> Consider a 3 drive RAID5 where each drive has lost it's partitioning
> info. Running mdadm -E does not find a superblock. But using hexedit
> an mdadm superblock can be found in tact near the end of each drive.
> 
> Is there perhaps a tool I can point at the superblock to decode it? Or
> trick mdadm into reporting the contents of the superblock?
> 
> I know I can look at the superblock format doc and translate it by
> hand but I was hoping for an easier way.   Thanks for any help.  -V
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

If you use losetup to create a device pointing to the original but with an
offset to match where you think the partition was, then run "mdadm -E" on the
loop device.

You could probably do:

 for i in {1..1000}
 do
  losetup -o $i /dev/loop0 /dev/whatever
  echo $i
  mdadm -E /dev/loop0
  mdadm -d /dev/loop0
 done

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux