Re: Superblocks lost on all disks in array.

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

 



On Sat, Jul 15, 2017 at 07:09:08PM +0200, Jean-Pierre Human wrote:
> The array was setup with the below commands:
> #mdadm --create --verbose /dev/md2 --level=10 --raid-devices=4
> /dev/sdj /dev/sdk /dev/sdl /dev/sdi

So you didn't use a partition table?

> root@store02:~# mdadm --examine /dev/sd[iklj]
> /dev/sdi:
>    MBR Magic : aa55
> Partition[0] :   4294967295 sectors at            1 (type ee)
> /dev/sdj:
>    MBR Magic : aa55
> Partition[0] :   4294967295 sectors at            1 (type ee)
> /dev/sdk:
>    MBR Magic : aa55
> Partition[0] :   4294967295 sectors at            1 (type ee)
> /dev/sdl:
>    MBR Magic : aa55
> Partition[0] :   4294967295 sectors at            1 (type ee)

And then "something" created one. Is that partition table empty? 
Or did it also create and format partitions, that would be worse.

GPT partition table overwrites a bunch of sectors at both start and end. 
So that's where you'll find corruption, depending which mdadm metadata 
version you were using (which can also be located either start or end).

To recover, you'll have to determine the correct RAID level / layout / 
order / data offset. It's best to do this with overlays 

https://raid.wiki.kernel.org/index.php/Recovering_a_failed_software_RAID#Making_the_harddisks_read-only_using_an_overlay_file

and only write to the real disks once you've found the setting that works.

In the future, consider always using a partition table. Linux doesn't care *
but the partition table is the most standard way to declare a disk is 
already in use and for what. Without a partition table, any software not 
md-raid aware will see your drive as free, unused, and might format it.

(*) it will happily run anything you like on bare disks
    but it won't do anything to protect you, either

Regards
Andreas Klauer
--
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



[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