C H A P T E R 2 |
Managing Disk Volumes |
This chapter contains brief descriptions of redundant array of independent disks (RAID) concepts, how to manage disk volumes, and how to configure hardware mirroring using the SAS controller.
This chapter contains the following sections:
The Sun Fire V215 and V245 servers support RAID 0 and RAID 1 configurations. You should use the Solaris OS raidctl(1M) command to configure the volumes.
With Solaris 10 8/07 OS release, the raidctl(1M) command has been updated. The usage of the command has changed dramatically. Two potential areas of concern are:
Before you use the command, read the updated raidctl(1M) man page.
For more information about RAID, the use of the raidctl(1M) command, and managing volumes, refer to the following resources:
There are numerous articles on RAID that can be found by searching on RAID.
http://www.sun.com/products-n-solutions/hardware/docs/
Caution - If you remove the system board, you must run service-only OpenBoot PROM commands to recover the volumes. Contact your service representative for more information about these commands. |
Note - The raidctl(1M) command does not support non-hot-pluggable devices. To service non-hot-pluggable components, you must shut down the server. |
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 the RAID configurations that are supported on the Sun Fire V215 and V245 servers.
Disk striping (RAID 0) is a technique for increasing system throughput by using several disk drives in parallel. In nonstriped 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. No data is shared. Data is written across all disks (concatenated) in exactly one location. Write operations are committed in a round-robin fashion across all member disks, so performance is increased in some workload scenarios. Read operations are satisfied at one location (performs as a single disk).
When you create a RAID volume, all data contained on the drive is lost. If a single disk fails, data is lost. If a RAID 0 volume is disabled (broken), data is lost.
System performance using RAID 0 will be better than using RAID 1, but the possibility of data loss is greater because there is no way to retrieve or reconstruct data stored on a failed disk drive.
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 (primary and secondary configuration). You can configure hardware disk mirroring using the SAS controller. This configuration provides higher performance than conventional software mirroring using volume management software. If you mirror the boot drive, you must create the RAID volume before you install the operating system.
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, the operating system reads from whichever disk is more readily accessible at the moment, which can result in enhanced performance for read operations.
If a single disk fails, the data is still available, but the volume will be in the degraded mode. You can replace and resynchronize the failed disk. If the volume is disabled (that is, the mirror is broken), you must relabel the drives, which causes all of the data to be lost.
On the Sun Fire V215 and V245 servers, the SAS 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 a disk mirror 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 OS and is accessed only by the SAS controller.
Caution - Creating or restoring a disk mirror destroys all data previously stored on the disk drive. |
After you create a RAID volume or during the normal operation of the system, the volume can have one of the following status conditions:
At any time during the normal operation of the system, any one or more of the drives can have one of the following status conditions:
To perform a RAID procedure, you must know the physical or logical device name for the drive that you want to use. You can use TABLE 2-1 to associate internal disk slot numbers with the logical and physical device names for each hard disk drive.
Logical Device Name[1] |
||
---|---|---|
This section contains instructions on how to create RAID volumes using the Solaris OS commands.
When you create a disk stripe on two or more drives, the data on all of the drives will be lost. In addition, no file systems can be mounted on any of these drives.
The RAID volume has the ability to use the capacity of all the disks that are combined. However, the smallest common size is used.
1. Verify that a hardware disk stripe does not already exist by typing:
The example indicates that no RAID volume exists. 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:
The RAID volume c0t1d0 is created.
Before you can use the volume, you must label it in the Solaris OS by using the format(1M) command. For instructions on labeling the volume, see Labeling a Volume.
When you create a disk mirror, all of the data on all of the drives is lost. The RAID volume will have the capacity of one drive. No file systems can be mounted on either drive. The secondary drive must be as large as the primary drive.
1. Verify that a hardware disk mirror does not already exist by typing:
The example indicates that no RAID volume exists. 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:
RAID volume c0t0d0 is created. When you create a RAID mirror, the slave drive (in this case, c0t1d0) disappears from the Solaris OS device tree.
3. To check the status of a RAID mirror, type the following command:
# raidctl -l RAID RAID RAID Disk Volume Status Disk Status -------------------------------------------------------- c0t0d0 RESYNCING c0t0d0 OK c0t1d0 OK |
The example indicates that the RAID mirror is still resynchronizing with the backup drive.
The following example shows that the RAID mirror is completely restored and online.
# raidctl -l RAID RAID RAID Disk Volume Status Disk Status ------------------------------------ c0t0d0 OK c0t0d0 OK c0t1d0 OK |
Under RAID 1 (disk mirroring), all data is duplicated on both drives. If a drive fails, replace that drive with a working drive and restore the mirror.
For more information about the raidctl utility, see the raidctl(1M) man page.
Before you can use the volume, you must label it in the Solaris OS by using the format(1M) command. For instructions on labeling the volume, see Labeling a Volume.
Before you perform the procedure in this section, verify which disk drive corresponds with which logical device name and physical device name. For more information, see Physical Disk Slot Numbers, Physical Device Names, and Logical Device Names.
1. Determine the name of the mirrored volume:
# raidctl -l RAID RAID RAID Disk Volume Status Disk Status ------------------------------------ c0t0d0 OK c0t0d0 OK c0t1d0 OK |
In this example, the mirrored volume is c0t0d0.
Note - The logical device names might appear differently on your system, depending on the number and type of add-on disk controllers installed. |
2. To delete the volume, type the following command:
3. To confirm that you have deleted the RAID array, type the following command:
For more information, see the raidctl(1M) man page.
After you delete the volume, you must relabel the drive in the Solaris OS by using the format(1M) command.
The RAID controller firmware is part of the OpenBoot PROM software patch. If you need to update the firmware for the RAID controller, download and install the latest OpenBoot PROM software patch.
If you have existing RAID volumes and have to replace a component, such as the system board, you must perform the procedure in this section so that the Solaris OS can see the volume.
Caution - The OpenBoot command, activate-volumes, should be run only by a qualified service representative. |
In the following procedure, the show-disks command is used to determine the controller path. You can also use the probe-scsi-all command to find the path.
To Recover a RAID Volume |
1. Set the auto-boot? variable to false.
2. Set the fcode-debug? variable to true.
4. Type the show-disks command to determine the path of the controller.
ok show-disks a) /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk b) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/cdrom c) /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/disk q) NO SELECTION |
5. Enter the appropriate selection, type Control-Y to insert the path into the command line, then press Enter.
Note - The /disk portion of the path was left off the path because it is the controller you want to select. |
6. Type the show-volumes command to determine the inactive volume:
7. Activate the volume using the volume number:
9. Reset the OpenBoot PROM variables, and reset the system after you have finished managing the RAID volumes.
ok setenv auto-boot? true auto-boot? = true ok setenv fcode-debug? false fcode-debug? = false ok reset-all |
If the auto-boot? variable was set to true, you might see the following message:
If you see this message, set the auto-boot? variable to false, and issue the reset-all command.
After you create a RAID volume by using the raidctl(1M) command or by using the OpenBoot PROM commands, you must label the volume correctly before the volume can be used.
To Label a Volume |
The Solaris OS must be running to perform this procedure. If you have created the volume by using the OpenBoot PROM commands, start the Solaris OS and log in as the superuser.
1. Run the format(1M) command, and choose the newly created volume from the list of drives.
You might see messages about the volume having a corrupt label or the block count being incorrect when booting or running the format command. This command needs a correct label.
2. Chose type from the Format menu.
This action displays a list of available drive types.
3. Chose Auto configure from the list.
This action defines the volume with the correct type.
4. Write the new label to the volume using the label command from the format> prompt.
The system asks you if you are ready to label the disk.
After you perform these steps, the drive is ready for use. You can now partition the drive as needed and use the volume within the Solaris OS.
Note - After you delete a RAID volume, the drives that were previously part of the RAID volume should be relabeled for proper use. |
Copyright © 2008, Sun Microsystems, Inc. All Rights Reserved.