System Administration Guide: Devices and File Systems

ProcedureHow to Label a Disk

You can use the following procedure to label at disk with a VTOC label or a disk greater than 1 terabyte with an EFI label. If you want to put an EFI label on disk smaller than 1 terabyte, see Example 11–6.

Steps
  1. Become superuser or assume an equivalent role.

  2. Invoke the format utility.


    # format
    
  3. Type the number of the disk that you want to label from the list displayed on your screen.


    Specify disk (enter its number):1
    
  4. Select one of the following.

    1. If the disk is unlabeled and was successfully configured, go to step 5 to label the disk.

      The format utility will ask if you want to label the disk.

    2. If the disk is labeled and you want to change the disk type, or if the format utility was not able to automatically configure the disk, follow steps 6-7 to set the disk type and label the disk.

  5. Label the disk by typing y at the Label it now? prompt.


    Disk not labeled. Label it now? y
    

    The disk is now labeled. Go to step 10 to exit the format utility.

  6. Enter type at the format> prompt.


    format> type
    

    The Available Drive Types menu is displayed.

  7. Select a disk type from the list of possible disk types.


    Specify disk type (enter its number)[12]: 12
    

    Or, select 0 to automatically configure a SCSI-2 disk. For more information, see How to Automatically Configure a SCSI Drive.

  8. Label the disk. If the disk is not labeled, the following message is displayed.


    Disk not labeled. Label it now? y
    

    Otherwise, you are prompted with this message:


    Ready to label disk, continue? y
    
  9. Verify the disk label.


    format> verify 
    
  10. Exit the format utility.


    partition> q
    format> q
    #

Example 11–5 Labeling a Disk

The following example shows how to automatically configure and label a 1.05-Gbyte disk.


# format
	c1t0d0: configured with capacity of 1002.09MB
 
AVAILABLE DISK SELECTIONS:
	  0. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
	  1. c1t0d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
Specify disk (enter its number): 1
Disk not labeled.  Label it now?  yes
format> verify
#


Example 11–6 Labeling a Disk Less Than 1 Terabyte with an EFI Label

The following example shows how to use the format -e command to label a disk less than 1 terabyte with an EFI label. Remember to verify that your layered software products will continue to work on systems with EFI-labeled disks. For general information on EFI label restrictions, see Restrictions of the EFI Disk Label.


# format -e
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       1. c1t0d0 <SUNW18g cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@0,0
       2. c1t1d0 <SUNW18g cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@1,0
       3. c1t8d0 <SUNW18g cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@8,0
       4. c1t9d0 <SUNW18g cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@9,0
Specify disk (enter its number): 4
selecting c1t9d0
[disk formatted]
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[0]: 1
Ready to label disk, continue? yes
format> quit