JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

Administering Disks (Task Map)

Identifying Disks on a System

How to Identify the Disks on a System

Formatting a Disk

How to Determine if a Disk Is Formatted

How to Format a Disk

Displaying Disk Slices

How to Display Disk Slice Information

Creating and Examining a Disk Label

How to Label a Disk

How to Examine a Disk Label

Recovering a Corrupted Disk Label

How to Recover a Corrupted Disk Label

Adding a Third-Party Disk

Creating a format.dat Entry

How to Create a format.dat Entry

Automatically Configuring SCSI Disk Drives

How to Automatically Configure a SCSI Drive

Repairing a Defective Sector

How to Identify a Defective Sector by Using Surface Analysis

How to Repair a Defective Sector

Tips and Tricks for Managing Disks

Debugging format Sessions

Labeling Multiple Disks by Using the prtvtoc and fmthard Commands

12.  SPARC: Adding a Disk (Tasks)

13.  x86: Adding a Disk (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating ZFS, UFS, TMPFS, and LOFS File Systems (Tasks)

18.  Mounting and Unmounting File Systems (Tasks)

19.  Using The CacheFS File System (Tasks)

20.  Configuring Additional Swap Space (Tasks)

21.  Checking UFS File System Consistency (Tasks)

22.  UFS File System (Reference)

23.  Backing Up and Restoring UFS File Systems (Overview)

24.  Backing Up UFS Files and File Systems (Tasks)

25.  Using UFS Snapshots (Tasks)

26.  Restoring UFS Files and File Systems (Tasks)

27.  UFS Backup and Restore Commands (Reference)

28.  Copying UFS Files and File Systems (Tasks)

29.  Managing Tape Drives (Tasks)

Index

Creating and Examining a Disk Label

The labeling of a disk is usually done during system installation or when you are creating new disk slices. You might need to relabel a disk if the disk label becomes corrupted. For example, from a power failure.

The format utility attempts to automatically configure any unlabeled SCSI disk. If the format utility is able to automatically configure an unlabeled disk, it displays a message similar to the following:

    c0t0d1: configured with capacity of 4.00GB

Tip - For information on labeling multiple disks with the same disk label, see Labeling Multiple Disks by Using the prtvtoc and fmthard Commands.


How to Label a Disk

You can use the following procedure to do the following:

If you want to put an EFI label on disk smaller than 2 terabytes, see Example 11-6.

  1. Become superuser or assume an equivalent role.
  2. Invoke the format utility.
    # format

    A numbered list of disks is displayed.

  3. Type the number of the disk that you want to label.
    Specify disk (enter its number):1

    If the format utility recognizes the disk type, the next step is to search for a backup label to label the disk. Labeling the disk with the backup label labels the disk with the correct partitioning information, the disk type, and disk geometry.

  4. Select one of the following to label the disk:
    • 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.

    • If the disk is labeled but you want to change the disk type, or if the format utility was not able to automatically configure the disk, proceed to Step 6 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.
    format> q
    #

Example 11-5 Labeling a Disk

The following example shows how to automatically configure and label a 1.05-GB 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
format> q
#

Example 11-6 Labeling a Disk 2 Terabytes or Less With an EFI Label

The following example shows how to use the format -e command to label a disk that is 2 terabytes or less 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

How to Examine a Disk Label

Examine disk label information by using the prtvtoc command. For a detailed description of the disk label and the information that is displayed by the prtvtoc command, see Chapter 10, Managing Disks (Overview).

  1. Become superuser or assume an equivalent role.
  2. Display the disk label information.
    # prtvtoc /dev/rdsk/device-name

    where device-name is the raw disk device you want to examine.

Example 11-7 Examining a Disk Label

The following example shows disk label information for a disk with a VTOC label.

# prtvtoc /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*      15 tracks/cylinder
*     945 sectors/cylinder
*    8894 cylinders
*    8892 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    1048950   3381210   4430159   /
       1      3    01          0   1048950   1048949
       2      5    00          0   8402940   8402939
       7      8    00    4430160   3972780   8402939   /export/home

The following example shows disk label information for a disk with an EFI label.

# prtvtoc /dev/rdsk/c3t1d0s0
* /dev/rdsk/c3t1d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
* 2479267840 sectors
* 2479267773 accessible sectors
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First      Sector       Last
* Partition  Tag  Flags    Sector     Count        Sector  Mount Directory
       0      2    00          34      262144      262177
       1      3    01      262178      262144      524321
       6      4    00      524322  2478727100  2479251421
       8     11    00  2479251422       16384  2479267805