zpool labelclear destroys GPT data
Tom Evans
tevans.uk at googlemail.com
Fri Jun 14 16:16:35 UTC 2013
On Fri, Jun 14, 2013 at 4:49 PM, John Baldwin <jhb at freebsd.org> wrote:
> Well, you could have zpool check if there is a valid ZFS label and prompt/warn
> if it doesn't find one on whatever device it's about to wipe. That doesn't
> fix the gmirror/gpt case, but it might make zpool more intuitive to use.
One of the uses of zpool labelclear is to completely wipe the portions
of the disk that ZFS will look at for label information. There is no
pre-condition, the post-condition is that the label areas of the
supplied device will be cleared.
The aim of the command is that the relevant parts of the device are
cleared, regardless of its content, such that they are ready to use as
pristine disks in a vdev.
I suppose if labelclear was made to check for the existence of a
pre-existing ZFS label, the force flag could be used to force the
change… I still don't like it, the command is not called
labelclear-only-if-the-label-area-already-has-sane-data.
Cheers
Tom
More information about the freebsd-stable
mailing list