Solaris Disk EFI Headers

“format” is the Solaris tool used to initialize disks. Format can sometimes have a problem with disks that bear an EFI disk label. In which case, replacing the EFI label with a more traditional VTOC disk label can help.

The problem appears when an attempt is made to label the disk using format. The label operation fails with “Current disk is unformatted”. Many other format options fail with the same message. Newfs will not recognise the disk and it is therefore impossible to create a file system.

It is sometimes recommended in these circumstances to run “format -e”. That didn’t work in this case. Format could still not label the disk. The answer was to use prtvtoc and fmthard to write a VTOC disk label, thus:


# prtvtoc /dev/rdsk/c0d2s0 > /tmp/vtoc
# fmthard -s /tmp/vtoc /dev/rdsk/c0d2s0
# newfs /dev/rdsk/c0d2s2

Note that the first two commands reference slice 0 of the disk, whereas the third uses slice 2. The newfs command then completes without error, allowing the disk to be taken into use.

The example above was taken from an LDOM on a Sun T2000 system. The “disk” was virtual, being a plain file on the primary domain exported to the LDOM as a disk. The T2000 was running Logical Domains Manager 1.0.3.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.