[parted-devel] Possible GPT r/w error

David Cantrell dcantrell at redhat.com
Tue Apr 25 15:26:05 UTC 2006


A problem has been reported to me for RHEL indicating that parted
destroys the first partition on a GPT-labeled disk if the first
partition starts at the 18th block.

I have not been able to reproduce this on any of my hardware here.  The
problem described to me seems reasonable.  The GPT area is the first
17KB of the disk.  Parted 1.6.x reads in 8KB blocks, so to modify the
GPT area, it reads 24KB to grab the first 17KB.  Changes are made to the
GPT area and then written out to the disk.  The problem has to do with
the extra 7KB of data that has been read, which would be the first 7KB
of the first partition on the disk if it existed.

The only difference I've been able to notice between me trying to
reproduce this error and the reporter is different sector sizes on our
disks.  All of my disks are 512 or 1024 and his are 4096 (very large
2TB+ disk array).

I wanted to throw this out there and see what other people make of it.
Without his hardware, I can't see what he's seeing.

The change for this in 1.6.x seems pointless now, but also pretty
invasive.  I have just downloaded 1.7.0rc5 and haven't begun to look at
it, so I'm not sure what's changed with regard to GPT r/w.

-- 
David Cantrell
Red Hat / Westford, MA



More information about the parted-devel mailing list