C H A P T E R 10 |
Introduction to raidctl |
This chapter provides an overview of the LSI Integrated RAID solution for LSI SAS controllers. The chapter includes these sections:
raidctl is a Solaris command that can be used to set up hardware RAID volumes on LSI host bus adapters (HBAs). It is entirely analogous to the LSI BIOS utility described in Part I of this document.
SPARC systems, which run the Solaris OS, do not have a BIOS, so that the LSI BIOS utility is not available to set up RAID on the LSI HBA. raidctl takes its place.
raidctl can be used to set up RAID volumes for any LSI HBA that can be set up with the LSI BIOS utility. This includes on-board LSI 106x chips and PCI cards based on LSI 106x chips.
Hardware RAID can be set up with raidctl before or after the your server’s OS is installed. However, if you want to mirror your boot disk, the RAID mirror must be set up before OS installation. To do this:
1. Boot your new server using a remote Solaris OS.
2. Use raidctl to create your RAID mirror.
3. Reboot and install the OS on the mirror.
You use the -c or -C option to create a RAID volume. The -c option can only create RAID 0, 1, and 1E volumes. The -C option is more general.
The raidctl -C and raidctl -c commands are described in detail in the raidctl man page, which is reproduced in the next chapter (The raidctl Man Page). Numerous examples are given in the man page.
HBA’s might have different connectors to different SCSI buses; these are called channels. In Solaris device file convention, they are represented by the letter c, or controller number.
SCSI disks are addressed by target number and logical unit numbers. There could be multiple logical unit numbers up to a maximum of 8 under each target number.
raidctl uses two slightly different formats for naming disks:
1. The Solaris canonical format, c?t?d?, where c is the controller number, t is the target number, and d is the logical unit number. For example, three disks connected to controller number 2 could be c2t0d0, c2t1d0, and c2t2d0.
2. The C.ID.L format, where C is the channel number (not the same as the controller number) and ID and L are once again the target ID and logical unit number.
You can run the format command at the CLI without any parameters to get the names of the available disks in the canonical format. For example,
# format Searching for disks...done c2t3d0: configured with capacity of 136.71GB AVAILABLE DISK SELECTIONS: 0. c2t0d0 ......... 1. c2t1d0 .......... 2. c2t2d0......... 3. c2t3d0........ #
You can run the raidctl command with the -l option to obtain the names of the available disks in C.ID.L format. For example,
# raidctl -l Controller: 2 Disk: 0.0.0 Disk: 0.1.0 Disk: 0.2.0 Disk: 0.3.0 #
raidctl -c [-f] [-r raid_level] disk1 disk2 [disk3...].
Here is what happens if you list three disks and do not specify the raid_level option:
# raidctl -c c2t1d0 c2t2d0 c2t3d0 Creating RAID volume will destroy all data on spare space of member disks, proceed (yes/no)? yes Illegal array layout. #
Here is what happens when you do not specify the raid_level option, but only list two disks:
# raidctl -c c2t1d0 c2t2d0 Creating RAID volume will destroy all data on spare space of member disks, proceed (yes/no)? y Volume c2t1d0 is created successfully! #
Although the output did not say so, c2t1d0 is a RAID 1 volume.
This command is more general than raidctl -c and uses a different format for naming disks (C.ID.L)
raidctl -C “disks” [-r raid_level] [-z capacity] [-s stripe_size] [-f] controller
Note - As with raidctl -c, you must use the [-r raid_level] option unless you are forming a RAID 1 volume with just two disks. |
Depending on the option selected, raidctl can also be used to:
These options are all described in the next chapter, which lists the raidctl man page.
Copyright © 2006, 2007 by LSI Logic Corporation. All rights reserved. © 2009 Sun Microsystems, Inc. All rights reserved.