Re: RAID5 Recovery - superblock lost after reboot

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

 



On 15/08/2024 at 07:39, David Alexander Geister wrote:

I created the array with: sudo mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc

So you really used the whole unpartitioned disks as RAID members.

It looks like the disk has a GPT partition table. Is this expected ?
If not, it could be another instance of unintended GPT "recovery",
and a reason against using unpartitionned disks.

Yes I choose GPT intentional as each of the HDDs exceed 2TB

This makes no sense. A whole disk sdX must not be used as a RAID member and have a partition table at the same time. Either the disk has no partition table and is use as a RAID member, or it has a partition table and a partition sdX1 is used as a RAID member.

Besides, the GPT primary partition table and the RAID 1.2 superblock use the same location at the beginning of the disk.

Did you create the partition table before or after creating the RAID array ?

If you create a GPT partition table after creating the RAID array, the primary partition table will overwrite the RAID superblock.

If you create a GPT partition table before creating the RAID array, the RAID superblock overwrites the primary partition table, but not the backup partition table located at the end of the disk. There have been reports lately which seem to indicate that something, maybe the BIOS/UEFI firmware, "restores" the primary partition table from an existing backup partition table at boot.

 > wipefs /dev/sda
DEVICE OFFSET        TYPE UUID LABEL
sda    0x200         gpt
sda    0x74702555e00 gpt
sda    0x1fe         PMBR

We can see that a primary and backup GPT partition tables are present.

If there are no important or unsaved data in the RAID array, I suggest that you create a RAID partition sdX1 on each disk and create a new RAID array using the partitions instead of the whole disks.

Otherwise, I suggest that you erase all GPT metadata on each disk with wipefs -a before re-creating the RAID array with --assume-clean. When re-creating the array, make sure that sda, sdb and sdc are in the same physical order as when you originally created the RAID array (check with the serial numbers).




[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