C H A P T E R  3

Managing Disk Volumes

This document describes redundant array of independent disks (RAID) concepts, and how to configure and manage RAID disk volumes using the server's on-board serial attached SCSI (SAS) disk controller.

This chapter contains the following sections:


RAID Requirements

To configure and use RAID disk volumes on the server, you must install the appropriate patches. For the latest information on patches for the server, see your server's firmware product notes for this release. Patches are available for download from http://www.sun.com/sunsolve. Installation procedures for patches are included in text README files that accompany the patches.


Disk Volumes

From the perspective of the server's on-board disk controller, disk volumes are logical disk devices comprising one or more complete physical disks.

Once you create a volume, the operating system uses and maintains the volume as if it were a single disk. By providing this logical volume management layer, the software overcomes the restrictions imposed by physical disk devices.

The on-board disk controller of the server provides for the creation of one hardware RAID volume. The controller supports either a two-disk RAID 1 (integrated mirror, or IM) volume or a two-disk RAID 0 (integrated stripe, or IS) volume.



Note - Due to the volume initialization that occurs on the disk controller when a new volume is created, properties of the volume such as geometry and size are unknown. RAID volumes created using the hardware controller must be configured and labeled using format(1M) prior to use with the Solaris Operating System. See the format(1M) man page for further details.



Volume migration (relocating all RAID volume disk members from one server chassis to another) is not supported. If this operation must be performed, please contact your service provider.


RAID Technology

RAID technology allows for the construction of a logical volume, made up of several physical disks, to provide data redundancy, increased performance, or both. The server's on-board disk controller supports both RAID 0 and RAID 1 volumes.

This section describes the RAID configurations supported by the on-board disk controller:

Integrated Stripe Volumes (RAID 0)

Integrated stripe volumes are configured by initializing the volume across two or more physical disks, and sharing the data written to the volume across each physical disk in turn, or striping the data across the disks.

Integrated stripe volumes provide for a logical unit (LUN) that is equal in capacity to the sum of all its member disks. For example, a two-disk IS volume configured on 72 GByte drives will have a 144 GByte capacity.


FIGURE 3-1 Graphical Representation of Disk Striping

 This illustration is a conceptual drawing showing how write speeds can be increased by writing (striping) information to multiple disks.




caution icon

Caution - There is no data redundancy in an IS volume configuration. Thus, if a single disk fails, the entire volume fails, and all data is lost. If an IS volume is manually deleted, all data on the volume is lost.



IS volumes are likely to provide better performance than IM volumes or single disks. Under certain workloads, particularly some write or mixed read-write workloads, I/O operations complete faster because the I/O operations are being handled in a round-robin fashion, with each sequential block being written to each member disk in turn.

Integrated Mirror Volumes (RAID 1)

Disk mirroring (RAID 1) is a technique that uses data redundancy, two complete copies of all data stored on two separate disks, to protect against loss of data due to disk failure. One logical volume is duplicated on two separate disks.


FIGURE 3-2 Graphical Representation of Disk Mirroring

This illustration is a conceptual drawing showing disk mirroring.


Whenever the operating system needs to write to a mirrored volume, both disks are updated. The disks are maintained at all times with exactly the same information. When the operating system needs to read from the mirrored volume, it reads from whichever disk is more readily accessible at the moment, which can result in enhanced performance for read operations.



caution icon

Caution - Creating RAID volumes using the on-board disk controller destroys all data on the member disks. The disk controller's volume initialization procedure reserves a portion of each physical disk for metadata and other internal information used by the controller. Once the volume initialization is complete, you can configure the volume and label it using format(1M). You can then use the volume in the Solaris Operating System.




Hardware Raid Operations

On the server, the SAS controller supports mirroring and striping using the Solaris OS raidctl utility.

A hardware RAID volume created under the raidctl utility behaves slightly differently than one created using volume management software. Under a software volume, each device has its own entry in the virtual device tree, and read-write operations are performed to both virtual devices. Under hardware RAID volumes, only one device appears in the device tree. Member disk devices are invisible to the operating system, and are accessed only by the SAS controller.

Physical Disk Slot Numbers, Physical Device Names, and Logical Device Names for Non-RAID Disks

If your system encounters a disk error, often you can find messages about failing or failed disks in the system console. This information is also logged in the /var/adm/messages files.

These error messages typically refer to a failed hard drive by its physical device name (such as /devices/pci@7c0/pci@0/pci@8/scsi@2/sd@1,0) or by its logical device name (such as c0t0d0). In addition, some applications might report a disk slot number (0 or 1).

You can use TABLE 3-1 to associate internal disk slot numbers with the logical and physical device names for each hard drive.


TABLE 3-1 Disk Slot Numbers, Logical Device Names, and Physical Device Names

Disk Slot Number

Logical Device Name[1]

Physical Device Name

Slot 0

c0t0d0

/devices/pci@7c0/pci@0/pci@8/scsi@2/sd@0,0

Slot 1

c0t1d0

/devices/pci@7c0/pci@0/pci@8/scsi@2/sd@1,0



procedure icon  To Create a Hardware Mirrored Volume of the Default Boot Device

Due to the volume initialization that occurs on the disk controller when a new volume is created, the volume must be configured and labeled using the format(1M) utility prior to use with the Solaris Operating System. Because of this limitation, raidctl(1M) blocks the creation of a hardware RAID volume if any of the member disks currently have a file system mounted.

This section describes the procedure required to create a hardware RAID volume containing the default boot device. Since the boot device always has a mounted file system when booted, an alternate boot medium must be employed, and the volume created in that environment. One alternate medium is a network installation image in single-user mode (refer to the Solaris 10 Installation Guide for information about configuring and using network-based installations).

1. Determine which disk is the default boot device.

From the OpenBoot ok prompt, type the printenv command, and if necessary the devalias command, to identify the default boot device. For example:


ok printenv boot-device
boot-device =         disk
 
ok devalias disk
disk                  /pci@7c0/pci@0/pci@8/scsi@2/disk@0,0

2. Type the boot net -s command.


ok boot net -s

3. Verify that the member disks are available and that there is not a volume already created. using the raidctl command:

The server's on-board SAS controller can configure one RAID volume. Prior to volume creation, ensure that the member disks are available and that there is not a volume already created.


# raidctl
No RAID volumes found.

See Physical Disk Slot Numbers, Physical Device Names, and Logical Device Names for Non-RAID Disks.

The preceding example indicates that no RAID volume exists. In another example, a single IM volume has been enabled. It is fully synchronized and is online:


# raidctl
RAID    Volume  RAID            RAID            Disk
Volume  Type    Status          Disk            Status
------------------------------------------------------
c0t0d0  IM      OK              c0t0d0          OK
                                c0t1d0          OK

4. Create the RAID 1 volume:


# raidctl -c primary secondary

The creation of the RAID volume is interactive, by default. For example:


# raidctl -c c0t0d0 c0t1d0
Creating RAID volume c0t0d0 will destroy all data on member disks, proceed 
(yes/no)? yes
Volume 'c0t0d0' created
#

As an alternative, you can use the -f option to force the creation if you are sure of the member disks, and sure that the data on both member disks can be lost. For example:


# raidctl -f -c c0t0d0 c0t1d0
Volume 'c0t0d0' created
#

When you create a RAID mirror, the secondary drive (in this case, c0t1d0) disappears from the Solaris device tree.

5. Check the status of a RAID mirror.


# raidctl
RAID    Volume  RAID          RAID          Disk      
Volume  Type    Status        Disk          Status    
--------------------------------------------------------
c0t0d0  IM      RESYNCING     c0t0d0        OK        
                              c0t1d0        OK 

The RAID status might be OK, indicating that the RAID volume is online and fully synchronized, but the volume also might be RESYNCING in the event that the data between the primary and secondary member disks in an IM are still synchronizing. The RAID status might also be DEGRADED, if a member disk is failed or otherwise offline. Finally, it might be FAILED, indicating that volume should be deleted and reinitialized. This failure can occur when any member disk in an IS volume is lost, or when both disks are lost in an IM volume.

The Disk Status column displays the status of each physical disk. Each member disk might be OK, indicating that it is online and functioning properly, or it might be FAILED, MISSING, or otherwise OFFLINE, indicating that the disk has hardware or configuration issues that need to be addressed.

For example, an IM with a secondary disk that has been removed from the chassis appears as:


# raidctl
RAID    Volume  RAID            RAID            Disk
Volume  Type    Status          Disk            Status
------------------------------------------------------
c0t0d0  IM      DEGRADED        c0t0d0          OK
                                c0t1d0          MISSING
 

See the raidctl(1M) man page for additional details regarding volume and disk status.



Note - The logical device names might appear differently on your system, depending on the number and type of add-on disk controllers installed.



The preceding example indicates that the RAID mirror is still resynchronizing with the backup drive.

The following example shows that the RAID mirror is synchronized and online:


# raidctl
RAID    Volume  RAID            RAID            Disk
Volume  Type    Status          Disk            Status
------------------------------------------------------
c0t0d0  IM      OK              c0t0d0          OK
                                c0t1d0          OK

Under RAID 1 (disk mirroring), all data is duplicated on both drives. If a disk fails, see the service manual for your server for instructions.

For more information about the raidctl utility, see the raidctl(1M) man page.

6. Relabel the disk using the format utility.


# format
Searching for disks...done
 
AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@0,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
 
FORMAT MENU:
...
format> type
 
AVAILABLE DRIVE TYPES:
        0. Auto configure
        ...
        19. SUN72G
        20. other
Specify disk type (enter its number)[19]: 0
c0t0d0: configured with capacity of 68.00GB
<LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
selecting c0t0d0
[disk formatted]
format> label
Ready to label disk, continue? yes
 
format> disk
 
AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@0,0
Specify disk (enter its number)[0]: 0
selecting c0t0d0
[disk formatted]
format> quit
#

7. Install the volume with the Solaris Operating System using any supported method.

The hardware RAID volume c0t0d0 appears as a disk to the Solaris installation program.



Note - The logical device names might appear differently on your system, depending on the number and type of add-on disk controllers installed.




procedure icon  To Create a Hardware Striped Volume

1. Determine which disk is the default boot device.

From the OpenBoot ok prompt, type the printenv command, and if necessary the devalias command, to identify the default boot device. For example:


ok printenv boot-device
boot-device =         disk
 
ok devalias disk
disk                  /pci@7c0/pci@0/pci@8/scsi@2/disk@0,0

2. Type the boot net -s command.


ok boot net -s

3. Verify that the member disks are available and that there is not a volume already created.

The server's on-board SAS controller can configure one RAID volume. Prior to volume creation, ensure that the member disks are available and that there is not a volume already created.


# raidctl
No RAID volumes found.

See Physical Disk Slot Numbers, Physical Device Names, and Logical Device Names for Non-RAID Disks.

The preceding example indicates that no RAID volume exists.

4. Create the RAID 0 volume.


# raidctl -c -r 0 disk1 disk2

The creation of the RAID volume is interactive, by default. For example:


# raidctl -c -r 0 c0t0d0 c0t1d0
Creating RAID volume c0t1d0 will destroy all data on member disks, proceed 
(yes/no)? yes
Volume 'c0t0d0' created
#

When you create a RAID striped volume, the other member drives (in this case, c0t1d0) disappear from the Solaris device tree.

As an alternative, you can use the -f option to force the creation if you are sure of the member disks, and sure that the data on all other member disks can be lost. For example:


# raidctl -f -c -r 0 c0t0d0 c0t1d0
Volume 'c0t0d0' created
#

5. Check the status of a RAID striped volume.


# raidctl
RAID    Volume  RAID            RAID            Disk
Volume  Type    Status          Disk            Status
--------------------------------------------------------
c0t0d0  IS     OK               c0t0d0          OK        
                                c0t1d0          OK 

The example shows that the RAID striped volume is online and functioning.

Under RAID 0 (disk striping),there is no replication of data across drives. The data is written to the RAID volume across all member disks in a round-robin fashion. If any disk is lost, all data on the volume is lost. For this reason, RAID 0 cannot be used to ensure data integrity or availability, but can be used to increase write performance in some scenarios.

For more information about the raidctl utility, see the raidctl(1M) man page.

6. Relabel the disks using the format utility.


# format
Searching for disks...done
 
AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@0,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
 
FORMAT MENU:
...
format> type
 
AVAILABLE DRIVE TYPES:
        0. Auto configure
        ...
        19. SUN72G
        20. other
Specify disk type (enter its number)[19]: 0
c0t0d0: configured with capacity of 68.00GB
<LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
selecting c0t0d0
[disk formatted]
format> label
Ready to label disk, continue? yes
 
format> disk
 
AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@0,0
Specify disk (enter its number)[0]: 0
selecting c0t0d0
[disk formatted]
format> quit
#



Note - The logical device names might appear differently on your system, depending on the number and type of add-on disk controllers installed.




procedure icon  To Delete a Hardware RAID Volume

1. Verify which hard drive corresponds with which logical device name and physical device name.

See Disk Slot Numbers, Logical Device Names, and Physical Device Names.

2. Determine the name of the RAID volume.


# raidctl
RAID    Volume  RAID            RAID            Disk
Volume  Type    Status          Disk            Status
------------------------------------------------------
c0t0d0  IM      OK              c0t0d0          OK
                                c0t1d0          OK
 

In this example, the RAID volume is c0t1d0.



Note - The logical device names might appear differently on your system, depending on the number and type of add-on disk controllers installed.



3. Delete the volume.


# raidctl -d volume

For example:


# raidctl -d c0t0d0

In the event that the RAID volume is an IS volume, the deletion of the RAID volume is interactive, for example:


# raidctl -d c0t0d0
Are you sure you want to delete RAID-1 Volume c0t0d0(yes/no)? yes
/pci@7c0/pci@0/pci@8/scsi@2 (mpt0):
        Volume 0 deleted.
/pci@7c0/pci@0/pci@8/scsi@2 (mpt0):
        Physical disk 0 deleted.
/pci@7c0/pci@0/pci@8/scsi@2 (mpt0):
        Physical disk 1 deleted.
Volume 'c0t0d0' deleted.
#

The deletion of an IS volume results in the loss of all data that it contains. As an alternative, you can use the -f option to force the deletion if you are sure that you no longer need the IS volume, or the data it contains. For example:


# raidctl -f -d c0t0d0
Volume 'c0t0d0' deleted.
#

4. Confirm that you have deleted the RAID array.


# raidctl

For example:


# raidctl
No RAID volumes found

For more information, see the raidctl(1M) man page.

5. To re-label all of the member disks of the volume using the format command, select the disk name that represents the RAID volume that you have configured.

In this example, c0t0d0 is the logical name of the volume.


# format
Searching for disks...done
 
AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@0,0
       1. c0t1d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@1,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
 
FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit

6. Type the type command at the format> prompt, then select 0 (zero) to auto configure the volume.

For example:


format> type
 
AVAILABLE DRIVE TYPES:
        0. Auto configure
        1. Quantum ProDrive 80S
        2. Quantum ProDrive 105S
        3. CDC Wren IV 94171-344
        4. SUN0104
        5. SUN0207
        6. SUN0327
        7. SUN0340
        8. SUN0424
        9. SUN0535
        10. SUN0669
        11. SUN1.0G
        12. SUN1.05
        13. SUN1.3G
        14. SUN2.1G
        15. SUN2.9G
        16. Zip 100
        17. Zip 250
        18. Peerless 10GB
        19. LSILOGIC-LogicalVolume-3000
        20. other
Specify disk type (enter its number)[19]: 0
c0t0d0: configured with capacity of 68.35GB
<SUN72G  cyl 14087 alt 2 hd 24 sec 424>
selecting c0t0d0
[disk formatted]

7. Use the partition command to partition, or slice, the volume according to your desired configuration.

See the format(1M) man page for additional details.

8. Write the new label to the disk using the label command.


format> label
Ready to label disk, continue? yes

9. Verify that the new labels have been written by printing the disk list using the disk command.


format> disk
 
AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN72G  cyl 14087 alt 2 hd 24 sec 424>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@0,0
       1. c0t1d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
          /pci@7c0/pci@0/pci@8/scsi@2/sd@1,0
Specify disk (enter its number)[0]: 1
selecting c0t1d0
[disk formatted]

Note that c0t1d0 now has a type indicating it is an LSILOGIC-LogicalVolume.

10. Repeat the labeling process for the second disk.

11. Exit the format utility.

The volume can now be used in the Solaris Operating System.



Note - The logical device names might appear differently on your system, depending on the number and type of add-on disk controllers installed.




1 (TableFootnote) The logical device names might appear differently on your system, depending on the number and type of add-on disk controllers installed.