Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2013 00:27:02 +0300
From:      Kimmo Paasiala <kpaasial@gmail.com>
To:        Johan Hendriks <joh.hendriks@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: zpool labelclear destroys GPT data
Message-ID:  <CA%2B7WWSdsZaEQjWPBeuXb-AGpERqvjw2koZVjyEx5ah8TJTB1KA@mail.gmail.com>
In-Reply-To: <51BA381C.8070900@gmail.com>
References:  <51B9BB14.6020103@gmail.com> <CA%2B7WWSdrS2QYKe8-w31dnxYRriYbhYjj_dwOjhXtTvSsh8Cisw@mail.gmail.com> <51BA381C.8070900@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 14, 2013 at 12:22 AM, Johan Hendriks <joh.hendriks@gmail.com> wrote:
> Op 13-6-2013 14:40, Kimmo Paasiala schreef:
>
>> The 'device' can be a partition as well as the whole disk, use 'zpool
>> labelclear' on the freebsd-zfs partition instead of the whole disk.
>>
>> -Kimmo
>>
>> On Thu, Jun 13, 2013 at 3:29 PM, Johan Hendriks <joh.hendriks@gmail.com>
>> wrote:
>>>
>>> When i use zpool labelclear, it wipes the whole disk including gpt data.
>>> So the whole disk is empty and i need to create the gpt partitions again.
>>>
>>> Is this supposed to work like this?
>>> The man page suggests that it only wipes the ZFS metadata.
>>>
>>> zpool labelclear [-f] device
>>>
>>>           Removes ZFS label information from the specified device. The
>>> device
>>>           must not be part of an active pool configuration.
>>>
>>>           -v      Treat exported or foreign devices as inactive.
>>>
>>> This is on FreeBSD 9.1 stable r251213 memstick install.
>>>
>>> regards
>>>
>>> Johan Hendriks
>>> Neuteboom Automatisering
>>> _______________________________________________
>>> freebsd-stable@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
>
> Thanks for your reply.
> I will try it on the actual zfs partition.
>
> But imho it is a bad thing that it destroys the whole disk layout.
> It does not remove ZFS label information, it removes ALL label information
> on the disk or device you give it
>
>
> regards
> Johan Hendriks
> Neuteboom Automatisering
>

Of course, zpool(8) will do exactly what you tell it to do. It does
not know about any partitioning schemes and assumes that the user
knows that using labelclear on a the whole disk will potentially
destroy all data on it including any partitioning information.

-Kimmo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B7WWSdsZaEQjWPBeuXb-AGpERqvjw2koZVjyEx5ah8TJTB1KA>