Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 32

Administering Disks (Tasks)

This chapter contains disk administration procedures. Many procedures described in this chapter are optional if you are already familiar with how disks are managed on systems running the Solaris release.

For information on the procedures associated with administering disks, see "Administering Disks (Task Map)".

For overview information about disk management, see Chapter 31, Managing Disks (Overview).

Administering Disks (Task Map)

Task

Description

For Instructions

Identify the disks on a system

If you are not sure of the types of disks on a system, use the format utility to identify the disk types.

"How to Identify the Disks on a System"

Format the disk

Determine whether a disk is already formatted by using the format utility.

"How to Determine if a Disk is Formatted"

 

In most cases, disks are already formatted. Use the format utility if you need to format a disk.

"How to Format a Disk"

Display slice information

Display slice information by using the format utility.

"How to Display Disk Slice Information"

Label the disk

Create the disk label by using the format utility.

"How to Label a Disk"

Examine the disk label

Examine the disk label by using the prtvtoc command.

"How to Examine a Disk Label"

Recover a corrupted disk label

You can attempt to recover a disk label that was damaged due to a system or power failure.

"How to Recover a Corrupted Disk Label"

Create a format.dat entry

Create a format.dat entry to support a third-party disk.

"How to Create a format.dat Entry"

Automatically configure a SCSI disk

You can automatically configure a SCSI disk with the SCSI-2 specification for disk device mode sense pages even if the specific drive type is not listed in the /etc/format.dat file.

"How to Automatically Configure a SCSI Drive"

Repair a defective disk sector

Identify a defective disk sector by using the format utility.

"How to Identify a Defective Sector by Using Surface Analysis"

If necessary, fix a defective disk sector

Fix a defective disk sector by using the format utility.

"How to Repair a Defective Sector"

Identifying Disks on a System

Use the format utility to discover the types of disks that are connected to a system. You can also use the format utility to verify that a disk is known to the system. For information on using the format utility, see Chapter 35, The format Utility (Reference).

How to Identify the Disks on a System

  1. Become superuser or assume an equivalent role.

  2. Identify the disks that are recognized on the system with the format utility.

    # format

    The format utility displays a list of disks that it recognizes under AVAILABLE DISK SELECTIONS.

Examples--Identifying the Disks on a System

The following format output is from a system with two disks.

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
  0. c0t1d0 <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. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number): 

The format output associates a disk's physical and logical device name to the disk's marketing name, which appears in angle brackets <>. This method is an easy way to identify which logical device names represent the disks that are connected to your system. For a description of logical and physical device names, see Chapter 29, Accessing Devices (Overview).

The following example uses a wildcard to display the disks that are connected to a second controller.

# format /dev/rdsk/c2*
AVAILABLE DISK SELECTIONS:
  0. /dev/rdsk/c2t0d0s0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
     /io-unit@f,e0200000/sbi@0,0/QLGC,isp@2,10000/sd@0,0
  1. /dev/rdsk/c2t1d0s0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
     /io-unit@f,e0200000/sbi@0,0/QLGC,isp@2,10000/sd@1,0
  2. /dev/rdsk/c2t2d0s0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
     /io-unit@f,e0200000/sbi@0,0/QLGC,isp@2,10000/sd@2,0
  3. /dev/rdsk/c2t3d0s0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
     /io-unit@f,e0200000/sbi@0,0/QLGC,isp@2,10000/sd@3,0
  4. /dev/rdsk/c2t5d0s0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
     /io-unit@f,e0200000/sbi@0,0/QLGC,isp@2,10000/sd@5,0
Specify disk (enter its number): 

The following example identifies the disks on a SPARC based system.

# format
AVAILABLE DISK SELECTIONS:
  0. c0t3d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
     /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@3,0
Specify disk (enter its number): 

The format output identifies that disk 0 (target 3) is connected to the first SCSI host adapter (espdma@...), which is connected to the first SBus device (sbus@0...). The output also associates both the physical and logical device name to the disk's marketing name, SUN2.1G.

The following example shows how to identify the disks on an IA based system.

# format
AVAILABLE DISK SELECTIONS:
  0. c0d0 <DEFAULT cyl 615 alt 2 hd 64 sec 63>
     /pci@0,0/pci-ide@7,1/ata@0/cmdk@0,0
  1. c0d1 <DEFAULT cyl 522 alt 2 hd 32 sec 63>
     /pci@0,0/pci-ide@7,1/ata@0/cmdk@1,0
  2. c1d0 <DEFAULT cyl 817 alt 2 hd 256 sec 63>
     /pci@0,0/pci-ide@7,1/ata@1/cmdk@0,0
Specify disk (enter its number):  

The format output identifies that disk 0 is connected to the first PCI host adapter (pci-ide@7...), which is connected to the ATA device (ata...). The format output on an IA based system does not identify disks by their marketing names.

Where to Go From Here

Check the following table if the format utility did not recognize a disk.

Disk Problem

To Solve the Problem

Disk is newly added and you didn't perform a reconfiguration boot

Go to Chapter 33, SPARC: Adding a Disk (Tasks) or Chapter 34, IA: Adding a Disk (Tasks).

Disk is a third-party disk

Go to "Creating a format.dat Entry".

Label was corrupted by a system problem, such as a power failure

Go to "How to Label a Disk".

Disk is not properly connected to the system

Connect the disk to the system by using your disk hardware documentation.

Formatting a Disk

Disks are formatted by the manufacturer or reseller. They usually do not need to be reformatted when you install the drive.

A disk must be formatted before you can do the following:

  • Write data to it. However, most disks are already formatted.

  • Use the Solaris installation program to install the system.


Caution - Formatting a disk is a destructive process because it overwrites data on the disk. For this reason, disks are usually formatted only by the manufacturer or reseller. If you think disk defects are the cause of recurring problems, you can use the format utility to do a surface analysis. However, be careful to use only the commands that do not destroy data.


How to Determine if a Disk is Formatted

  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 check from the list displayed on your screen.

    Specify disk (enter its number): 0
  4. Verify that the disk you chose is formatted by noting the following message.

    [disk formatted]
 
 
 
  Previous   Contents   Next