Go to main content

Managing Devices in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Creating Disk Labels

    You create a disk label under the following circumstances:

  • During a system installation

  • When adding new disks

  • If the disk label becomes corrupted

  • If you change the disk type

How to Label a Disk

  1. Launch the Format utility in Oracle Solaris.
    # format

    Note -  To apply an EFI label, use the format –e command syntax instead. See Example 49, Labeling a Disk With an EFI Label.

    A numbered list of disks is displayed.

  2. When prompted, type the number of the disk that you want to label.
  3. If the utility does not recognize the disk type or if you want to change the disk type, specify the disk type.
    1. At the format > prompt, choose type.
    2. Type the number that corresponds to the disk's type.

      If your disk is a SCSI-2 disk, you can choose to autoconfigure the disk by typing zero (0).

  4. Label the disk.

    Perform one of the following actions depending on which prompt is displayed.

    • At the format > prompt, type label, then proceed as prompted.
    • At the confirmation prompt, type y.
  5. (Optional) Verify the results of the labeling process by typing verify at the format > prompt.
  6. Exit the Format utility by typing quit at the format > prompt.
Example 48  Labeling a Disk

This example shows how to automatically configure a new and unlabeled disk, c2t1d0.

# format
...
Specify disk (enter its number): 1
c2t1d0: configured with capacity of 33.92GB
Disk not labeled.  Label it now?  yes
format> verify
Information is displayed.
format> q
Example 49  Labeling a Disk With an EFI Label

This example shows how to use the format –e command to label a disk with an EFI label. Make sure to verify that your layered software products will continue to work on systems with EFI-labeled disks. For more information about EFI label features, see About EFI (GPT) Disk Labels.

This example assumes that the selected disk to label is c2t3d0.

# format -e
...
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[0]: 1
Ready to label disk, continue? yes
format> quit
Example 50  Labeling a Disk With an SMI Label

This example applies an SMI label to c2t0d0. Because the disk previously had an EFI label, the example includes a warning. Otherwise, the labeling would proceed without any further warnings.

# format -e
...
Specify disk (enter its number): 3
selecting c2t0d0
[disk formatted]
...
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Warning: This disk has an EFI label. Changing to SMI label will erase all
current partitions.
Continue? yes
Auto configuration via format.dat[no]?
Auto configuration via generic SCSI-2[no]?