2.28.2012

Solaris: removing a disk label

We recently had an issue where an existing unused LUN was shrunk on the backend array, after it had been labeled by Solaris. Esentially the disk when from 1TB to 990GB so that rather than creating an sliced/EFI disk group the LUN could be included in a CDS diskgroup. Attempts to change the disk size via format and fmthard were unsuccessful. Having nothing to lose, data wise or via trying, I dd the header off the disk which did the trick.

Please not that using this command on a LUN will completely wipe out the disk label and should not be used on any disk that is currently in use or has data you would like to read. First run dd to wipe out the label information from the disk


# dd if=/dev/zero  of=/dev/rdsk/c5t500A09838779AF95d36s2 count=24
24+0 records in
24+0 records out

After the dd completed , the LUN looked new when check with format and I could relabel and stick it in a CDS diskgroup with all of his disk friends:

-bash-3.00# format c5t500A09838779AF95d36s2

c5t500A09838779AF95d36s2: configured with capacity of 989.74GB
selecting c5t500A09838779AF95d36s2

No comments: