C H A P T E R  3

Managing Disk Volumes

This chapter describes redundant array of independent disks (RAID) concepts, how to manage disk volumes, and how to configure hardware mirroring using the on-board Ultra-4 SCSI controller.

This chapter contains the following sections:


Disk Volumes

Disk volumes are logical disk devices comprising one or more physical disks or partitions from several different 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.

Sun's volume management products also provide RAID data redundancy and performance features. RAID is a technology that helps protect against disk and hardware failures. Through RAID technology, volume management software is able to provide high data availability, excellent I/O performance, and simplified administration.


Volume Management Software

Volume management software lets you create disk volumes. Sun Microsystems offers two different volume management applications for use on the Netra 440 server:

Sun's volume management applications offer the following features:

VERITAS Dynamic Multipathing

VERITAS Volume Manager software actively supports multiported disk arrays. It automatically recognizes multiple I/O paths to a particular disk device within an array. Called Dynamic Multipathing (DMP), this capability provides increased reliability by providing a path failover mechanism. If one connection to a disk is lost, VVM continues to access the data over the remaining connections. This multipathing capability also provides greater I/O throughput by automatically balancing the I/O load uniformly across multiple I/O paths to each disk device.

Sun StorEdge Traffic Manager

A newer alternative to DMP that is also supported by the Netra 440 server is Sun StorEdge Traffic Manager software. Sun StorEdge Traffic Manager is a server-based dynamic path failover software solution, used to improve the overall availability of business applications. Sun StorEdge Traffic Manager (previously known as multiplexed input/output, or MPxIO) is included in the Solaris OS.

The Sun StorEdge Traffic Manager software integrates multiple path I/O capabilities, automatic load balancing, and path failover functions into one package for Sun servers connected to supported Sun StorEdge systems. Sun StorEdge Traffic Manager can provide you with increased system performance and availability for building mission-critical storage area networks (SANs).

The Sun StorEdge Traffic Manager architecture provides the following capabilities:

Sun StorEdge T3, Sun StorEdge 3510, and Sun StorEdge A5x00 storage arrays are all supported by Sun StorEdge Traffic Manager on a Netra 440 server. Supported I/O controllers are single and dual fibre-channel network adapters, including the following:



Note - Sun StorEdge Traffic Manager is not supported for boot disks containing the root (/) file system. You can use hardware mirroring or VVM instead. See To Create a Hardware Disk Mirror and Volume Management Software.



For More Information

Refer to the documentation supplied with the VERITAS Volume Manager and Solaris Volume Manager software. For more information about Sun StorEdge Traffic Manager, refer to your Solaris system administration documentation.


RAID Technology

VERITAS Volume Manager and Solstice DiskSuitetrademark software support RAID technology to optimize performance, availability, and cost per user. RAID technology reduces recovery time in the event of file system errors, and increases data availability even in the event of a disk failure. There are several levels of RAID configurations that provide varying degrees of data availability with corresponding trade-offs in performance and cost.

This section describes some of the most popular and useful of those configurations, including:

Disk Concatenation

Disk concatenation is a method for increasing logical volume size beyond the capacity of one hard drive by creating one large volume from two or more smaller drives. This lets you create arbitrarily large partitions.

  FIGURE 3-1 Graphical Representation of Disk Concatenation

This illustration is a conceptual drawing showing how multiple disk drives can be concatenated into one volume.

Using this method, the concatenated disks are filled with data sequentially, with the second disk being written to when no space remains on the first, the third when no space remains on the second, and so on.

RAID 0: Disk Striping

Disk striping (RAID 0) is a technique for increasing system throughput by using several hard drives in parallel. Whereas in non-striped disks the operating system writes a single block to a single disk, in a striped arrangement, each block is divided and portions of the data are written to different disks simultaneously.

  FIGURE 3-2 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.

System performance using RAID 0 will be better than using RAID 1 or 5, but the possibility of data loss is greater because there is no way to retrieve or reconstruct data stored on a failed hard drive.

RAID 1: Disk Mirroring

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-3 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.

On the Netra 440 server, you can configure hardware disk mirroring using the on-board Ultra-4 SCSI controller. This provides higher performance than with conventional software mirroring using volume management software. For more information, see:

RAID 1 offers the highest level of data protection, but storage costs are high, and write performance compared to RAID 0 or RAID 5 is reduced since all data must be stored twice.

RAID 5: Disk Striping With Parity

RAID 5 is an implementation of disk striping in which parity information is included with each disk write. The advantage of this technique is that if any one disk in a RAID 5 array fails, all the information about the failed drive can be reconstructed from the data and parity on the remaining disks.

System performance using RAID 5 will fall between that of RAID 0 and RAID 1; however, RAID 5 provides limited data redundancy. If more than one disk fails, all data is lost.

Hot-Spares

In a hot-spares arrangement, one or more hard drives are installed in the system but are unused during normal operation. This configuration is also referred to as hot relocation. Should one of the active drives fail, the data on the failed disk is automatically reconstructed and generated on a hot-spare disk, enabling the entire data set to maintain its availability.


Hardware Disk Mirroring

On the Netra 440 server, the Ultra-4 SCSI controller supports internal hardware disk mirroring using the Solaris OS raidctl utility.

A hardware disk mirror created under the raidctl utility behaves slightly differently than one created using volume management software. Under a software mirror, each device has its own entry in the virtual device tree, and read/write operations are performed to both virtual devices. Under hardware disk mirroring, only one device (the master) appears in the device tree. The mirrored device (the slave) is invisible to the operating system, and is accessed only by the Ultra-4 SCSI controller.



caution icon

Caution - Creating or restoring a disk mirror destroys all data previously stored on the hard drive.



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

To perform a disk hot-swap procedure, you must know the physical or logical device name for the drive that you want to install or remove. 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@1f,700000/scsi@2/sd@1,0) or by its logical device name (such as c1t1d0). In addition, some applications might report a disk slot number (0 through 3).

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

c1t0d0

/devices/pci@1f,700000/scsi@2/sd@0,0

Slot 1

c1t1d0

/devices/pci@1f,700000/scsi@2/sd@1,0

Slot 2

c1t2d0

/devices/pci@1f,700000/scsi@2/sd@2,0

Slot 3

c1t3d0

/devices/pci@1f,700000/scsi@2/sd@3,0



procedure icon  To Create a Hardware Disk Mirror

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

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

To verify that a hardware disk mirror does not exist already, type:

# raidctl
No RAID volumes found.

The example above indicates that no RAID volume exists. In another case:

# raidctl
RAID      RAID		   RAID     Disk 
Volume    Status	 Disk     Status    
----------------------------------------
c1t1d0	   DEGRADED	c1t1d0   OK        
			   c1t2d0   DEGRADED

The example above indicates a hardware mirror has degraded at disk c1t2d0.



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



2. Type the following command:

# raidctl -c master slave

For example:

# raidctl -c c1t0d0 c1t1d0

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

3. To check the status of a RAID mirror, type the following command:

# raidctl
     RAID      RAID      RAID      Disk      
     Volume    Status    Disk      Status    
     --------------------------------------------------------
     c1t0d0    RESYNCING c1t0d0    OK        
                         c1t1d0    OK 

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

The example below shows that the RAID mirror is completely restored and online.

# raidctl
     RAID      RAID      RAID      Disk      
     Volume    Status    Disk      Status    
     ------------------------------------
     c1t0d0    OK        c1t0d0    OK        
                         c1t1d0    OK 

Under RAID 1 (disk mirroring), all data is duplicated on both drives. If a disk fails, replace it with a working drive and restore the mirror. For instructions, see To Perform a Mirrored Disk Hot-Plug Operation.

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


procedure icon  To Delete a Hardware Disk Mirror

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

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

2. Determine the name of the mirrored volume. Type the following command:

# raidctl
     RAID      RAID      RAID      Disk      
     Volume    Status    Disk      Status    
     ------------------------------------
     c1t0d0    OK        c1t0d0    OK        
                         c1t1d0    OK 

In this example, the mirrored volume is c1t0d0.



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



3. To delete the volume, type the following command:

# raidctl -d mirrored-volume

For example:

# raidctl -d c1t0d0
RAID Volume `c1t0d0' deleted

4. To confirm that you have deleted the RAID array, type the following command:

# raidctl

For example:

# raidctl
No RAID volumes found

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


procedure icon  To Perform a Mirrored Disk Hot-Plug Operation

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

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



caution icon

Caution - Ensure that the hard drive OK-to-Remove LED is lit, indicating that the hard drive is offline. If the hard drive is still online, you risk removing the disk during a read/write operation, which could result in data loss.



2. To confirm a failed disk, type the following command:

# raidctl

For example:

# raidctl
RAID      RAID		      RAID     Disk 
Volume    Status	    Disk     Status    
----------------------------------------
c1t1d0	   DEGRADED	  c1t1d0   OK        
			      c1t2d0   DEGRADED

This example indicates that the disk mirror has degraded due to a failure in disk c1t2d0.



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



3. Remove the hard drive, as described in the Netra 440 Server Service Manual.

There is no need to issue a software command to bring the drive offline when the drive has failed and the OK-to-Remove LED is lit.

4. Install a new hard drive, as described in the Netra 440 Server Service Manual.

The RAID utility automatically restores the data to the disk.

5. To check the status of a RAID rebuild, type the following command:

# raidctl

For example:

# raidctl
RAID      RAID		        RAID      Disk 
Volume    Status	      Disk      Status    
----------------------------------------
c1t1d0	   RESYNCING		   c1t1d0    OK        
			        c1t2d0    OK 

This example indicates that RAID volume c1t1d0 is resynchronizing.

If you issue the command again some minutes later, it indicates that the RAID mirror is finished resynchronizing and is back online:

# raidctl
RAID      RAID		        RAID      Disk 
Volume    Status	      Disk      Status    
----------------------------------------
c1t1d0	   OK		        c1t1d0    OK        
			        c1t2d0    OK 

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


procedure icon  To Perform a Non-Mirrored Disk Hot-Swap Operation

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

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

Ensure that no applications or processes are accessing the hard drive.

2. View the status of the SCSI devices.

To view the status of the SCSI devices, type the following command:

# cfgadm -al

For example:

# cfgadm -al
Ap_Id             Type         Receptacle   Occupant     Condition
c0                scsi-bus     connected    configured   unknown
c0::dsk/c0t0d0    CD-ROM       connected    configured   unknown
c1                scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0    disk         connected    configured   unknown
c1::dsk/c1t1d0    disk         connected    configured   unknown
c1::dsk/c1t2d0    disk         connected    configured   unknown
c1::dsk/c1t3d0    disk         connected    configured   unknown
c2                scsi-bus     connected    configured   unknown
c2::dsk/c2t2d0    disk         connected    configured   unknown
usb0/1            unknown      empty        unconfigured ok
usb0/2            unknown      empty        unconfigured ok
usb1/1            unknown      empty        unconfigured ok
usb1/2            unknown      empty        unconfigured ok
#



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



The -al options return the status of all SCSI devices, including buses and USB devices. (In this example, no USB devices are connected to the system.)

Note that while you can use the Solaris OS cfgadm install_device and cfgadm remove_device commands to perform a hard drive hot-swap procedure, these commands issue the following warning message when you invoke these commands on a bus containing the system disk:

# cfgadm -x remove_device c0::dsk/c1t1d0
Removing SCSI device: /devices/pci@1f,4000/scsi@3/sd@1,0
This operation will suspend activity on SCSI bus: c0
Continue (yes/no)? y
dev = /devices/pci@1f,4000/scsi@3/sd@1,0
cfgadm: Hardware specific failure: failed to suspend: 
     Resource              Information       
------------------  -------------------------
/dev/dsk/c1t0d0s0   mounted filesystem "/"   
/dev/dsk/c1t0d0s6   mounted filesystem "/usr"

This warning is issued because these commands attempt to quiesce the Ultra-4 SCSI bus, but the Netra 440 server firmware prevents it. This warning message can be safely ignored in the Netra 440 server, but the following procedure avoids this warning message altogether.

3. Remove the hard drive from the device tree.

To remove the hard drive from the device tree, type the following command:

# cfgadm -c unconfigure Ap-Id

For example:

# cfgadm -c unconfigure c1::dsk/c1t3d0

This example removes c1t3d0 from the device tree. The blue OK-to-Remove LED lights.

4. Verify that the device has been removed from the device tree.

To verify that the device has been removed from the device tree, type the following command:

# cfgadm -al
Ap_Id             Type         Receptacle   Occupant     Condition
c0                scsi-bus     connected    configured   unknown
c0::dsk/c0t0d0    CD-ROM       connected    configured   unknown
c1                scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0    disk         connected    configured   unknown
c1::dsk/c1t1d0    disk         connected    configured   unknown
c1::dsk/c1t2d0    disk         connected    configured   unknown
c1::dsk/c1t3d0    unavailable  connected    unconfigured unknown 
c2                scsi-bus     connected    configured   unknown
c2::dsk/c2t2d0    disk         connected    configured   unknown
usb0/1            unknown      empty        unconfigured ok
usb0/2            unknown      empty        unconfigured ok
usb1/1            unknown      empty        unconfigured ok
usb1/2            unknown      empty        unconfigured ok
#

Note that c1t3d0 is now unavailable and unconfigured. The corresponding hard drive OK-to-Remove LED is lit.

5. Remove the hard drive, as described in the Netra 440 Server Service Manual.

The blue OK-to-Remove LED goes out when you remove the hard drive.

6. Install a new hard drive, as described in the Netra 440 Server Service Manual.

7. Configure the new hard drive.

To configure the new hard drive, type the following command:

# cfgadm -c configure Ap-Id

For example:

# cfgadm -c configure c1::dsk/c1t3d0

The green Activity LED flashes as the new disk at c1t3d0 is added to the device tree.

8. Verify that the new hard drive is in the device tree.

To verify that the new hard drive is in the device tree, type the following command:

# cfgadm -al
Ap_Id              Type         Receptacle   Occupant     Condition
c0                 scsi-bus     connected    configured   unknown
c0::dsk/c0t0d0     CD-ROM       connected    configured   unknown
c1                 scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0     disk         connected    configured   unknown
c1::dsk/c1t1d0     disk         connected    configured   unknown
c1::dsk/c1t2d0     disk         connected    configured   unknown
c1::dsk/c1t3d0     disk         connected    configured   unknown
c2                 scsi-bus     connected    configured   unknown
c2::dsk/c2t2d0     disk         connected    configured   unknown
usb0/1             unknown      empty        unconfigured ok
usb0/2             unknown      empty        unconfigured ok
usb1/1             unknown      empty        unconfigured ok
usb1/2             unknown      empty        unconfigured ok
#

Note that c1t3d0 is now listed as configured.

 


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