Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2013 11:49:14 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-stable@freebsd.org
Cc:        Johan Hendriks <joh.hendriks@gmail.com>, Kimmo Paasiala <kpaasial@gmail.com>
Subject:   Re: zpool labelclear destroys GPT data
Message-ID:  <201306141149.14768.jhb@freebsd.org>
In-Reply-To: <B92714FF-CE1A-44B8-9284-C12429FA42D7@gsoft.com.au>
References:  <51B9BB14.6020103@gmail.com> <CAF-3MvOtM6%2Bk1bOWLUMY_-zmWCWbX98hGhj8kTJsWURTKEZxPQ@mail.gmail.com> <B92714FF-CE1A-44B8-9284-C12429FA42D7@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, June 14, 2013 4:21:08 am Daniel O'Connor wrote:
> 
> On 14/06/2013, at 17:48, Alban Hertroys <haramrae@gmail.com> wrote:
> > IMHO it would be helpful to verify what's there first and warn the user 
about it if such an operation will overwrite a different type of label than 
what is about to get written there.
> > Perhaps it should even refuse to write (by issuing an error stating that 
there is already a label there - and preferably also what type) until the 
label that's already there gets explicitly cleared by the user or until the 
command gets forced.
> > Does that make sense?
> 
> The problem with this is that then each label tool needs to know about every 
other label format you want to detect for..
> 
> If a label format has a checksum then you could ignore a request to nuke the 
label if there is no valid checksum (with a flag to force). No idea how many 
have checksums though..

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.

-- 
John Baldwin



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