[zfs-discuss] Damaged GPTs when letting ZFS on Linux create the partitions itself?
behlendorf1 at llnl.gov
Fri Jul 29 13:53:51 EDT 2011
First a little background. The ZFS on Linux code was written to be as
similar to the Solaris implementation as possible. This was done to
ensure compatibility with other platforms, the idea was to diverge only
when absolutely necessary. This reasoning extended to the GPT
implementation which is handled by the libefi library provided by ZFS.
> Wondering about a couple of things here. Of course, the obvious,
> "What's up with the CRC error?".
That does seem like a bug. If you could open a new issue on the tracker
we'll take a look at it. We've already had to fix/workaround a few
issues in this area. Parted, the Linux kernel, and Solaris all have had
slightly different bugs related GPT handling.
> Then the partition IDs: BF01? At least on BSD, ZFS is A504 AFAIK?
> BF01 seems to be Solaris /usr or Mac ZFS. Probably there's good reason
> behind this, I'm just curious :) Mac ZFS is at pool version 8, and not
> likely to progress, so even if we create a pool that is recognizable
> on Mac it'd be wholly unusable. But still, yeah... Is Solaris happy
> with this?
Right, this was just to be as Solaris friendly as possible. Since Linux
doesn't have a problem with the Solaris type I left it BF. We could
change it 83 for Linux but we'd need to make sure Solaris and FreeBSD
are both still happy with it (they should be).
BF - Solaris
A5 - FreeBSD
83 - Linux
> Then, what's the final partition for, and why is it misaligned? Not
> that it matters, I guess, looks to be for metadata or something?
Currently it's not used for anything but it would be created by a
Solaris system by default. They use it as a reserved area for alternate
disk blocks. I left it because it's tiny (8MB) and may prove useful for
other purposes such as grub boot support.
As for being misaligned we should probably make sure it is 4k aligned
although this isn't a hard requirement.
> Finally, is it okay to let gdisk repair the CRC checksum,
It should be OK although I'd like to know why it's damaged first. I
haven't see this before.
> and what about giving custom labels to either of the partitions?
Setting a partition name should be harmless, we could look in to doing
it by default if it's helpful.
> Thanks! :)
More information about the zfs-discuss