From: Karel Zak <kzak@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.com>,
Jens@suse.de, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] partitions/efi: Ignore errors when alternate GPT is not at the end of disk
Date: Tue, 18 Oct 2016 11:56:37 +0200 [thread overview]
Message-ID: <20161018095637.tgdjehscttskqz5q@ws.net.home> (raw)
In-Reply-To: <1476699630-127009-1-git-send-email-hare@suse.de>
On Mon, Oct 17, 2016 at 12:20:30PM +0200, Hannes Reinecke wrote:
> The GPT specification requires that the alternate GPT is at the
> end of the disk. However, if a Software RAID1 is enabled the RAID
> metadata typically placed at the end of the disk, and the actual
> size of the disk is decreased by the size of the metadata.
This is not about GPT, but about kernel. It does not support this
use-case and it parses PT on wrong device. If I good remember udev
should be smart enough to remove (by partx) such partitions and
re-create on /dev/mdX.
The real solution is to use RAID1 signatures on the begin of the disk.
This problem is generic, not specific to GPT.
> Plus it's perfectly legit to have a partition table which is
> _smaller_ than the device
Well, this is reason why GPT differentiate between headers position
and usable area (addressed by {First,Last}UsableLba within the header.
> eg we don't check for the device
> size in the msdos partition, neither.
All the "backup" GPT stuff is based on well known place for the backup
header. How do you want to reliably support GPT recovery from the
backup header if there is no explicit place for the header?
Let's imagine your primary header is broken and alternate_lba is
unreliable (or zero, etc.), where is the backup header?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2016-10-18 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 10:20 Hannes Reinecke
2016-10-18 9:56 ` Karel Zak [this message]
2016-10-18 10:07 ` Hannes Reinecke
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=20161018095637.tgdjehscttskqz5q@ws.net.home \
--to=kzak@redhat.com \
--cc=Jens@suse.de \
--cc=dbueso@suse.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®