Appendix B. The raidcli Command-Line Interface

This appendix is a complete guide to the /usr/raid5/raidcli command (command-line interface, or CLI). It explains the raidcli parameters, which are summarized in Table B-1.

Table B-1. raidcli Parameters

Parameter

Use

bind

Bind (group) physical disks

chglun

Change parameters for a currently bound group

clearlog

Destroy the contents of the Challenge RAID storage controller's error log

clearstats

Reset statistics logging on the Challenge RAID storage-control processor (SP), setting all log counters to 0

getagent

Get names and descriptions of devices controlled by the SP

getcache

Get information about the storage-system caching environment

getcontrol

Get general system information

getcrus

Display status information on all system components, such as the fan module, battery backup unit, and so on

getdisk

Display status information on one disk module or all disk modules in the system

getlog

Display the SP log, in which errors are stored, or display the head and tail of the log

getlun

Display information about a disk group

getsp

Display firmware revision level and controller model number

setcache

Change information about the Challenge RAID controller's caching environment

setstats

Set statistics logging

unbind

Deconfigure physical disks from their current logical configuration, destroying all data on the logical unit (group)

The raidcli command sends Challenge RAID storage management and configuration requests to an application programming interface (API) on the Challenge server. For the raidcli command to function, the agent—an interpreter between the command-line interface and the Challenge RAID storage system—must be running.


Note: Although the directory is raid5, the command raidcli is valid for all RAID levels.

The syntax of the raidcli command is

raidcli [-vp] [-d device] parameter [optional_arguments]

In this syntax, options and variables have the following meanings:

-v 

Enables verbose return.

-p 

Parses the raidcli command without calling the API. If the string does not parse correctly, an error message is printed to stderr; otherwise there is no output.

-d device 

Target RAID device. Use raidcli getagent for a list of RAID devices. This switch must be present for all raidcli management and configuration commands unless the environment variable indicates otherwise. This switch overrides an environment variable.

The environment variable RaidAgentDevice is the default value for the device when none is specified with the -d flag. If RaidAgentDevice is not set and no -d switch is present, an error is generated on all commands that need device information. For example:

setenv RaidAgentDevice sc4d2l0
setenv RaidAgentDevice /dev/scsi/sc4d2l0

The /dev/scsi prefix is optional.

bind

The physical disk unit number is also known as the logical unit number, or LUN. The unit is a logical concept but is recognized as a physical disk unit by the operating system. The LUN is a hexadecimal number between 0 and 7.

Unlike standard disks, physical disk unit numbers (LUNs) lack a standard geometry. Disk capacity is not a fixed quantity between disk-array LUNs. The effective geometry of a disk-array LUN depends on the type of physical disks in the array and the number of physical disks in the LUN.


Note: Although bind returns immediate status for a RAID device, the bind does not complete for 15 to 60 minutes, depending on system traffic. Use getlun to monitor the progress of the bind; getlun returns the percent bound. When the bind is complete, each disk is noted as “Enabled” in the getlun output.

The command raidcli bind is used to group physical disks into RAID-0, RAID-1, RAID-1_0, RAID-3, or RAID-5 units or to create a hot spare:

raidcli -d device bind raid-type lun-number disk-names [optional-args]

Variables in this syntax are explained below.

-d device 

Target RAID device, as returned by raidcli getagent.

raid-type 

Choices are

  • r0: RAID-0

  • r1: RAID-1

  • r1_0: RAID-1_0

  • r3: RAID-3

  • r5: RAID-5

  • id: individual disk unit

  • hs: hot spare

lun-number 

Logical unit number to assign the unit (a hexadecimal number between 0 and 7).

disk-names 

Indicates which physical disks to bind, in the format bd, where b is the physical bus name (a through e; be sure to use lowercase) and d is the device number on the bus (0 through 3). For example, a0 represents the device 0 on bus A, and e2 represents device 2 on bus E.

A RAID-0 bind requires a minimum of 3 and a maximum of 16 disks.

A RAID-1 bind requires 2 disks on separate buses.

A RAID-1_0 bind requires an even number of disks (minimum 2; maximum 16). For high availability, a member of each image pair must be on a different bus. Select the disks in this order: first disk on first bus, first disk on second bus, second disk on first bus, second disk on second bus, third disk on first bus, third disk on second bus, and so on.

A RAID-3 or RAID-5 bind also requires separate buses, each with 5 disks. Legal RAID-3 or RAID-5 bind configurations are

  • a0 b0 c0 d0 e0

  • a1 b1 c1 d1 e1

  • a2 b2 c2 d2 e2

  • a3 b3 c3 d3 e3

A RAID-5 bind requires a minium of 3 disks and a maximum of 15 disks. For high availability, use groups of 5.

A hot spare bind requires 1 disk, which cannot be A0, B0, C0, D0, E0, or A3. The capacity of the hot spare must be at least as great as the capacity of the largest disk module it might replace.

All disks in a bind should have the same capacity, so that disk space is used fully.

The optional arguments are as follows:

-r rebuild-time 

Maximum time in hours to rebuild a replacement disk. Default is 4 hours; legal values are any number greater than or equal to 0.

A rebuild time of 2 hours rebuilds the disk more quickly but degrades response time slightly. A rebuild time of zero hours rebuilds as quickly as possible but degrades performance significantly.

If your site requires fast response time and you want to minimize degradation to normal I/O activity, you can extend the rebuilding process over a longer period of time, such as 24 hours. You can change the rebuild time later without damaging the information stored on the physical disk unit.


Caution: The LUN is not fault-tolerant during the rebuild; selecting a short rebuild time minimizes the chance of data loss.


-s stripe-size 

Number of blocks per physical disk in a RAID stripe. Default is 128; legal values are any number greater than zero.

The smaller the stripe element size, the more efficient the distribution of data read or written. However, if the stripe size is too small for a single host I/O operation, the operation requires accessing two stripes, thus causing the hardware to read and/or write from two disk modules instead of one. Generally, it is best to use the smallest stripe element size that will rarely force access to another stripe. The default stripe element size is 128 sectors. The size should be an even multiple of 16 sectors (8 KB). For RAID-3, the legal value is 1.


Note: This value is ignored for hot spares. For RAID-3 binds, the only legal value is 1.


-c cache-flags  

Values are

  • none: no caching

  • read: read caching only

  • write: write caching only

  • rw: read and write caching

The default is none. Caching is not specified for RAID-3.


Note: For more information on caching, see Chapter 7, “Caching.”


-z stripe-count 

Sets the number of stripes in a LUN. For example, if you bind a RAID-5 LUN with a stripe count of 2, you partition the LUN into two stripes, thus preventing access to the remaining available space. This option is useful for short bind operations. Legal values are any number greater than or equal to 0. The default value is 0, which binds the maximum number of stripes available.

-r3 raid3-memory-size 


Sets amount of RAID-3 memory to use for each LUN. This option is available only for firmware revision 9.0/SP model 7305 and higher and RAID agent 1.55 and higher.


Note: Before binding fast RAID-3 LUNs, you must set cache memory; see “setcache,” later in this appendix.


The following example binds disks A1, B1, C1, D1, and E1 into a RAID-5 logical unit with a logical unit number of 3, a four-hour maximum rebuild time, and a 128-block stripe size per physical disk, with read cache enabled:

raidcli -d sc4d2l0 bind r5 3 a1 b1 c1 d1 e1 -r 4 -s 128 -c read 

The following example binds disks A1, B1, C1, D1, and E1 into a RAID-3 LUN with a LUN number of 3, a four-hour maximum rebuild time, and a RAID-3 memory size of 6 MB. (this example presumes that memory has already been allocated with raidcli setcache.

raidcli -d sc4d2l0 bind r3 3 a1 b1 c1 d1 e1 -r 4 -r3 6

The following example binds A2 and B2 into a RAID-1 logical unit with a LUN number of 2 and a four-hour maximum rebuild time, with read cache enabled:

raidcli -d sc4d2l0 bind r1 2 a2 b2 -r 4 -c read

The following example binds disks A1, B1, C1, and D1 into a RAID-1_0 logical unit with a LUN number of 1, a four-hour maximum rebuild time, and a 128-block stripe size per physical disk, with read cache enabled:

raidcli -d sc4d2l0 bind r1_0 1 a1 b1 c1 d1 -r 4 -s 128 -c read

The following example binds A2, B2, C2, D2, and E2 into a RAID-0 logical unit with a LUN number of 3, and a 128-block stripe size per physical disk, with read cache enabled:

raidcli -d sc4d2l0 bind r0 3 a2 b2 c2 d2 e2 -s 128 -c read

The following example binds disk E3 as a hot spare with a LUN number of 7:

raidcli -d sc4d2l0 bind hs 7 e3

There is no output for raidcli with the bind parameter. Errors are printed to stderr.


Note: For complete messages, it is recommended that you use the -v option.


chglun

The command raidcli chglun is used to change parameters for a LUN:

raidcli -d device chglun [-l lun] [-c cache-flags] [-d default-owner] 
[-r rebuild-time] [-i idle-thresh] [-t idle-delay-time] [-w write-aside] 
[-a autotrespass] [-pf prefetch type] [-rt retention type] 
[-sc configure-read-cache] [-sm segment-size/multiplier] 
[-pm prefetch-size/multiplier] [-mp max-prefetch] [-pd prefetch-disable] 
[-pc prefetch-idle-count]


Note: Only root can use this parameter.

In this syntax, variables mean the following:

-l lun 

Logical unit number to be changed

-c cache-flags 

Values are

  • none: no caching

  • read: read caching

  • write: write caching

  • rw: read and write caching

The default is none.

-d default-owner 


Values are

  • 1: change SP ownership of LUN

  • 0: don't change ownership

If your storage system has dual SPs, see “Dual Interfaces, Load Balancing, and Device Names” in Chapter 4.

-r rebuild-time 

Maximum time in hours to rebuild a replacement disk. Default is four hours; legal values are any number greater than or equal to 0.

-i idle-thresh 

Maximum number of I/Os that can be outstanding to a LUN and have the LUN still be considered idle. Used to determine cache flush start time. Legal values are 0 to 255; the default is 0. A value of 255 leaves the previous setting unchanged.

-t idle-delay-time 


Amount of time in 100-ms intervals that a unit must be below idle-thresh to be considered idle. Once a unit is considered idle, any dirty pages in the cache can begin idle time flushing. Legal values are 0 to 255; the default is 20. A value of 255 leaves the previous setting unchanged.

-w write-aside 

The smallest write request size, in blocks, that bypasses the cache and goes directly to the disks. Legal values are 16 to 65535; the default is 2048. A value of 65535 leaves the previous setting unchanged.

-a autotrespass 

Enables or disables automatic failover and read/write access by both SPs to a LUN. Values are

  • 1: enable autotrespass for the specified LUN

  • 0: disable autotrespass for the specified LUN


Note: The default is 0, which is the recommended value.


-pf prefetch-type 

Values are

  • 0: disabled

  • 1: constant length

  • 2: variable length (default)


Note: See Table B-7 for an explanation of this and the remaining options for this command.


-rt retention-type 

Retention determines whether or not prefetched data has equal or favored priority over host-requested data when the read cache becomes full. Values are

  • 0: all data treated equally

  • 1: prefetched data retained over requested data (default)

-sc configure-read-cache  


Values are

  • 0: configure read cache according to parameters specified in the command string

  • 1: configure read cache according to default settings

-sm segment-size/multiplier  


Segment size or segment multiplier determines the size of the segments that make up a prefetch operation.

Legal values for segment size are 0 to 255; a value of 255 leaves the previous setting unchanged. Legal values for the segment multiplier are 1 to 32; the default is 4.

  • For constant-length prefetching, specify the segment size in blocks of data to prefetch in one read operation from the LUN.

  • For variable-length prefetching, specify the segment multiplier to calculate the size of the segment. For example:

    sgmtblocks = readrequestsize * sgmtmultiplier
    

You can specify a segment size that is equal to or less (but not greater) than the prefetch size. You can specify a segment multiplier that is equal to or less (but not greater) than the prefetch multiplier. If you specify a segment multiplier that is equal to the prefetch multiplier, prefetch operations are not divided into segments.

-pm prefetch-size/multiplier  


Prefetch size or prefetch multiplier determines the size of the segments that make up a prefetch operation. Legal values for prefetch size are 0 to 2048. Legal values for the prefetch multiplier are 1 to 32; the default is 4.

  • For constant-length prefetching, specify the size of the prefetch data in blocks.

  • For variable-length prefetching, specify the multiplier to calculate the prefetch length to fetch. For example:

    prefblocks = readrequestsize * prefmultiplier
    

-mp max-prefetch  


Maximum number of blocks to prefetch for variable-length prefetching.

  • For constant-length prefetching, all prefetches are of the constant length specified by the prefetch size and this field is ignored. Legal values are 0 to 2048; the default is 512.

  • For variable-length prefetching, specify the maximum number of blocks to prefetch in response to a read request.

-pd prefetch-disable  


Prefetch Disable specifies the minimum read request size at which the system disables prefetching. Legal values are 0 to 65535; the default is 129. Any value between 65280 and 65535 leaves the previous setting unchanged.

-pc prefetch idle count  


The maximum number of outstanding I/Os at which the LUN stops prefetching. Legal values are 0 to 100; the default is 40.

The following example changes LUN 3 to perform write caching and rebuild in four hours; it does not change the default owner:

raidcli -d sc4d2l0 chglun -l 3 -c write -d 0 -r 4

There is no output for raidcli with the chglun parameter. Errors are printed to stderr.

clearlog

The clearlog parameter destroys the contents of the Challenge RAID SP's error log. Its syntax is

raidcli -d device clearlog


Note: You must be root to use this parameter.

This command has no output.

clearstats

The clearstats parameter resets statistics logging on the Challenge RAID SP, resetting all log counters to 0. The command raidcli clearstats is used to reset statistics logging:

raidcli -d device clearstats


Note: You must be root to use this parameter.

This command has no output.

getagent

The command raidcli getagent is used to display information on devices controlled by the API:

raidcli getagent

The following is sample output for one device; normally, the output would give information on all devices:

Agent Rev: 1.55.0
Name: Disk Array
Desc: RAID5 Disk Array
Node: sc4d2l0
Signature:0xf3b51700
Peer Signature: 0x657e0a00
Revision: 9.3.0, Model: 7305 
SCSI Id: 1
Prom Rev: 1.55.0
SP Memory: 64
Serial No: 96-7240-808

Table B-2 summarizes entries in the raidcli getagent output.

Table B-2. Output of raidcli getagent

Entry

Meaning

Agent Rev

Revision number of RAID agent

 

Name

ASCII string found in the agent configuration, which that assigns a name to the node being accessed (see node description below)

Desc

ASCII string found in the agent configuration file, which describes the node being accessed (see node description below)

Node

The /dev/scsi entry that the agent uses as a path to the actual SCSI device; this value must be entered by the user for every CLI command (except getagent)

Signature

Unique 32-bit identifier for the SP being accessed through Node

Peer Signature

Unique 32-bit identifier for the other SP in the chassis; 0 if no additional SP is present

Revision

Revision of firmware currently running on the SP and model of the SP:

7305: PowerPC-based SP

7624: AMD-based SP

SCSI ID

SCSI ID number

Prom Rev

Current PROM revision on the SP

SP Memory

Amount of DDRAM present on the SP

Serial No

12-digit ASCII string that uniquely identifies this subsystem


getcache

If you use storage system caching, you can use the raidcli getcache command to get information on cache activity. The information in this command's output, particularly the percentage of cache hits, may help you decide on the most efficient cache page size and whether a physical disk unit really benefits from caching.

The command raidcli getcache is used to display cache information:

raidcli -d device getcache 

The following is sample output:

Usable Cache: 8
Page size: 2KB
Write Cache State: Enabled
Low Watermark; 75
High Watermark: 90
SP A Cache Pages: 2048
SP B Cache Pages: 2047
Unassigned Cache Pages: 0
Read Hit Ratio: 82
Write Hit Ratio: 74
Prct Dirty Cache Pages = 63
Prct Cache Pages Owned = 50
Prct Read Flushes = 10
Prct Write Flushes = 12
SPA Read Cache State enabled
SPB Read Cache State enabled
Minimum system memory allowed 2 MB
Physical memory size of spA = 8 MB
Physical memory size of spB =16 MB
System memory size of spA = 8 MB
System memory size of spB = 8 MB
Read Cache Size of spA = 3 MB
Read Cache Size of spB = 3 MB
Raid 3 memory size for spA = 2 MB
Raid 3 memory size for spB = 2 MB
Free Memory size of spA = 5 MB
Free Memory size of spB = 5 MB

Table B-3 summarizes entries in the raidcli getcache output.

Table B-3. Output of raidcli getcache

Entry

Meaning

Usable Cache

Size of cache in megabytes to use for caching, not greater than the SP memory size as displayed by raidcli getagent (see “getagent,” earlier in this appendix). Valid values are 0, 8, and 64. Defaults are 0 (user has selected to disable the cache) and 8 (user has selected to enable the cache).

The command-line interface does not let you specify more memory than you have. If you specify less than you have, the remaining memory is unused.

Page Size

User-specified page size in KB for caching; for example, 2 means a 2 KB page size.

Write Cache State

Enabled: SP is fully functional.

Disabled: SP not capable of or configured for caching.

Synching: SP is synchronizing its cache with the peer SP.

Enabling: cache is in the process of becoming enabled.

Quiescing: cache was enabled but system experienced a fault or was disabled by user. The system is now finishing processing outstanding I/O before saving the contents of the cache.

Frozen: SP has finished quiescing and is now waiting for peer SP to finish quiescing or dumping.

Dumping: SP is in the process of dumping contents of the cache to a private location on the disk.

Initing: SP is initializing.

Low Watermark

Percentage of dirty cache pages that, when reached during flush operations, causes the SP to cease flushing the cache.

Valid values are 0 through 100; the default is 50, regardless of whether caching is enabled or disabled.

High Watermark

Percentage of dirty cache pages which, when reached during flush operations, causes the SP to cease flushing the cache.

Valid values are 0 through 100; the setting must be greater than the low watermark. The default is 75, regardless of whether caching is enabled or disabled.

SP A Cache Pages

SP B Cache Pages

Total number of cache pages currently owned by SP A; each page has the cache page size selected when storage-system caching was set up. This number equals the cache size divided by the cache page size, minus space for checksum tables. If the storage system has two working SPs, they divide the total number of pages between them. If an SP is idle for a long period or fails, the active SP may increase its share of pages.

Unassigned Cache Pages

Number of dirty cache pages not owned by A or B. These can occur when a unit is broken and there are no disks to which to flush the dirty pages.

Read Hit Ratio

Percent of read requests to the SP that can be satisfied from the cache without requiring disk access.

Write Hit Ratio

Percent of write requests to the controller that can be satisfied with the cache without requiring disk access. A write cache hit occurs when the SP finds and modifies data in the write cache memory, which usually saves a write operation.

For example, a hit that occurs when a page is sought in a RAID 5 LUN eliminates the need to read, modify, and write the data. High ratios are desirable because each hit indicates at least one disk access that was not needed.

Prct Dirty Cache Pages

Percentage of pages that have been modified in the SP's write cache, but that have not yet been written to disk. A high percentage of dirty pages means the cache is handling many write requests.

Prct Cache Pages Owned

Percentage of cache pages owned by this controller when pages from other SP are taken into account.

Prct Read Flushes

Percentage of reads to SP that caused the cache to flush a page(s).

Prct Write Flushes

Percentage of writes to SP that caused the cache to flush a page(s).

SP Read Cache State

Enabled or Disabled.

Minimum system memory allowed

AMD-based SP: 2 MB; PowerPC-based SP: 4 MB.

Physical memory size of SP

Number of MB in SP's physical memory.

System memory size of SP

Number of MB in SP's system memory.

Read Cache Size of SP

Number of MB in SP's read cache.

Raid 3 memory size for SP

Number of MB allocated to RAID-3 memory.

Free Memory size of SP

Unassigned memory.


getcontrol

The command raidcli getcontrol is used to get general system information:

raidcli -d device getcontrol

A sample output of this command follows:

System Fault LED: OFF
Statistics Logging: ON
System Cache: ON
Max Requests: 23
Average Requests: 5
Hard errors: 0
Total Reads: 18345
Total Writes: 1304
Prct Busy: 25
Prct Idle: 75
System Date: 7/5/1996
Day of the week: Friday
System Time: 12:43:54
read_requests: 145
write_requests: 34642049
blocks_read: 1633
blocks_written: 363696414
sum_queue_lengths_seen_by_arrivals: 401
arrivals_to_non_zero_queue: 400
hw_flush_on: 0
idle_flush_on: 5314
lw_flush_off: 0
write_Cache_flushes: 98
write_cache_blocks_flushed: 1150
Internal bus 1 busy ticks: 429
Internal bus 1 busy ticks: 429
Internal bus 2 busy ticks: 429
Internal bus 2 busy ticks: 429
Internal bus 3 busy ticks: 429
Internal bus 3 busy ticks: 429
Internal bus 4 busy ticks: 429
Internal bus 4 busy ticks: 429
Internal bus 5 busy ticks: 429
Internal bus 5 busy ticks: 429
Controller busy ticks: 1403792
Controler idle ticks: 3775334

In the getcontrol output,

  • statistics logging is always turned on by the agent

  • hard errors are those returned to the host

  • total reads and writes are the totals as seen by the SP

  • system time is in 24-hour format

getcrus

The command raidcli getcrus displays state information on every field-replaceable unit in the Challenge RAID storage system except disks in the disk modules:

raidcli -d device getcrus

Sample output of this command follows.

FANA State: Present
FANB State: Present
VSCA State: Present
VSCB State: Present
VSCC State: Present
SPA State: Present
SPB State: Present
BBU State: Present

Table B-4 interprets items in this output. Values for all entries of the output are Present or Not Present, except as noted.

Table B-4. Output of raidcli getcrus

Output

Meaning

FANA, FANB

Fan banks A and B.

VSCA, VSCB

Power supply (voltage semi-regulated converter).

VSCC

Optional third power supply.

SPA

Storage control processor.

SPB

Optional second storage-control processor.

BBU

Battery backup unit, which has three states: Present (fully charged) and Not Present (removed or charging).

If the battery backup unit takes longer than an hour to charge, it shuts itself off and transitions to the “Faulted” state.


getdisk

The command raidcli getdisk displays information on all disks in the system, whether bound or not:

raidcli -d device getdisk 

For information on a particular disk, use

raidcli -d device getdisk [diskposition]

In this command, diskposition has the format bd, where b is the bus on which the disk is located (a through e) and d is the device number (0 through 3). Figure B-1 diagrams disk module locations.

Figure B-1. Disk Module Locations


For example, the following command retrieves information for disk A0:

raidcli -d sc4d2l0 getdisk a0

A sample output of this command follows.

A0 Vendor Id: <manufacturer> 
Ao Product Id: <part number>
A0 Lun: 0
A0 State: Bound and Not Assigned
A0 Hot Spare: NO
A0 Prct Rebuilt: 100
A0 Prct Bound: 100
A0 Serial Number: 00019699
A0 Capacity: 0x000f42a8
A0 Private: 0x00009000
A0 Bind Signature: 0x1c4eb2bc
A0 Hard Read Errors: 0
A0 Hard Write Errors: 0
A0 Soft Read Errors: 0
A0 Soft Write Errors: 0
A0 Read Retries: 0
A0 Write Retries: 0
A0 Remapped Sectors: 0
A0 Number of Reads: 1007602
A0 Number of Writes: 1152057

Table B-5 interprets items in this output.

Table B-5. Output of raidcli getdisk

Output

Meaning

Vendor Id

Manufacturer of disk drive

Product Id

Part number of disk

Lun

Logical unit number to which this disk is bound

State

Removed: disk is physically not present in the chassis or has been powered off

Off: disk is physically present in the chassis but is not spinning

Powering Up: disk is spinning and diagnostics are being run on it

Unbound: disk is healthy but is not part of a LUN

Bound and Not Assigned: disk is healthy, part of a LUN, but not being used by this SP

Rebuilding: disk is being rebuilt

Enabled: disk is healthy, bound, and being used by this SP

Binding: disk is in the process of being bound to a LUN

Formatting: disk is being formatted

Hot Spare

YES or NO

Prct Rebuilt

Percentage of disk that has been rebuilt

Prct Bound

Percentage of disk that has been bound

Serial Number

Serial number from disk inquiry command

Capacity

Actual disk capacity in blocks

Private

Amount of physical disk reserved for private space

Bind Signature

Unique value assigned to each disk in a logical unit at bind time

Hard Read Errors

Number of hard errors encountered on reads for this disk

Hard Write Errors

Number of hard errors encountered on writes for this disk

Soft Read Errors

Number of soft errors encountered on reads for this disk

Soft Write Errors

Number of soft errors encountered on writes for this disk

Read Retries

Number of retries occurring during reads

Write Retries

Number of retries occurring during writes

Remapped Sectors

Number of sectors that have been remapped

Number of Reads

Number of reads this disk has seen

Number of Writes

Number of writes this disk has seen


getlog

The SP maintains a log of event messages in its memory. These events include hard errors, startups, and shutdowns involving disk modules, fans, SPs, power supplies, and the battery backup unit. Periodically, the SP writes this log to disk to maintain it when SP power is off. The log can hold over 2,000 event messages; it has a filter feature that lets you select events by device or error message.

The event messages are in chronological order, with the most recent messages at the end. The command raidcli getlog is used to display the entire log:

raidcli -d device getlog [+N | -N] [-v]

The +N argument displays the newest n entries in the log, starting with the oldest entry:

raidcli -d device getlog +N

The -N argument displays the oldest N entries in the log, starting with the oldest entry:

raidcli -d device getlog -N

The following is a possible output of the command raidcli getlog +5:

12/17/96 09:59;51 A3: (A07) Cru Removed [0x47]
12/17/96 09:59;51 A3: (608) Cru Ready [0x0]
12/17/96 09:59;51 A3: (603) Cru Rebuild Started [0x0]
12/17/96 09:59;51 A3: (604) Cru Rebuild Complete [0x0]
12/17/96 09:59;51 A3: (602) Cru Enabled [0x0]

These entries show that a field-replaceable unit (disk module, fan unit, battery backup unit, SP) has been removed, replaced, rebuilt, and enabled.

At the tail of each log entry is an error code in brackets that gives diagnostic information when it is available. Table B-6 summarizes the error codes.

Table B-6. getlog Error Codes

Error Code

Explanation

0

No error

1

Invalid command-line parameters

2

Too few parameters

3

Too many parameters

4

Invalid bind type

5

Invalid LUN number

6

Invalid rebuild time

8

Invalid number of disks in bind command

9

Valid disk names are of format a0, b1, ... e3, etc.

10

Invalid stripe size

11

Invalid disk name

12

Invalid cache flags

13

Invalid default owner

14

Incorrect number of chglun parameters

15

Unable to determine name of target host system

16

Enable-disable flag invalid

17

Invalid usable cache size

18

Invalid page size

19

Invalid watermark value

20

High watermark less than low watermark

21

No device name listed

22

Invalid idle threshold

23

Invalid idle delay

24

Invalid write aside size

25

Disks must be on separate buses for bind

26

The agent was unable to configure any devices

27

LUN does not exist

28

LUN already exists

29

Cannot get current working directory for firmware command

50

Agent encountered an error during SCSI execution

51

Agent encountered an error during serial port execution

52

Agent returned an operating system error

53

Agent returned an internal agent error code

54

Cannot communicate with agent

55

RPC error encountered

More detailed descriptions of the above errors can be seen when verbose mode is enabled ( -v).

getlun

The command raidcli getlun is used to display information on a logical unit and the components in it. The syntax is

raidcli -d device getlun lun-number

The following example displays information about LUN 0:

raidcli -d sc4d2l0 getlun 0


Note: If numbers in the output look unreasonable, particularly for numerical statistics such as Queue Max, use clearstats to reset all statistics.

Below is truncated output for a RAID-5 group of five disks.


Note: Information on individual disks is not displayed unless statistics logging is enabled with raidcli setstats. See “getcontrol” earlier in this appendix.


Prefetch size multiplier = 4
Segment size/multiplier = 4
Maximum prefetch = 512
Prefetch Disable = 129
Prefetch idle content = 40

Variable length prefetching
Prefetch data retained
Read cache configured according to specified parameters
Read Histogram[1] 194560
Write Histogram[1] 1945 60
Write Histogram[6053104] 1945 60
Write Histogram[10186] 1945 60
Write Histogram[6053103] 1945 60
Write Histogram[12109245] 1945 60
Write Histogram[0] 1945 60
Write Histogram[0] 1945 60
Write Histogram[0] 1945 60
Write Histogram[0] 1945 60
Write Histogram[0] 1945 60
Read Histogram[5] 1945 60
Read Histogram[0] 1945 60
Read Histogram[2] 1945 60
Read Histogram[2] 1945 60
Read Histogram[0] 1945 60
Read Histogram[0] 1945 60
Read Histogram[0] 1945 60
Read Histogram[0] 1945 60
Read Histogram[0] 1945 60
Read histogram overflows 0
Write Histogram[1] 194560
Write Histogram[6053104] 194560
Write Histogram[10186] 194560
Write Histogram[6053103] 194560
Write Histogram[12109245] 194560
Write Histogram[0] 194560
Write Histogram[0] 194560
Write Histogram[0] 194560
Write Histogram[0] 194560
Write Histogram[0] 194560
Write histogram overflows 0
Read requests 10
Write Requests 24225638
Blocks read 61
Blocks written
Read cache hits 4
Read cache misses 6
Prefetched blocks 51
Unused prefetched blocks 0
Write cache hits 24225043
Forced flushes 0
Type: RAID5
Stripe size: 128
Capacity: 0x10000
Current owner: YES
Auto-trespass: Disabled
Auto-assign; Enabled
Write cache: Disabled
Read cache: Disabled
Idle Threshold: 0
Idle Delay Time: 20
Write Aside Size: 2048
Default Owner: YES
Rebuild Time: 0
Read Hit Ratio: 0
Write Hit Ratio: 0
Prct Reads Forced Flushed: 0
Prct Writes Forced Flushed: 0
Prct Rebuilt: 100
Prct Bound: 100

A0 Enabled
A0 Reads: 62667
A0 Writes: 29248
A0 Blocks Read: 3212517
A0 Blocks Written: 471642
A0 Queue Max: 26
A0 Queue Avg: 1
A0 Avg Service Time: 14
A0 Prct Idle: 100
A0 Prct Busy: 0
A0 Remapped Sectors: 0
A0 Read Retries: 50
A0 Write Retries: 0

B0 Enabled
B0 Reads: 66946
[etc.]

C0 Enabled
C0 Reads: 69342
[etc.]

D0 Enabled
D0 Reads: 68558
[etc.]

E0 Enabled
Eo Reads: 69721
[etc.]

Table B-7 summarizes entries in the raidcli getlun output.

Table B-7. Output of raidcli getlun

Entry

Meaning

Prefetch size/multiplier

For prefetching (read-ahead caching), prefetch size and multiplier determine the amount of data prefetched for one host read request. For constant-length prefetching, the prefetch size is the number of blocks to prefetch. The range for the prefetch size is 1-2048 blocks. The range for the prefetch multiplier is 1-32; the default is 4. For more details, see “Changing LUN Parameters” in Chapter 8.

Segment size/multiplier

Segment size and multiplier determine the size of the segments that make up a prefetch operation. An SP reads one segment at a time from the LUN because smaller prefetch requests interfere less with other host requests. The range for the segment size is 0-254 blocks. The range for the prefetch multiplier is 1-32; the default is 4.

Maximum prefetch

Maximum number of blocks to prefetch for variable-length prefetching. The range is 1-2048; the default is 512 sectors.

Prefetch Disable

Number read request sectors that disables prefetch; this number is so large that prefetching data would not be beneficial; for example, if the amount of requested data is equal to or greater than the size of the read cache. The range is 1-65279; the default is 129.

Prefetch idle content

Leave this parameter set to 40 (the default).

Variable/Constant length prefetching

Prefetch type: determines whether to prefetch data of a variable or constant length or to disable prefetching. The default is variable-length prefetching.

Prefetch data retained

Retention determines whether or not prefetched data has equal or favored priority over host-requested data when the read cache becomes full. The default is Favor prefetch, which is suitable for most applications.

Type

RAID0: nonredundant individual access array
RAID1: mirrored pair
RAID10: mirrored RAID-0 group (RAID-1_0)
RAID3: parallel access array
RAID5: individual access array
DISK: individual disk unit
SPARE: hot spare
UNKNOWN: disk was bound in a firmware version that is not compatible with the current firmware version

Stripe Size

Sectors per disk per stripe with which the unit was bound

Capacity

Number of sectors total for use by user

Current owner

YES if this SP owns the unit; NO if it does not

Set with chglun; see “Dual Interfaces, Load Balancing, and Device Names” in Chapter 4

Auto-trespass

Enabled or Disabled; Disabled is recommended

Auto-assign

Enabled or Disabled; Disabled is recommended

Write Cache

Enabled means this LUN is write caching; otherwise, Disabled

Read Cache

Enabled means this LUN is read caching; otherwise, Disabled

Idle Threshold

Maximum number of I/Os outstanding; determines cache flush start time; set with chglun

Idle Delay Time

Amount of time in 100-ms intervals that unit is below idle threshold; set with chglun

Write Aside Size

Smallest write-request size in blocks that can bypass the cache and go directly to the disk; set with chglun

Default Owner

YES if this SP is the default owner (not necessarily current owner) of this LUN, otherwise, NO

Rebuild Time

Amount of time in hours in which a rebuild should be performed. 0 means rebuild as fast as possible, but means a degradation in host I/O performance

Read Hit Ratio

Percentage of read requests to the controller that can be satisfied from the cache without requiring disk access

Write Hit Ratio

Percentage of write requests to the cache that can be satisfied with the cache without requiring a disk access

Prct Reads Forced Flushed

Percentage of read requests that flushed the cache

Prct Writes Forced Flushed

Percentage of write requests that flushed the cache

Prct Rebuilt

Percentage complete during a rebuild

Prct Bound

Percentage complete during a bind

Diskname State

Enabled, Binding, etc. (same as for getdisk)

Diskname Reads

Total number of reads this disk has done

Diskname Writes

Total number of writes this disk has done

Diskname Blocks Read

Total number of blocks this disk has read

Diskname Blocks Written

Total number of blocks this disk has written

Diskname: Queue Max

Maximum number of I/Os queued up to this drive

Diskname: Queue Avg

Average number of I/Os queued up to this drive

Diskname: Avg Service Time

Average service time in milliseconds

Diskname: Prct Idle

Percentage of time disk is not servicing request

Diskname: Prct Busy

Percentage of time disk is servicing request

Diskname: Remapped Sectors

Number of remaps that have occurred on this disk

Diskname Read Retries

Number of read retries that have occurred on this disk

Diskname Write Retries

Number of write retries that have occurred on this disk


getsp

The getsp parameter returns the firmware (FLARE) revision number and the SP model number for the specified device:

raidcli -d device getsp

In the output, Model 7624 is the AMD-based SP and Model 7305 is the PowerPC-based SP. Example output:

Revision 8.20.0, Model: 7624

For systems containing many Challenge RAID chassis assemblies, this parameter is especially useful as an alternative to raidcli getagent when the firmware revision number and model number of a specific SP is desired.

This parameter is available for RAID agent 1.55 and later.

setcache

The cache parameters you specify for the entire storage system are the cache size of 8 or 64 MB, depending on the amount of memory the SP has, and the cache page size, as 2, 4, 8, or 16 KB.

The command raidcli setcache is used to set up caching:

raidcli -d device setcache enable | disable [-u usable] [-p page] 
[-l low] [-h high] [-sma system-memory-SPA] [-smb system-memory-SPB]
[-sta read-cache-state-SPA] [-stb read-cache-state-SPB] 
[-rca read-cache-size-SPA] [-rcb read-cache-size-SPB] [-r3 raid3-memory-size] 

In this syntax, variables have the following meanings:

enable | disable  

Enter 1 to enable write caching or 0 to disable write caching.


Note: When enable/disable is the only option used with setcache, 1 enables system read and write cache and 0 disables system read and write cache.

Using setcache 1 with options takes 45 seconds while cache states are disabled; cache dumping might take some time.

-u usable 

Size in megabytes to use for caching, not greater than the SP memory size as displayed by raidcli getagent (see “getagent,” earlier in this appendix). Valid values are 0 through 64 in increments of 1 MB.

The command-line interface does not let you specify more memory than you have. If you specify less than you have, the remaining memory is unused.


Note: For mirrored caching, both SPs must have the same amount of cache memory in order for caching to be preserved in the event of shutdown or other power loss.


-p page 

Size in KB of pages into which to partition the cache. Valid sizes are 2, 4, 8, and 16. The default is 2, regardless of whether caching is enabled or disabled.

Generally, set cache page size to 8 KB for IRIX file server applications and 2 KB or 4 KB for database applications.

-l low 

Percentage of cache full that discontinues flushing. Valid values are 0 through 100; the default is 50, regardless of whether caching is enabled or disabled.

-h high  

Percentage of cache full that initiates flushing. Valid values are 0 through 100; the setting must be greater than the low watermark. The default is 75, regardless of whether caching is enabled or disabled.

-sma system-memory-SPA, -smb system-memory-SPB  


Sets the system memory on SP A or B, respectively.


Note: This option reboots each SP in the system. Rebooting takes several minutes, during which raidcli getagent is the only command accepted. When the reboot completes, stop and restart the agent before any raidcli commands are accepted.


-sta read-cache-state-SPA, stb read-cache-state-SPB  


Sets the read cache state for SP A or B, respectively: 0 to disable, 1 to enable.

-rca read-cache-size-SPA, -rcb read-cache-size-SPB  


Sets the read cache size in MB for SP A and B, respectively.


Note: You can change the write cache size only if the write cache is disabled and there are no unassigned dirty pages.


-r3 raid3-memory-size  


Sets the fast RAID-3 memory size for this SP and its peer SP (if present). When this option is used, all options other than enable/disable are ignored. If the peer SP is present and the configuration requires failover, you must allocate twice as much memory; for example, if 6 MB were required for a RAID-3 LUN, you must allocate 12 MB with this option.


Note: This option reboots each SP in the chassis. The reboot process takes several minutes, during which no commands are accepted except raidcli getagent. When the reboot completes, you must stop and restart the agent before any commands are accepted.



Note: The sum of an SP's write cache size, system memory size, and read cache size must be less than or equal to the SP's physical memory size.

This command has no output.

You can change the cache size, the cache page size values, or the type of caching for any physical disk unit without affecting the information stored on it. Follow these steps:

  1. Disable the cache:

    raidcli -d device setcache 0 
    

  2. Wait for the cache memory to be written to disk, which may take several minutes.

  3. Reassign cache size and re-enable caching:

    raidcli -d device setcache 1 -u 64 [parameters] 
    


Note: Before changing a cache parameter, you must always disable the cache.

The following command sets cache memory for fast RAID-3 at 16 MB, which is sufficient for two SPs at 8 MB each in a failover system:

setcache -d sc4d2l0 1 -r3 16

The following example enables the system cache with an 8 MB cache partitioned into 8 KB pages, with a 50% low watermark value and a 75% high watermark value:

setcache -d sc4d2l0 1 -u 8 -p 8 -l 50 -h 75

setstats

The setstats parameter sets statistics logging:

raidcli setstats [-on | -off]

If no optional switch is present, this command returns the current state of statistics logging.

You must be root to use this parameter.

The command raidcli setstats -on enables statistics logging; raidcli setstats -off disables it. With the optional switch, this command has no output.

If statistics logging is off, certain options in other commands are disabled. The option descriptions for these other commands specify whether statistics logging must be on for their options to be valid.

unbind

The unbind parameter unconfigures physical disks from their current logical configuration into LUNs.


Caution: This parameter destroys all data on the LUN (disk group).

You must be root to use this parameter. The command prompts you for verification before issuing the unbind, unless you override it with the -o flag.

The command raidcli unbind is used to unbind disks:

raidcli -d device unbind lun-number [-o]

In this syntax, variables and options mean:

lun-number 

Number of the logical unit (LUN) to deconfigure.

-o 

When raidcli unbind is entered, a prompt appears asking the user for verification before the unbind is issued. This flag disables this prompt.

This command has no output.

The following example destroys LUN 3 and frees its disks to be reconfigured, with no prompting to the user:

unbind -d sc4d2l0 3 -o