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:


What is raidctl?

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.



Note - Since raidctl is a Solaris command, it can be used with any server running the Solaris OS, no matter whether it has a SPARC, AMD, or Intel processor. The behavior of raidctl is not dependent on which server is running the Solaris OS.



When to Use raidctl

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.


Using raidctl to Create RAID Volumes

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.

Disk Names

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.

Obtaining Disk Names in Canonical Format

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

Obtaining Disk Names in C.ID.L Format

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
#


Note - Running the raidctl -l command also provides the number of the controller, which is 2. This means that the name of these disk in canonical form would be c2t0d0, c2t1d0, c2t2d0, and c2t3d0 (as was found above by running the format command).


The raictl -c Command

raidctl -c [-f] [-r raid_level] disk1 disk2 [disk3...]. 

Parameter

Description

-f

When present, this parameter suppresses warning prompts, such as “Do you really want to...”

-r raid_level

raid_level can be 0, 1, or 1E. For raid_level = 0, there must be two or more disks listed. For raid_level = 1, there must be two and only two disks listed. If there are more than two disks listed, raid_level must be 0 or 1E. If the -r parameter is omitted, raidctl will create a RAID 1 volume if there are two disks listed and will fail otherwise.

 

disk1, disk2, ....

Disk names in Solaris canonical format, c?t?d?.




Note - If you run the raidctl -c command without the [-r raid_level] option, you can only list two disks and you will get a RAID 1 volume. To create a RAID 1E volume, you must list more than two disks and you must use the -r option.


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.

The raidctl -C Command

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

 


Parameter

Description

disks

A list of disks in C.ID.L format. The list can include disks and sub-volumes, separated by spaces. Sub-volumes are groups of disks separated by spaces but enclosed by parenthesis--for example, (0.0.0 0.1.0).

-r raid_level

raid_level can be 0, 1, 1E, 5, 10, or 50. See the man page for descriptions of the disks combinations that can be used. If this parameter is omitted, raidctl will create a RAID 1 volume if two disks are listed and will fail otherwise.

 

Note - The LSI 106x HBA can only form RAID levels 0, 1, and 1E

-z capacity

The capacity of the volume that will be created. Can be terabytes, gigabytes, megabytes, etc., entered as 2t, 24g, 256m and so forth.

 

If this parameter is omitted, raidctl calculates the maximum volume that can be created from the disks listed.

-s stripe_size

Stripe size of the volume that will be created. See the man page for the possible values. If this parameter is omitted, raidctl chooses an appropriate value, often 64k.

-f

When present, this parameter suppresses warning prompts, such as “Do you really want to...”

controller

Specifies to which HBA (RAID controller) the disks belong.

raidctl -l will return the controller’s ID.

 




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.



Other Uses For raidctl

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.