As you know, any disk used in Solaris has to have a label (if there isn't any, you can just use "format").
My problem is I want to unlabel a disk for testing purposes. Is there any command that does this?
Thanks!
Answering myself here:
dd if=/dev/zero of=$HARDDRIVE count=16
This overwrites the label, and a "format label" is required in order for the drive to be usable again.
I always used a linux life CD to remove all partitions and repartition the disk. That will remove all labels. That, ofcourse is only an option if the disk content is disposable... ;-)
Looks like you found your solution, but dd is a sledgehammer hitting a nail. Take a look at the man page for fmthard, I think it's a little more elegant, and supported.
dd if=/dev/zero of=$HARDDRIVE count=16 will not work if it is efi label, we have to change to smi label and then run dd to remove label:
format -e $HARDDRIVE
select l, and 0 (for SMI label)
dd if=/dev/zero of=$HARDDRIVE count=16enter code here
prtvtoc $HARDDRIVE ( check partition map, it should give invalid vtoc)
dd if=/dev/zero of=/pci@0/pci@0/pci@2/scsi@0/sd@0,0 count=16, witouth success...
– Kami Sep 03 '10 at 08:41formatto see which device I needed – abyx Sep 24 '10 at 09:20