Re: [PATCH] Use disk sector size value to set offset for reading GPT

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

 



Hi,
this patch affects only reading GPT from disk. It fixes minor issue when there
were no warning from mdadm when user was trying to create 1-disk RAID 0 with
external metadata on disk with some partitions and given array size was smaller
than total size of all partitions on this disk (mdadm failed to read GPT
because it was using wrong offset).

I couldn't reproduce those incidents so I can't tell that this patch fixes the
root cause of this issue.

Regards,
Mariusz

On 12/13/2016 05:38 PM, Wols Lists wrote:
On 08/12/16 11:13, Mariusz Dabrowski wrote:
mdadm is using invalid byte-offset while reading GPT header to get
partition info (size, first sector, last sector etc.). Now this offset
is hardcoded to 512 bytes and it is not valid for disks with sector
size different than 512 bytes because MBR and GPT headers are aligned
to LBA, so valid offset for 4k drives is 4096 bytes.

Signed-off-by: Mariusz Dabrowski <mariusz.dabrowski@xxxxxxxxx>
Could this be behind the couple of incidents recently, where an array
has been moved from one machine to another, and the GPT has disappeared?

I know I've been following the threads, and I've been puzzled in that
I've thought "nothing should be writing there!"

If it is, what mdadm/kernels are affected, and I can put it on the wiki,
writing the page up about corrupted disks is next on my list.

Cheers,
Wol


--
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