Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Apr 2010 19:10:05 +0000
From:      Paul Wootton <paul@fletchermoorland.co.uk>
To:        Bartosz Stec <bartosz.stec@it4pro.pl>
Cc:        freebsd-fs@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: gpart failing with no such geom after gpt corruption
Message-ID:  <4BB4EF8D.9090809@fletchermoorland.co.uk>
In-Reply-To: <4BB49E3F.7070506@it4pro.pl>
References:  <4BB49E3F.7070506@it4pro.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
Bartosz,

One thing to remember is that GPT stores it's header and entry tables at 
both the start and end of the disk for redundancy.
As far as I understand it, by making the disk physically smaller, the 
GPT primary header and entry data would have become  invalid as the last 
partition would now be ending past the end of the disk


Partition table format

Offset    Length   Content
0   8   Signature ("EFI PART", 45 46 49 20 50 41 52 54)
...
24    8    Current LBA (location of this header copy)
32    8    Backup LBA (location of the other header copy)
40    8    First usable LBA for partitions (primary partition table last 
LBA + 1)
48    8    Last usable LBA (secondary partition table first LBA - 1)
...


GUID partition entry format

Offset    Length   Content
0    16    Partition type GUID
...
32    8    First LBA (little-endian)
40    8    Last LBA (inclusive, usually odd)
...


See http://en.wikipedia.org/wiki/GUID_Partition_Table



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BB4EF8D.9090809>