Re: zpool labelclear destroys GPT data

2013-06-15 Thread Daniel Kalchev
On 14.06.2013, at 19:16, Tom Evans tevans...@googlemail.com wrote: 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

Re: zpool labelclear destroys GPT data

2013-06-15 Thread Steven Hartland
- Original Message - From: Daniel Kalchev dan...@digsys.bg To: freebsd-stable@freebsd.org Sent: Saturday, June 15, 2013 12:39 PM Subject: Re: zpool labelclear destroys GPT data On 14.06.2013, at 19:16, Tom Evans tevans...@googlemail.com wrote: I suppose if labelclear was made

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Johan Hendriks
Kimmo Paasiala schreef: On Fri, Jun 14, 2013 at 12:22 AM, Johan Hendriks joh.hendr...@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

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Florent Peterschmitt
Le 14/06/2013 09:35, Johan Hendriks a écrit : Kimmo Paasiala schreef: On Fri, Jun 14, 2013 at 12:22 AM, Johan Hendriks joh.hendr...@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

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Daniel O'Connor
On 14/06/2013, at 17:05, Johan Hendriks joh.hendr...@gmail.com wrote: 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

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Alban Hertroys
On 14 June 2013 10:02, Daniel O'Connor docon...@gsoft.com.au wrote: On 14/06/2013, at 17:05, Johan Hendriks joh.hendr...@gmail.com wrote: 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

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Daniel O'Connor
On 14/06/2013, at 17:48, Alban Hertroys haram...@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

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Alban Hertroys
On 14 June 2013 10:21, Daniel O'Connor docon...@gsoft.com.au wrote: On 14/06/2013, at 17:48, Alban Hertroys haram...@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

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Daniel O'Connor
On 14/06/2013, at 18:16, Alban Hertroys haram...@gmail.com wrote: The problem with this is that then each label tool needs to know about every other label format you want to detect for.. Isn't it possible to add such information to labels, so that the tools at least know who to ask what

Re: zpool labelclear destroys GPT data

2013-06-14 Thread John Baldwin
On Friday, June 14, 2013 4:21:08 am Daniel O'Connor wrote: On 14/06/2013, at 17:48, Alban Hertroys haram...@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

Re: zpool labelclear destroys GPT data

2013-06-14 Thread Tom Evans
On Fri, Jun 14, 2013 at 4:49 PM, John Baldwin j...@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

zpool labelclear destroys GPT data

2013-06-13 Thread Johan Hendriks
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

Re: zpool labelclear destroys GPT data

2013-06-13 Thread Kimmo Paasiala
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.hendr...@gmail.com wrote: When i use zpool labelclear, it wipes the whole disk including gpt data.

Re: zpool labelclear destroys GPT data

2013-06-13 Thread Johan Hendriks
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.hendr...@gmail.com wrote: When i use zpool

Re: zpool labelclear destroys GPT data

2013-06-13 Thread Kimmo Paasiala
On Fri, Jun 14, 2013 at 12:22 AM, Johan Hendriks joh.hendr...@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