Date: Fri, 14 Jun 2013 17:32:06 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Johan Hendriks <joh.hendriks@gmail.com> Cc: Kimmo Paasiala <kpaasial@gmail.com>, freebsd-stable <freebsd-stable@freebsd.org> Subject: Re: zpool labelclear destroys GPT data Message-ID: <0A53B6AA-9614-42E9-8AA1-82233426EEE6@gsoft.com.au> In-Reply-To: <51BAC7D1.70208@gmail.com> References: <51B9BB14.6020103@gmail.com> <CA%2B7WWSdrS2QYKe8-w31dnxYRriYbhYjj_dwOjhXtTvSsh8Cisw@mail.gmail.com> <51BA381C.8070900@gmail.com> <CA%2B7WWSdsZaEQjWPBeuXb-AGpERqvjw2koZVjyEx5ah8TJTB1KA@mail.gmail.com> <51BAC7D1.70208@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14/06/2013, at 17:05, Johan Hendriks <joh.hendriks@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 including any partitioning information. >>=20 > Well as i found out, zpool(8) does not know what it clears. ! :D >=20 > I think an adjustment to the man page is in order here. > The man page clearly state it removes ZFS labels, not GPT, gmirror and = glabel labels. > It should mention it will remove labels from the disk/device, and that = it clears ALL labels. >=20 > If a user reads the man page it now looks save to use labelclear. > I thougt that zpool would know if there was zpool label information on = the disk, and if i a case there is no ZFS label information it will tell = me that! > In my case i did not loose anything, so no big deal but there will = proberbly be someone who gets bitten by this. >=20 > A plus is that i found a new way to clear my disks fast ! ;) It only clears ZFS labels, just because GPT & gmirror information sits = in a similar place doesn't make that incorrect. You are saying the equivalent of.. Why does "dd if=3D/dev/zero of=3D/dev/da0" erase my whole disk, not just = the first partition? ie you are giving the tool bad options and then complaining when it = doesn't do what you meant :) Perhaps it should be modified to check if there is valid ZFS data there = before proceeding (although that could be annoying unless there is a way = to force it), and/or the man page could be amended to say it doesn't do = any checks before erasing things. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0A53B6AA-9614-42E9-8AA1-82233426EEE6>