20080915

primary label corrupt

During the ZFS testing process I've used dd command to erase the disk fragment with /dev/urandom (testing the ability of raidz crash handling). After resilvering there was still information on my console and dmesg log:

Sep 15 07:42:00 thumper scsi: [ID 107833 kern.warning] WARNING: /pci@0,0/pci1022,7458@1/pci11ab,11ab@1/disk@0,0 (sd2):
Sep 15 07:42:00 thumper primary label corrupt; using backup


I've resolved this with a format command.
It could be done in the following way.

thumper [/]# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@0,0/pci1022,7458@1/pci11ab,11ab@1/disk@0,0
[...]

Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
Reading the primary EFI GPT label failed. Using backup label.
Use the 'backup' command to restore the primary label.

format> backup
Restoring primary label.
format> label
Ready to label disk, continue? y

format> quit

2 comments:

Anonymous said...

thank you - brief and to the point - like a miniskirt.

Josh Enders said...

In oi_151a5, I kept getting the following error message:

format> backup
Restoring primary label.
Unable to get information for EFI partition 0.
Cannot label disk when partitions are in use as described.
Failed

I made sure that the volume wasn't mounted and I was able to work around it with:
export NOINUSE_CHECK=1

Thanks!