Date: Fri, 14 Jun 2013 17:16:33 +0100 From: Tom Evans <tevans.uk@googlemail.com> To: John Baldwin <jhb@freebsd.org> Cc: Johan Hendriks <joh.hendriks@gmail.com>, Kimmo Paasiala <kpaasial@gmail.com>, freebsd-stable@freebsd.org Subject: Re: zpool labelclear destroys GPT data Message-ID: <CAFHbX1JdHV%2B1DhRd%2BVpAQRAOXK8CUU7_X%2B-=RrPtEmnG4%2BuVGQ@mail.gmail.com> In-Reply-To: <201306141149.14768.jhb@freebsd.org> References: <51B9BB14.6020103@gmail.com> <CAF-3MvOtM6%2Bk1bOWLUMY_-zmWCWbX98hGhj8kTJsWURTKEZxPQ@mail.gmail.com> <B92714FF-CE1A-44B8-9284-C12429FA42D7@gsoft.com.au> <201306141149.14768.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 14, 2013 at 4:49 PM, John Baldwin <jhb@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=E2=80=A6 I still don't like it, the command is not called labelclear-only-if-the-label-area-already-has-sane-data. Cheers Tom
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFHbX1JdHV%2B1DhRd%2BVpAQRAOXK8CUU7_X%2B-=RrPtEmnG4%2BuVGQ>