From: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
To: Wols Lists <antlists@youngman.org.uk>, linux-raid@vger.kernel.org
Cc: jes.sorensen@redhat.com
Subject: Re: [PATCH] Use disk sector size value to set offset for reading GPT
Date: Wed, 14 Dec 2016 12:04:35 +0100 [thread overview]
Message-ID: <cd102c85-a9d5-25a9-bf2c-706310b53cc6@intel.com> (raw)
In-Reply-To: <5850241B.8030007@youngman.org.uk>
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@intel.com>
> 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
>
next prev parent reply other threads:[~2016-12-14 11:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 11:13 [PATCH] Use disk sector size value to set offset for reading GPT Mariusz Dabrowski
2016-12-12 19:26 ` Jes Sorensen
2016-12-13 16:38 ` Wols Lists
2016-12-14 11:04 ` Mariusz Dabrowski [this message]
2016-12-14 18:38 ` Wols Lists
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd102c85-a9d5-25a9-bf2c-706310b53cc6@intel.com \
--to=mariusz.dabrowski@intel.com \
--cc=antlists@youngman.org.uk \
--cc=jes.sorensen@redhat.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).