remove metadata from disks

Hello

I am experimenting with zfs, gmirror, gstripe and the like.
I want to simulate disk swaps and failures and so on.

But sometimes the system reads the old metadata stored on the disk like gm0 from a gmirror.

How can i delete this metadata for old zfs disk and gmirror gstripe disk

I have a second machine where i put in the removed disk and want to clean it.
I want to destroy the metadata to simulate a new disk.

thanks
Johan
 
I've always prefered to use dd as dd if=/dev/zero of=/dev/ad0 - but that's probably because I don't like the dual-redirects style. Matter of taste, and all that. :)

More practically, I suspect the metadata is stored early on the disk, so you should get away with using bs=1M count=1 as the options to dd.
(I know ZFS stores the zpool-identifying data in the first MB - not sure about e.g. gmirror.)
 
Back
Top