C H A P T E R  6

 


The LSI cfggen Utility

The LSI cfggen utility is a configuration utility used to create Integrated Mirroring (IM) volumes.

The chapter has the following sections:


Installing the cfggen Utility

You can install the utility from the Tools and Drivers CD, if available, or from your product Tools and Drivers CD image, downloadable from the product web page.

The cfggen utility resides in /windows/w2k3/tools/lsi_cfggen. The directory includes 32-bit and 64-bit executables as well as LSI documentation.



Note - This chapter describes the utility as implemented on Sun’s x64 servers. The LSI documentation in the Tools and Drivers CD describes the utility in general.



Overview of cfggen

The cfggen utility is a configuration utility used to create Integrated Mirroring (IM) volumes. A command-line utility, it runs in the Windows Preinstallation Environment (WinPE) and on DOS. The utility is a minimally interactive program that can be executed from a command-line prompt or a shell script. The result of running this utility is communicated through the program status value that is returned when the program exits. You use the utility to create IM storage configurations on both SCSI controllers and SAS controllers.

The utility runs on WinPE and is statically compiled with the LSI MptLib Library (MptLib.lib). The WinPE environment must have the appropriate LSI Logic MPT Windows driver (ScsiPort or StorPort) installed and loaded in order to recognize and communicate with the I/O controller. The utility does not recognize an LSI53C1030 or LSI53C1020 controller unless there is at least one device attached to the controller.



caution icon Caution - Do not run cfggenin a command-line window from within Windows.



cfggen Syntax

cfggen uses a command line interface with the following format:


cfggen controller-number command-parameters

Note the following:

cfggen Command Conventions

The following conventions are used in the command descriptions:

Common Command-Line Parameters

The following cfggen command line parameters are common to more than one command:

The unique number of a PCI function found in the system, starting with controller number 0. Therefore, the controller-number is used to address a particular SCSI bus in the system. For example, cfggen assigns two controller numbers to an LSI53C1030 dual SCSI bus chip. It assigns one controller number to an LSI53C1020 single SCSI bus chip. For the LSI Logic SAS1064/1064E and SAS1068/1068E controllers, the controller number corresponds to a single SAS controller.

For example, with cfggen in a system containing two SAS1068 controllers, controller number 0 references the first controller and controller number 1 references the other controller.

Valid controller number values are 0 to 255 (decimal).

The SCSI bus address of a peripheral device attached to an LSI Logic controller. The maximum value of SCSI ID depends on the type of I/O controller and the maximum number of devices supported by the OS for this controller.

Valid SCSI ID values are:

0-15 (decimal) per SCSI bus for LSI53C1020/1030 controllers

0-127 (decimal) per controller for SAS1064/1064E and SAS1068/1068E controllers



Note - With PBSRAM, the SAS1068/1068E controllers can support more than 128 devices.


The enclosure (encl) and bay/slot of a peripheral device attached to the bus. The argument must use a colon (:) as a separator and must follow the enclosure:bay format. Only devices connected to LSI SAS controllers can be addressed using enclosure:bay and hence this option is not supported on LSI53C1020/1030 controllers.

Valid numbers are:

enclosure: A 16-bit EnclosureHandle value set by the I/O controller. A value of 0 is invalid.

bay/slot: A 16-bit Slot value set by the I/O controller.

The enclosure and slot numbers of a drive can be obtained from the display command

Supported Commands

The following commands are currently supported by cfggen:

auto Command

The AUTO command automatically creates an IM, IME, or IS volume on an LSI1064/1064E or LSI1068/1068E controller. The volume is created with the maximum number of disks available for use in the specified volume type. The main difference from the CREATE command is that with the AUTO command you do not specify SCSI ID values for disks to use in the volume. CFGGEN automatically creates the volume with the first usable disks it finds. Firmware and hardware limitations for the family of controllers limit the number of configurations that are possible.

When a disk drive is added to an IM, IME, or IS volume, its entire storage capacity may or may not be used, depending on drive capacity and volume capacity. For example, if you add a 36 Gbyte disk drive to a volume that only uses 9 Gbytes of capacity on each disk drive, the remaining 27 Gbytes of capacity on the disk drive are unusable. When AUTO creates an IM volume, the first disk found is assigned as the primary disk drive. If the controller is allowed to resync the disk drives, the data on the primary disk drive will be available by accessing the newly created volume.

CFGGEN follows these rules when creating IM, IME, and IS volumes and hot spare disks with the AUTO command:

Example
cfggen controller-number auto volume-type size size [qsync] [noprompt]
Parameters

controller-number Number of the SAS controller targeted by this command.



Note - Specifying SAS instead of controller # will configure all SAS only controllers in the system and is supported only for AUTO command in Linux version.



volume-type

Volume type for the volume to be created. Valid values are IM,

IME and IS

size

Size of the RAID volume in Mbytes, or MAX for the maximum size available

qsync

If this optional parameter is specified, a quick synchronization of the new volume will be performed. If the volume type is IME or IS, a quick synchronization is always performed even if this option is not specified. A quick synchronization means that the first 32 Kbytes of the drives in the volume are cleared to 0.

noprompt

Suppresses display of warnings and prompts


Program Return Value

0x00 SUCCESS command completed successfully

0x01 FAILURE bad command line arguments or operational failure

0x02 ADAPTER_NOT_FOUND adapter specified cannot be found


create Command

The create command creates IM, IME (Integrated Mirroring Enhanced), and IS (Integrated Striping) volumes on the LSI53C1020/1030 and SAS1064/1064E and SAS1068/1068E controllers. The firmware and hardware limitations for these controllers determine the number of configurations that can be created. When a disk drive is added to an IM, IME, or IS volume, its entire storage capacity can be used, depending on drive capacity and volume capacity. Any unused capacity is not accessible for other purposes.

For example, if you add a 36 Gbyte disk drive to a volume that only uses 9 Gbytes of capacity on each disk drive, the remaining 27 Gbytes of capacity on the disk drive is unusable. The disk identified by the first SCSI ID on the command line is assigned as the primary disk drive when an IM volume is created. If the controller is allowed to resynchronize the disk drives, the data on the primary disk drive will be available when you access the newly created volume.

The following rules must be observed when creating IM, IME, and IS volumes and hot spare disks:

1. All disks that are part of a volume, including hot spares for that volume, must be on the same SAS controller or on the same SCSI bus (for SCSI controllers).

2. IM, IME, and IS volumes are supported.

3. A maximum of two IM, IME, or IS volumes per controller can be created.

4. The total number of disks in a volume, including hot-spare disks, cannot exceed six for LSI53C1020/1030 controllers.

5. The total number of disks in a volume, including hot-spare disks, cannot exceed eight for SAS1064/1064E and SAS1068/1068E controllers, and the total number of disks combined for two volumes cannot exceed ten. Ten disks is a theoretical upper limit for the firmware; the SAS controller can actually support a fewer number of disks.

6. An IM volume must have exactly two disks.

7. An IME volume can have a minimum of three disks and a maximum of six disks (for LSI53C1020/1030 controllers) or eight disks (for SAS controllers), as long as rules 4 and 5 are not violated.

Example
cfggen controller-number create volume-type size {SCSI-ID} [qsync] [noprompt]
cfggen controller-number create volume-type size {encl:bay} [qsync] [noprompt]

controller-number

Number of the SCSI bus or SAS controller targeted by this command

volume-type

Volume type for the new volume to be created. Valid values are IM or IME or IS.

size

Size of the RAID volume in Mbytes, or MAX for the maximum size available

SCSI-ID

SCSI ID of a hard drive to be included in the RAID volume

encl:bay

The enclosure:bay value for the disk drive to be included in the RAID volume. These values can be obtained from the output of the DISPLAY command.

qsync

If this optional parameter is specified, a quick synchronization of new volume will be performed. If the volume type is IME or IS, a quick synchronization is always performed even if qsync is not specified. A quick synchronization means that the first 32 Kbytes of the drives in the volume are cleared to 0

noprompt

Suppresses display of warnings and prompts


Program Return Value

0x00 SUCCESS command completed successfully

0x01 FAILURE bad command line arguments or operational failure

0x02 ADAPTER_NOT_FOUND adapter specified cannot be found


delete Command

The delete command deletes all IM, IME, and IS volumes and hot spare drives. No other controller configuration parameters are changed.

Example
cfggen controller-number delete [noprompt]

controller-number

Number of the SCSI bus or SAS controller targeted by this command

noprompt

Suppresses display of warnings and prompts


Program Return Value

0x00 SUCCESS command completed successfully

0x01 FAILURE bad command line arguments or operational failure

0x02 ADAPTER_NOT_FOUND adapter specified cannot be found


display Command

The display command displays configuration information for the supported LSI controllers. The information includes controller type, firmware version, BIOS version (version executed), volume information, and physical drive information. An example of the information that will be output by this command is provided below.



Note - 1 Mbyte = 1,048,576 bytes. All sizes displayed in Mbytes are rounded down to the nearest Mbyte.


Example
cfggen controller-number display [filename]

controller-number

Number of the SCSI bus or SAS controller targeted by this command

filename

Optional valid filename to store output of command to a file


Program Return Value

0x00 SUCCESS command completed successfully

0x01 FAILURE bad command line arguments or operational failure

0x02 ADAPTER_NOT_FOUND adapter specified cannot be found


Sample Output

The following example shows the output of the display command with an IM configuration on a SAS1068 controller.



Note - The format and content of the display command output might vary depending on the version being used.


Read configuration has been initiated for controller 0
------------------------------------------------------------------
Controller information
------------------------------------------------------------------
Controller type 	: SAS1068
BIOS version 	: 6.06.04.00
Firmware version 	: 0.09.03.219
Channel description 	: 1 Serial Attached SCSI
Initiator ID 	: 63
Maximum physical devices 	: 62
Concurrent commands supported 	: 511
Slot 	: 6
Bus 	: 3
Device 	: 1
Function 	: 0
RAID Support 	: Yes
------------------------------------------------------------------
IR Volume information
----------------------------------------------------------------
IR volume 1
Volume ID 	: 7
Status of volume 	: Okay (OKY)
RAID level 	: 1
Size (in MB) 	: 34332
Physical hard disks (Target ID) 	: 11 8
------------------------------------------------------------------
Physical device information
------------------------------------------------------------------
Initiator at ID #63
Target on ID #8
Device is a Hard disk
Slot # 	: 2
Target ID 	: 8
State 	: Online (ONL)
Size (in MB)/(in sectors) 	: 34732/71132960
Manufacturer 	: HP
Model Number 	: DG036A8B5B
Firmware Revision 	: HPD1
Serial No 	: B2G1P51003CD0501
Target on ID #9
Device is a Hard disk
Slot # 	: 3
Target ID 	: 9
State 	: Ready (RDY)
Size (in MB)/(in sectors) 	: 34732/71132960
Manufacturer 	: HP
Model Number 	: DG036A8B53
Firmware Revision 	: HPD3
Serial No 	: 3LC00NLK000085159S8A
Target on ID #10
Device is a Enclosure services device
Slot # 	: 10
Target ID 	: 10
State 	: Standby (SBY)
Manufacturer 	: HP
Model Number 	: MSA50 -10D25G1
Firmware Revision 	: 1.20
Serial No :
Target on ID #11
Device is a Hard disk
Slot # 	: 1
Target ID 	: 11
State 	: Online (ONL)
Size (in MB)/(in sectors) 	: 34732/71132960
Manufacturer 	: HP
Model Number 	: DG036A8B53
Firmware Revision 	: HP53
Serial No 	: 3LC01PSA00008515A1Y7
---------------------------------------------------------------
Enclosure information
---------------------------------------------------------------
Enclosure# 	: 1
Logical ID 	: 500605b0:0000f5d0
Numslots 	: 7
StartSlot 	: 2
Start TargetID 	: 0
Start Bus 	: 0
Enclosure# 	: 2
Logical ID 	: 500508b3:00a0535c
Numslots 	: 11
StartSlot 	: 0
Start TargetID 	: 0
Start Bus 	: 0
-----------------------------------------------------------------
TABLE 6-1 Logical drive status values:

Okay (OKY)

Volume is Active and drives are functioning properly. User data is protected if the volume is IM or IME

Degraded (DGD)

Volume is Active. User data is not fully protected due to a configuration change or drive failure

Rebuilding (RBLD)

Data resync or rebuild may be in progress

Inactive, Okay (OKY

Volume is inactive and drives are functioning properly. User data is protected if the current RAID level is RAID 1 (IM) or RAID 1E (IME).

Inactive, Degraded (DGD)

Volume is inactive and the user’s data is not fully protected due to a configuration change or drive failure; a data resync or rebuild may be in progress.


TABLE 6-2 Physical device status values:

Online (ONL)

Drive is operational and is part of a logical drive.

Hot Spare (HSP)

Drive is a hot spare that is available for replacing a failed drive in an array

Ready (RDY)

Drive is ready for use as a normal disk drive; or it is available to be assigned to a disk array or hot spare pool

Available (AVL)

Drive may or may not be ready, and it is not suitable for inclusion in an array or hot spare pool (i.e., it is not spun up, its block size is incorrect, or its media is removable)

Failed (FLD)

Drive was part of a logical drive or was a hot spare drive, and it failed. It has been taken offline

Standby (SBY)

This status is used to tag all non-hard drive devices.


hotspare command

The hotspare command creates a hot spare disk drive, which is added to hot spare pool 0. The number of disk drives in an IM, IME, or IS volume, including the hot spare disk cannot exceed six for LSI53C1020/1030 controllers and eight for LSI1064/1064E and LSI1068/1068E controllers. Only one hot spare disk can be created. The capacity of the hot spare disk must be greater than or equal to the capacity of the smallest disk in the logical drive. An easy way to verify this is to use the display Command.

The following rules must be observed when creating hot spare disks:

Example
cfggen controller-number hotspare <SCSI ID> [delete]
cfggen controller-number hotspare <enclosure:bay> [delete]

controller-number

Number of the SCSI bus or SAS controller targeted by this command

SCSI ID

SCSI ID of the drive targeted by this command

enclosure:bay

The enclosure:bay value for the disk drive to use for the new hotspare disk. These values can be obtained via the output of the DISPLAY command

[delete]

Optional delete action to specify that the hot spare drive with<SCSI ID> needs to be deleted.


Program Return Value

0x00 SUCCESS command completed successfully

0x01 FAILURE bad command line arguments or operational failure

0x02 ADAPTER_NOT_FOUND adapter specified cannot be found


list command

The LIST command displays a list of all controllers present in the system, along with their corresponding controller #.

Example
cfggen list
Parameters

None

Program Return Value

0x00 SUCCESS command completed successfully
0x01 FAILURE bad command line arguments or operational failure
0x02 ADAPTER_NOT_FOUND adapter specified cannot be found

Sample Output

Here is an example of the output of LIST command



Note - The format and fields in the output may vary on different versions):



Adapter Vendor Device Segment SubSys SubSys

Index Type ID ID ID Bus Device Func Ven ID Dev ID

----- --------- ------ ------ ------- --- ------ ---- ------ ------

0 53C1030 1000h 30h 0000h 02h 03h 00h 0e11h 00dah

1 53C1030 1000h 30h 0000h 02h 03h 01h 0e11h 00dah

2 SAS1068 1000h 54h 0000h 09h 02h 00h 1000h 3050h


rebuild command

The REBUILD command initiates a resync of drives in an IM or IME volume. This command is used to force a manual resync of drives in the volume even if the auto rebuild is turned off. This command is accomplished by bringing the secondary drive offline and bringing it online immediately there by kicking a resync. The volume status changes to Resyncing (RSY) upon successful execution.

Example
cfggen <controller #> rebuild <volume id>

controller-number

Number of the controller targeted by this command

volume id

A valid SCSI Id of a volume of type IM or IME


status noreset command

The STATUS RESET command displays the background command progress status for controller.

Example

cfggen 0 status noreset
Sample Output

See To View the Status of a RAID1 Volume.

status Command

The status command displays the status of any volume synchronization operation that is currently in progress on the controller. If no such operation is in progress, cfggen displays a message indicating this before it exits. The status command adds the flag Inactive to the Volume State field, if the controller firmware marks the volume as Inactive.

Example
cfggen controller-number status

controller-number

Number of the SCSI bus or SAS controller targeted by this command


Program Return Value

0x00 	SUCCESS 	command completed successfully
0x01 	FAILURE 	bad command line arguments or operational failure
0x02 	ADAPTER_NOT_FOUND 	adapter specified cannot be found

Sample Output

Here is an example of the status information returned when a volume resynchronization is in progress:


Background command progress status for controller 0...

IR Volume 1

Current operation : Synchronize

Volume ID : 6

Volume status : Enabled

Volume state : Degraded

Physical disk I/Os : Not quiesced

Volume size (in sectors) : 70311936

Number of remaining sectors : 68250624

Percentage complete : 2.93%


Here is an example of the status information returned when no background volume operation is in progress:


Background command progress status for controller 0...

IR Volume 1

Current operation : None

Volume ID : 6

Volume status : Enabled

Volume state : Optimal

Physical disk I/Os : Not quiesced


 

The status fields in the data displayed can have the following values:


Current operation - Synchronize or None

Volume status - Enabled or Disabled

Volume state - [Inactive] Optimal, Degraded or Failed

Physical disk I/Os - Quiesced or Not quiesced



Monitoring and Managing RAID Arrays

This section describes how to perform common task, such as create, rebuild, and monitor RAID0 and RAID1 arrays.

You must determine the controller numbers used. The controllers are enumerated starting with 0 based on bus location. Unless other LSI add-on cards have been installed, the controller number for the 1064 is 0. Otherwise, run the MPTutil to determine the order of the LSI controllers.

This section describes the following tasks:


procedure icon  To Create a RAID 0 Array

1. Check that no other arrays have been created for the desired controller with the status command.


> cfggen controller-number status

2. If there is an array present, delete the array as described in To Delete a RAID Array.

3. Determine the slot numbers of the desired drives and check the drives are ready with the display command.


> cfggen controller-number display

This command gives information about the controller, IR volume, physical devices, and enclosure. The slot numbers are located in the physical device information for each device. For RAID 0, at least two slot numbers are needed. An example of the physical device information is below.

The slot number and drive state are in bold:


Target on ID #1 
Device is a Hard disk 
Slot # : 1 
Target ID : 11
State : Ready (RDY) 

4. Create RAID0 array by using the create command:


> cfggen controller-number create IS size slot-numbers [noprompt]


The size is in Mbytes and, like the delete command, noprompt is optional. For example, to create a RAID0 array on controller 0 that is 512 MB on slots 0 and 1, type:


> cfggen 0 create IS 512 0 1


If an array already exists on the specified drives, the create command gives an error stating there are not enough resources.

5. Rerun the status command and verify that the new RAID0 volume is detected.

The command displays:


Current Operation: None
Volume Status: Enabled
Volume State: Optimal
Physical Disk I/Os: Not Quiesced


procedure icon  To Fail RAID 0

Make RAID0 fail by removing one of its drives.

1. Create a RAID0 array.

2. Remove one of the drives.

3. Check that RAID0 fails by executing the status command.

The command displays:


Current Operation: None
Volume Status: Enabled

Volume State: Failed

Physical Disk I/Os: Not Quiesced

4. Replace the drive with a new drive.

5. Verify that the drive still fails by executing the status command.

The command displays:


Current Operation: None
Volume Status: Enabled
Volume State: Failed
Physical Disk I/Os: Not Quiesced

6. Delete the array as described in To Delete a RAID Array.

7. Create RAID0 as described in To Create a RAID 0 Array.

8. Once the drive is created, check the status.

The command displays:


Current Operation: None

Volume Status: Enabled

Volume State: Optimal

Physical Disk I/Os: Not Quiesced



procedure icon  To Create a RAID 1 Array

Delete current RAID arrays and determine slot numbers for the desired drives as described in To Delete a RAID Array. For a RAID1 array, you need to specify two slot numbers.

1. Create the RAID1 array.

> cfggen controller-number create IM size slot-numbers [noprompt]

2. Verify the RAID1 has been created by running the status command.

The command displays:


Current Operation: None

Volume Status: Enabled

Volume State: Optimal

Physical Disk I/Os: Not Quiesced



procedure icon  To Rebuild a RAID 1 Array

1. Remove a drive.

2. Run the status command.

The command displays:


Current Operation: None

Volume Status: Enabled

Volume State: Degraded

Physical Disk I/Os: Not Quiesced


3. Insert the drive.

4. Run the display command.

The drive should have a volume state of Out of Sync.

5. Run the status command.

Depending on the size of the volumes, the status should be in one of two states:

If the drive is still in process of rebuilding, the command displays:


Current Operation: Synchronized
Volume Status: Enabled
Volume State: Degraded
Physical Disk I/Os: Not Quiesced
Percentage complete: x.xx%

If the drive is finished being rebuilt, the command displays:


Current Operation: None
Volume Status: Enabled
Volume State: Optimal
Physical Disk I/Os: Not Quiesced


procedure icon  To Delete a RAID Array

1. Verify that there is a RAID array present by running the status command.

2. Reboot the system.

3. Delete the RAID array.


> cfggen controller-number delete [noprompt]


If you use the noprompt option, the utility automatically deletes the arrays. Otherwise, the utility asks if it can continue with this command.

4. Verify that the array is deleted by running the status command.

The command reports that there are no volumes present.

5. Reboot the system.


procedure icon  To View the Status of a RAID1 Volume

Create a RAID1 volume using the cfggen 0 create im max 0 1 noprompt noreset command:

A:\>cfggen 0 create im max 1 2  noprompt
 
LSI Integrated RAID Configuration utility.  v2.02.00.00
You are about to create an IR volume.
Cfggen: Volume created successfully.

Use the cfggen 0 status noreset command to view the status:

a:\>cfggen 0 status noreset
LSI Integrated RAID Configuration utility.  v2.02.00.00
Background command progress status for controller 0...
IR Volume 1
  Current operation                       : Synchronize
  Volume ID                               : 1
  Volume status                           : Enabled
  Volume state                            : Degraded        
  Physical disk I/Os                      : Not quiesced
  Volume size (in sectors)                : 285155328
  Number of remaining sectors             : 285119999
  Percentage complete                     : 52.31%

When the process is complete, view the status as shown:

 
a:\>cfggen 0 status noreset
LSI Integrated RAID Configuration utility.  v2.02.00.00
Background command progress status for controller 0...
IR Volume 1
  Current operation                       : Synchronize
  Volume ID                               : 1
  Volume status                           : Enabled
  Volume state                            : Optimal        
  Physical disk I/Os                      : Not quiesced
  Volume size (in sectors)                : 285155328
  Number of remaining sectors             : 285119999