Managing Devices in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Creating Disk Labels

Use this procedure 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 6–13.

    A numbered list of disks is displayed.

  2. When prompted, type the number of the disk that you want to label.
  3. If necessary, specify the disk type by performing the following substeps.

    Do these substeps only if the utility does not recognize the disk type or if you want to change the disk type. Otherwise, proceed to the next step.

    1. At the format > prompt, choose type.
    2. From the available options, type the number that corresponds to the disk's type.

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

  4. Label the disk.

    Performing one of the following depending on which prompt is displayed:

    • At the format > prompt, type label, then proceed as prompted.

    • At the confirmation prompt, type y.

  5. (Optional) To verify the results of the labeling process, at the format > prompt, type verify.
  6. Exit the Format utility.
Example 6-12  Labeling a Disk

The following example shows how to automatically configure a new and unlabeled disk, c2t1d0. The example begins after you have issued the format command and a list of disks is displayed.

# 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 6-13  Labeling a Disk With an EFI Label

The following 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 general information on EFI label features, see EFI (GPT) Disk Label.

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 6-14  Labeling a Disk With an SMI Label

The following 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]?