On Feb 28, 2010, at 5:05 AM, Lutz Schumann wrote: > Hello list, > > it is damn difficult to destroy ZFS labels :)
Some people seem to have a knack of doing it accidentally :-) > I try to remove the vedev labels of disks used in a pool before. According to > http://hub.opensolaris.org/bin/download/Community+Group+zfs/docs/ondiskformat0822.pdf > I created a script that removes the first 512 KB and the last 512 KB, > however I always miss the last labels .. > > -------------------------------------------- > LABEL 0 > -------------------------------------------- > failed to unpack label 0 > -------------------------------------------- > LABEL 1 > -------------------------------------------- > failed to unpack label 1 > -------------------------------------------- > LABEL 2 > -------------------------------------------- > version=14 > name='pool1' > state=1 > txg=26 > .... > -------------------------------------------- > LABEL 3 > -------------------------------------------- > version=14 > name='pool1' > state=1 > > > How can I calculate or determine the location of the superblocks described > ion the document above ? Has that changed over the versions of ZFS ? (I now > that vdevs now do not need to be exactly the same size in later OpenSolaris > releases, so maybe something has changed) It has not changed. The labels are aligned to 256KB boundaries, so your script needs to find the correct end. You can also measure this directly using something like iosnoop when running zdb -l. -- richard > > Any hints appreshiated .. > > p.s. Clearing the whole disk is troublesome, because those are a bunch of 1 > TB disks and deletion should be fast. > -- > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss ZFS storage and performance consulting at http://www.RichardElling.com ZFS training on deduplication, NexentaStor, and NAS performance http://nexenta-atlanta.eventbrite.com (March 16-18, 2010) _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss