tw_cli(8)
- AMCC/3ware Storage Controller Management Command Line Interface.
tw_cli Interactive Mode tw_cli -f file Process from a file tw_cli command Process single command (batch mode)
tw_cli(8) is a Command Line Interface Storage Management Software for AMCC/3ware ATA RAID Controller(s). It provides controller, logical unit and drive management. tw_cli can be used in both interactive and batch mode, providing higher-level API (Application Programming Interface) functionalities.
As a way of synchronizing terminologies, logical units (a.k.a. units) are block devices presented to operating systems. A logical unit can be a one-tier, two-tier, or three-tier arrangement. JBOD, spare, and single logical units are examples of one-tier units. RAID-1 and RAID-5 are examples of two-tier units and as such will have sub-units. RAID-10 and RAID-50 are examples of three-tier units and as such will have sub-sub-units. A controller has one or many ports (typically 4, 8, 12). Each port is connected to zero or one disk drive.
CLI also supports comments. Command lines beginning with # denotes start of comment. This feature is mostly useful with batch processing via -f script flag.
CLI prompt indicates the current object in focus, expressed in URI (Universal Resource Identifier) syntax consisting of a hostname (//hostname), and an object path (/path/path/object) such as //elvis/c0/u0. User can set the focus to a particular object by focus URI.
In this version of the CLI release, the tw_cli supports a set of primary command syntax (so called new command syntax) and a set of legacy command syntax (so called old command syntax or original command syntax). Note: we reserve the right to discontinue the legacy command syntax in the future releases.
The primary command syntax will replace the legacy command syntax in the future releases. This new and improved command format follows a general grammar in the form:
Object Message Attributes
Objects are either shell commands or specify a certain controller, logical unit, port (drive), or battery backup unit (bbu). Messages are commands sent to the requested objects and will be a read operation such as show or write operation such as set, delete, add, stop, start, or export. Attributes specify what values to read or write. Attributes are either Boolean Attributes or Named Attributes. Value of a Boolean attribute is deduced by presence or not. Value of named attributes are expressed in a ``key = value'' format.
Shell Object Messages are commands (a.k.a. methods/messages) that are sent to the Command Interpreter (a.k.a. Shell/CLI) itself.
Typical output looks like:
//localhost> show
Ctl Model Ports Drives Units NotOpt RRate VRate BBU -------------------------------------------------------------------------------- c0 7500-12 12 8 3 1 2 - - c1 9506S-12 12 6 1 0 3 5 TESTING
Indicating that Controller 0 is a 7500 model with 12 Ports, with 8 Drives detected (attached), total of 1 Units, with one unit in a NotOpt (Not Optimal) state, RRate(Rebuild Rate) of 2, VRate(Verify Rate) of '-' (Not Applicable), BBU of '-' (Not Applicable). Not Optimal refers to any state except OK and VERIFYING. Other states include INITIALIZING, INIT-PAUSED, REBUILDING, REBUILD-PAUSED, DEGRADED, MIGRATING, MIGRATE-PAUSED, RECOVERY, INOPERABLE, and UNKOWN.
For example:
//localhost> show ver
CLI Version = 2.00.00.0xx API Version = 2.00.00.0xx
//localhost>
//hostname/c0/u0 show
Instead, if the focus is set to //hostname/c0/u0, the prompt is changed automatically to reflect this and the user would only have to type show. The concept is similar to being in a particular location in a file system and requesting a listing of the current directory.
object can have the following forms:
//hostname/cx/ux specifies the fully qualified URI of an object on host hostname, controller cx, unit ux.
//hostname specifies root of host hostname. The hostname is the name of the system where your 3ware RAID controllers are. With current releases, the hostname here should be always your system's name.
.. specifies one level up (the parent object).
/ specifies the root at the current focused host.
./obj specifies the next level of the object.
/c0/bbu specifies a relative path with respect to the current focused hostname.
For example:
//localhost> focus //elvis.amcc.com //elvis.amcc.com>
//elvis.amcc.com> focus /c0/u0 //elvis.amcc.com/c0/u0>
//elvis.amcc.com/c0/u0> focus .. //elvis.amcc.com/c0>
//elvis.amcc.com/c0> focus ./u0 //elvis.amcc.com/c0/u0>
//elvis.amcc.com/c0> focus / //elvis.amcc.com>
Note that focus is available as default. You can also set TW_CLI_INPUT_STYLE=OLD in the following to disable the feature.
If Bash, then "export TW_CLI_INPUT_STYLE=OLD" If csh, then "setenv TW_CLI_INPUT_STYLE OLD" If Windows, then "set TW_CLI_INPUT_STYLE=OLD"
Controller Object Messages are commands (a.k.a. methods/messages) that are sent to an instance of a controller such as /c0.
The Unit summary section lists all present units specifying their Unit Number, Unit type (such RAID 5), Status, usable capacity in Giga (or Tera) Bytes, number of blocks and unit status such as OK, VERIFYING, INITIALIZING, etc. %Compl reports percent completion of REBUILDING or VERIFYING, etc., units.
Note: If a ``*'' appears at the end of the status, it means one of its sub-unit is in WARNING state which a recoverable error might be found in the corresponding port.
The Port summary section lists all present ports specifying the port number, disk status, unit affiliation, size (in human readable and blocks of 512 bytes), and disk vendor assigned serial number.
The BBU summary section lists a few important attributes such as hours left (in which the current BBU can backup the controller cache in the event of power loss), temperature, voltage, and its readiness, etc.
Additional attributes about controllers, units, ports and disks can be obtained by querying for them explicitly. See other show sub-commands below.
Typical output looks like:
//localhost> /c0 show
Unit UnitType Status %Cmpl Stripe Size(GB) Cache AVerify IgnECC ------------------------------------------------------------------------------------ u0 RAID-1 OK - - 149.05 ON OFF OFF u1 RAID-5 OK - 64k 298.22 ON OFF OFF u2 SPARE OK - - 149.05 ON OFF - Port Status Unit Size Blocks Serial --------------------------------------------------------------- p0 OK u0 149.05 GB 312581808 3JS0TF14 p1 OK u0 149.05 GB 312581808 3JS0TETZ p2 OK u1 149.05 GB 312581808 3JS0VG85 p3 OK u1 149.05 GB 312581808 3JS0VGCY p4 OK u1 149.05 GB 312581808 3JS0VGGQ p5 OK u2 149.05 GB 312581808 3JS0VH1P p6 OK - 149.05 GB 312581808 3JS0TF0P p7 OK - 149.05 GB 312581808 3JS0VF43 p8 OK - 149.05 GB 312581808 3JS0VG8D p9 NOT-PRESENT - - - - p10 NOT-PRESENT - - - - p11 NOT-PRESENT - - - -
Name OnlineState BBUReady Status Volt Temp Hours LastCapTest --------------------------------------------------------------------------- bbu On Yes OK OK OK 241 22-Jun-2004
Example:
//localhost> /c0 show driver /c0 Driver Version = 1.02.00.036
Example:
//localhost> /c0 show model /c0 Model = 7500-12
Example:
//localhost> /c0 show firmware /c0 Firmware Version = FGXX 2.01.00.025
Example:
//localhost> /c0 show bios /c0 BIOS Version = BG9X 2.01.00.026
Example:
//localhost> /c0 show monitor /c0 Monitor Version = BLDR 1.00.00.008
Example:
//localhost> /c0 show serial /c0 Serial Number = F12705A3240009
Example:
//localhost> /c0 show pcb /c0 PCB Version = Rev3
Example:
//localhost> /c0 show pchip
/c0 PCHIP Version = 1.30-33
Example:
//localhost> /c0 show achip
/c0 ACHIP Version = 3.20
Example:
//localhost> /c0 show numports
/c0 Number of Ports = 12
Example:
//localhost> /c0 show numunits
/c0 Number of Units = 1
disk(s)
will not be detected unless
I/O is performed against the disk. See /cx/px show smart for a workaround.
Example:
//localhost> /c0 show numdrives
/c0 Number of Drives = 5
Example:
//localhost> /c0 show exportjbod
/c0 JBOD Export Policy = Not Supported.
//localhost> /c1 show exportjbod
/c1 JBOD Export Policy = on
Example:
//localhost> /c0 show spinup
/c0 Disk Spinup Policy = 1
Example:
//localhost> /c0 show ondegrade
/c0 Cache on Degraded Policy = Follow Unit Policy
Example:
//localhost> /c0 show stagger
/c0 Spinup Stagger Time Policy (sec) = 2
This feature is useful for operating systems limited to 2 TB filesystems. For 64-bit OS users, there is no need to set the policy to be ``on'' unless users want to have multiple smaller volumes to the OS. For 32-bit OS users, it is recommended to keep the policy on unless users know their OS supports more than 2 TB disk devices.
When autocarve policy is off, all the new unit creation consists of one single volume.
Example:
//localhost> /c0 show autocarve
/c0 Auto-Carving Policy = on
Example:
//localhost> /c0 show carvesize
/c0 Auto-Carving Size = 2000 GB
Example:
//localhost> /c0 show memory
/c0 Memory Installed = 112MB
Example:
//localhost> /c0 show ctlbus
/c0 Controller Bus Type = PCIX /c0 Controller Bus Width = 64 bits /c0 Controller Bus Speed = 133 Mhz
1. Smallest usable capacity spare.
2. Smallest usable unconfigured drive.
3. Smallest usable capacity failed drive.
If the policy is disabled, spare drives are the only candidates for an automatic rebuild operation.
Example:
//localhost> /c0 show autorebuild
/c0 Auto-Rebuild Policy = on
Example:
//localhost> /cx show unitstatus
Unit UnitType Status %Cmpl Stripe Size(GB) Cache AVerify IgnECC ------------------------------------------------------------------------------ u0 RAID-5 OK - 64K 223.485 OFF OFF ON u1 JBOD OK - - 76.3352 OFF OFF - u2 RAID-0 OK - 64K 148.99 ON ON -
Example:
//localhost> /c0 show allunitstatus
/c0 Total Optimal Units = 2 /c0 Not Optimal Units = 0
Example:
//localhost> /c0 show drivestatus
Port Status Unit Size Blocks Serial --------------------------------------------------------------- p0 OK u0 149.05 GB 312581808 3JS0TF14 p1 OK u0 149.05 GB 312581808 3JS0TETZ p2 OK u1 149.05 GB 312581808 3JS0VG85 p3 OK u1 149.05 GB 312581808 3JS0VGCY p4 OK u1 149.05 GB 312581808 3JS0VGGQ p5 OK u2 149.05 GB 312581808 3JS0VH1P p6 OK - 149.05 GB 312581808 3JS0TF0P p7 OK - 149.05 GB 312581808 3JS0VF43 p8 OK - 149.05 GB 312581808 3JS0VG8D p9 NOT-PRESENT - - - - p10 NOT-PRESENT - - - - p11 NOT-PRESENT - - - -
Upon the success of the new unit creation, a unique serial number is also assigned to the new unit. Please refer to commands /cx/ux show serial for checking.
Note: The default of the unit creation sets write cache to ``on'' for performance reason. However, if there is no BBU available for the controller, a warning is sent to standard error.
Since this command is by far the richest command, it deserves more details.
/cx is the controller name as in /c0, /c1, etc.
type=RaidType consists of logical unit type as in raid0, raid1, raid5, raid10, raid50, single, spare, and JBOD (7000/8000 only).
For example type=raid50.
The following table illustrates supported types and controller models.
Model | Raid0 | Raid1 | Raid5 | Raid10 | JBOD | Spare | Raid50 | Single | ------+-------+-------+-------+--------+------+-------+--------+--------+ 7K/8K | Y | Y | Y | Y | Y | Y | N | N | ------+-------+-------+-------+--------+------+-------+--------+--------+ 9K | Y | Y | Y | Y | N | Y | Y | Y | ------+-------+-------+-------+--------+------+-------+--------+--------+
disk=p:-p consists of a list of ports (disks) to be used in the construction of the specified unit type. One or more ports can be specified. Multiple ports can be specified using ``:'' or ``-'' as port index separators. A dash indicates a range and can be mixed with ``:''. For example disk=0:1:2-5:9:12 indicates port 0, 1, 2 thru 5 (inclusive), 9 and 12.
stripe=Stripe consists of the stripe size to be used. The following table illustrates the supported and applicable stripes on unit types and controller models. Stripe size of units are in K (kilo bytes).
Model | Raid0 | Raid1 | Raid5 | Raid10 | JBOD | Spare | Raid50 | Single | ------+---------+--------+--------+---------+------+-------+--------+--------+ 7K/8K | 64 | N/A | 64 | 64 | N/A | N/A | N/S | N/S | | 128 | | | 128 | | | | | | 256 | | | 256 | | | | | | 512 | | | 512 | | | | | | 1024 | | | 1024 | | | | | ------+---------+--------+--------+---------+------+-------+--------+--------+ 9K | 16 | N/A | 16 | 16 | N/A | N/A | 16 | N/A | | 64 | | 64 | 64 | | | 64 | | | 256 | | 256 | 256 | | | 256 | | ------+---------+--------+--------+---------+------+-------+--------+--------+
group=3|4|5|6|7|8 consists of the number of disks per group for a Raid 50 type. Note, this attribute can only be used when type=raid50.
Recall that a RAID-50 is a multi-tier array. At the most bottom layer, N number of disks per group are used to form the RAID-5 layer. These RAID-5 arrays are then integrated into a RAID-0. This attribute allows you to specify the number of disks in the RAID-5 level. Valid values are 3, 4, 5, 6, 7 and 8.
Note that a sufficient number of disks are required for a given pattern or disk group. For example, given 6 disks, specifying 3 will create two RAID-5. However given 12 disks, specifying 3 will create four RAID-5 under the RAID-0 level. Given 6 disks and grouping of 6 is not allowed, as you'll basically be creating a RAID-5.
The default group varies based on number of disks. For 6 & 9 disks, default is group=3. For 8 disks, default is group=4. For 10 or 15 disks, default is group=5. For 12 or 16 disks, default is group=4. For 14 disks, default is group=7. Case of 12 disks could be grouped with group=3, group=4, or group=6. Group=4 was set by default as it provides best net capacity and performance. Case of 15 disks could be grouped with group=3 or group=5. And case of 16 disks could be grouped with group=4 and group=8.
noscan attribute instructs CLI not to notify OS of creation of the new unit. By default CLI will inform the OS. One application of this feature is to avoid the OS from creating block special devices such as /dev/sdb and /dev/sdc as some implementations might create naming fragmentation and creating a moving target.
nocache attribute instructs CLI disable the write cache on the newly created unit. Enabling write cache increases performance at the cost of high-availability. No cache is recommended when no BBU or UPS is installed.
autoverify attribute enables the autoverify attribute on the unit that is to be created. For more details on this feature, refer to cx/ux set Commands section of this document. This feature is not supported on model 7000/8000. On model 9000, JBOD autoverify attribute is not persistent (does not survive reboots).
ignoreECC attribute enables the ignoreECC/OverwriteECC attribute on the unit that is to be created. For more details on this feature, refer to cx/ux set Commands section of this document. The following table illustrates the supported Model-Unit Type. This table only applies to setting this feature at unit creation time. Generally ignoreECC applies to redundant units.
Model | Raid0 | Raid1 | Raid5 | Raid10 | JBOD | Spare | Raid50 | Single | ------+-------+-------+-------+--------+------+-------+--------+--------+ 7K/8K | N | N | N | N | N | N | N | N | ------+-------+-------+-------+--------+------+-------+--------+--------+ 9K | N | Y | Y | Y | N | N | Y | N | ------+-------+-------+-------+--------+------+-------+--------+--------+
name=string attribute allows user to name the new unit. The maximum characters allowed for the string are 21. No space is allowed within the string. If user likes to use some special characters which the OS command shell reserves such as '<', '>', '!', and '&', etc in the name string, the user has to use quote ``'' around the name string in order to bypass the command shell. User can change the name of the unit any time after the unit creation. This is a feature for 9000 or above series of controllers. Please refer to commands /cx/ux set name=sting for changing the name and /cx/ux show name for checking.
storsave=protect|balance|perform attribute allows user to set the storsave policy of the new unit. It is a 9550SX and 9590SE only feature. Please refer to command /cx/ux set storsave=protect|balance|perform for detail.
unit(s)
or drive(s)
will be listed.
noscan is used to not inform the OS of the unit discovery. Default is to inform
the OS.
Example:
//localhost> /c1 rescan
Rescanning controller /c1 for units and drives ...Done. Found following unit(s): [/c1/u3]. Found following drive(s): [/c1/p7, /c1/p8].
Note: Does not import non-JBOD on 7000/8000 models.
Typical application of this feature is when an application is using a given unit in raw mode (such as databases) and user would like to shutdown the host (Including UPS post failure automations). This command can then expedite the process by instructing the controller to finish pending requests, clear DCB's in-transaction flag as we are going down.
Note that block devices (cooked devices) do not require this and clients of block devices (such as file systems) will send its own shutdown request to the devices.
This command only applies to Windows operating system.
Alarms generated on 7000/8000 models do not have dates, as such you'll see a '-' (read not-applicable) in ``Date'' column. Also on 7000/8000 models, the alarm message, contain the severity as well, hence the ``Severity'' column is showing a '-' as well.
This command displays all available alarms on a given controller. The default is to display the most recent alarm or AEN message first. User can also use the [reverse] attribute to display the most recent alarm or AEN message last.
Typical output looks like:
//localhost> /c1 show alarms reverse
Ctl Date Severity Message ---------------------------------------------------------------------------- c1 [Fri Nov 28 04:26:31 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=2 c1 [Fri Nov 28 06:13:54 2003] INFO (0x04:0x000B): Rebuild started: unit=0 c1 [Fri Nov 28 06:30:35 2003] INFO (0x04:0x003B): Background rebuild paused: unit=0 c1 [Fri Nov 28 06:33:00 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=0 c1 [Fri Nov 28 06:33:04 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=4 c1 [Fri Nov 28 06:33:46 2003] INFO (0x04:0x000B): Rebuild started: unit=0 c1 [Fri Nov 28 06:37:58 2003] INFO (0x04:0x000B): Rebuild started: unit=0 c1 [Fri Nov 28 07:51:34 2003] INFO (0x04:0x0005): Background rebuild done: unit=0 c1 [Fri Nov 28 07:59:43 2003] INFO (0x04:0x0005): Background rebuild done: unit=0 c1 [Mon Dec 1 02:26:12 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=3
Example:
$ tw_cli /c0 show diag > diag.txt
Rebuild activity attempts to (re)synchronize all members of redundant units such as RAID-1, RAID-10, RAID-5 and RAID-50. Rebuilds can be started manually or automatically if a spare has been defined. Scheduled rebuilds will take place during the scheduled window, if enabled.
This command displays the current rebuild background task schedule as illustrated below.
$ tw_cli /c1 show rebuild
Rebuild Schedule for Controller /c1 ======================================================== Slot Day Hour Duration Status -------------------------------------------------------- 1 Mon 2:00pm 10 hr(s) disabled 2 Thu 7:00pm 18 hr(s) disabled 3 - - - - 4 - - - - 5 - - - - 6 Mon 1:00am 4 hr(s) disabled 7 Sun 12:00am 1 hr(s) disabled
Status ``disabled'' indicates that the controller will not use the tabled schedules.
Note: The rebuild schedules are also applicable to initialization and migration processes.
For example:
If a unit is in the initialization state at noon on Wed, the tabled schedule above is show in the following:
$ tw_cli /c1 show rebuild
Rebuild Schedule for Controller /c1 ======================================================== Slot Day Hour Duration Status -------------------------------------------------------- 1 Mon 2:00pm 10 hr(s) disabled 2 Thu 7:00pm 18 hr(s) disabled 3 - - - - 4 - - - - 5 - - - - 6 Mon 1:00am 4 hr(s) disabled 7 Sun 12:00am 1 hr(s) disabled
$ tw_cli /c1 show Unit UnitType Status %Cmpl Stripe Size(GB) Cache AVerify IgnECC ------------------------------------------------------------------------------ u0 RAID-5 INITIALIZING 0 64K 521.466 ON OFF OFF
Port Status Unit Size Blocks Serial --------------------------------------------------------------- p0 NOT-PRESENT - - - - p1 OK u0 76.33 GB 160086528 Y2NXL7FE p2 NOT-PRESENT - - - - p3 OK u0 76.33 GB 160086528 Y2NXLB9E p4 NOT-PRESENT - - - - p5 OK u0 76.33 GB 160086528 Y2NXQPZE p6 NOT-PRESENT - - - - p7 OK u0 76.33 GB 160086528 Y2NXM4VE p8 OK u0 74.53 GB 156301488 3JV3WTSE p9 OK u0 74.53 GB 156301488 3JV3WRHC p10 OK u0 74.53 GB 156301488 3JV3WQLQ p11 OK u0 74.53 GB 156301488 3JV3WQLZ
Name OnlineState BBUReady Status Volt Temp Hours LastCapTest --------------------------------------------------------------------------- bbu On Yes OK OK OK 0 xx-xxx-xxxx
Then if the user enables the tabled schedules, the unit initialization will be paused until next scheduled slot comes.
$ tw_cli /c1 set rebuild=enable Enabling scheduled rebuilds on controller /c1 ...Done.
$ tw_cli /c1 show rebuild
Rebuild Schedule for Controller /c1 ======================================================== Slot Day Hour Duration Status -------------------------------------------------------- 1 Mon 2:00pm 10 hr(s) enabled 2 Thu 7:00pm 18 hr(s) enabled 3 - - - - 4 - - - - 5 - - - - 6 Mon 1:00am 4 hr(s) enabled 7 Sun 12:00am 1 hr(s) enabled
$ tw_cli /c1 show
Unit UnitType Status %Cmpl Stripe Size(GB) Cache AVerify IgnECC ------------------------------------------------------------------------------ u0 RAID-5 INIT-PAUSED 0 64K 521.466 ON OFF OFF
Port Status Unit Size Blocks Serial --------------------------------------------------------------- p0 NOT-PRESENT - - - - p1 OK u0 76.33 GB 160086528 Y2NXL7FE p2 NOT-PRESENT - - - - p3 OK u0 76.33 GB 160086528 Y2NXLB9E p4 NOT-PRESENT - - - - p5 OK u0 76.33 GB 160086528 Y2NXQPZE p6 NOT-PRESENT - - - - p7 OK u0 76.33 GB 160086528 Y2NXM4VE p8 OK u0 74.53 GB 156301488 3JV3WTSE p9 OK u0 74.53 GB 156301488 3JV3WRHC p10 OK u0 74.53 GB 156301488 3JV3WQLQ p11 OK u0 74.53 GB 156301488 3JV3WQLZ
Name OnlineState BBUReady Status Volt Temp Hours LastCapTest --------------------------------------------------------------------------- bbu On Yes OK OK OK 0 xx-xxx-xxxx
Verify activity attempts to verify all units based on their unit type. Verifying RAID-1 involves checking that both drives contain the exact data. On RAID-5, the parity information is used to verify data integrity. RAID-10 and 50 are composite types and follow their respective array types. On the 9000 series, non-redundant units such as RAID-0, JBOD, single, and spare, are also verified (by reading and reporting un-readable sectors).
This command displays the current verify background task schedule as illustrated below.
$ tw_cli /c1 show verify
Verify Schedule for Controller /c1 ======================================================== Slot Day Hour Duration Status -------------------------------------------------------- 1 Mon 2:00am 4 hr(s) disabled 2 - - - - 3 Tue 12:00am 24 hr(s) disabled 4 Wed 12:00am 24 hr(s) disabled 5 Thu 12:00am 24 hr(s) disabled 6 Fri 12:00am 24 hr(s) disabled 7 Sat 12:00am 24 hr(s) disabled
Status ``disabled'' indicates that the controller will not use the tabled schedules.
selftest activity provides two types of selftests; UDMA (Ultra Direct Memory Access) and SMART (Self Monitoring Analysis and Reporting). Both self tests are checked once each day by default.
UDMA self test entails checking the current parallel ATA bus speed (between controller and attached disk), which could have been throttled down during previous operations, and increases the speed for best performance (usually one level higher). Possible speeds include 33, 66, 100 and 133 Mhz. Note that the UDMA selftest is not applicable (or required) with SATA drives, but is left enabled by default.
SMART selftest instructs the controller to check certain SMART supported thresholds by the disk vendor. An AEN is logged to the alarms page if a drive reports a SMART failure. The failing drive should be replaced if this error occurs.
This command displays the current selftest background task schedule as illustrated below.
$ tw_cli /c1 show selftest
Selftest Schedule for Controller /c1 ======================================================== Slot Day Hour UDMA SMART -------------------------------------------------------- 1 Sun 12:00am enabled enabled 2 Mon 12:00am enabled enabled 3 Tue 12:00am enabled enabled 4 Wed 12:00am enabled enabled 5 Thu 12:00am enabled enabled 6 Fri 12:00am enabled enabled 7 Sat 12:00am enabled enabled
For ``rebuild'' background task description, see command /cx show rebuild.
For example:
$ tw_cli /c1 add rebuild=Sun:16:3
Will add a rebuild background task schedule to be executed on Sundays at 4:00 PM for a duration of 3 hours.
For ``verify'' background task description, see command /cx show verify.
For example:
$ tw_cli /c1 add verify=Sun:16:3
Will add a verify background task schedule to be executed on Sundays at 4:00 PM for a duration of 3 hours.
For ``selftest'' background task description, see command /cx show selftest.
For example:
$ tw_cli /c1 add selftest=Sun:16
Will add a selftest background task schedule to be executed on Sundays at 4:00 PM.
For ``rebuild'' background task description, see command /cx show rebuild.
For example:
$ tw_cli /c1 del rebuild=2
Will remove rebuild background task in slot 2.
WARNING: If all timeslots are removed, be sure to also disable the schedule. Otherwise the applicable background task will never occur.
For ``verify'' background task description, see command /cx show verify.
For example:
$ tw_cli /c1 del verify=3
Will remove rebuild background task in slot 3.
WARNING: If all timeslots are removed, be sure to also disable the schedule. Otherwise the applicable background task will never occur.
For ``selftest'' background task description, see command /cx show selftest.
For example:
$ tw_cli /c1 del selftest=3
Will remove selftest background task in slot 3.
WARNING: If all timeslots are removed, be sure to also disable the schedule. Otherwise the applicable background task will never occur.
This command also allows you to set priority of rebuild vs I/O operations. Setting this value to 1 implies that rebuilds should consume more resources (cpu time, I/O bandwidth) to complete its task. Conversely setting this value to 5 implies that I/O has higher priority and rebuild. This command applies to 7000, 8000, and 9000 models. For 7/8000 series, the rebuild rate also applies to verify and mediascan tasks.
For ``rebuild'' background task description, see command /cx show rebuild.
This command allows you to set priority of verification vs I/O operations. Setting this value to 1 implies fastest verify, and 5 implies fastest I/O. Note that this feature only applies to 9000 models.
For ``verify'' background task description, see command /cx show verify.
For ``selftest'' background task description, see command /cx show selftest.
For example:
$ tw_cli /c0 selftest=enable task=UDMA
Will enable UDMA selftest on controller c0.
For example a 3 TB array would be configured into a 2 TB and a 1 TB volumes with default carvesize. For a 5 TB array, two 2 TB volumes would be created plus a 1 TB volume.
When autocarve policy is off, all the new unit creation or migration consists of one single volume.
Example:
//localhost> /c0 set autocarve=on Setting Auto-Carving Policy on /c0 to on ... Done.
Example:
//localhost> /c0 set carvesize=2000 Setting Auto-Carving Size on /c0 to 2000 GB ... Done.
1. Smallest usable capacity spare.
2. Smallest usable unconfigured drive.
3. Smallest usable capacity failed drive.
If the policy is off, spares are the only candidates for rebuild operations.
Example:
//localhost> /c0 set autorebuild=on
Setting Auto-Rebuild Policy on /c0 to on ... Done.
Logical Disk Object Messages are commands (a.k.a. methods/messages) that are sent to an instance of a Logical Disk (a.k.a. unit) such as /c0/u0.
One application of this command is to see which sub-unit of a degraded unit has caused the unit to degrade and which disk within that sub-unit is the source of degradation.
Example:
//localhost> /c0/u0 show
Unit UnitType Status %Cmpl Port Stripe Size(GB) Blocks ---------------------------------------------------------------------- u0 RAID-50 OK - - 64K 596.05 1249921024 u0-0 RAID-5 OK - - 64K - - u0-0-0 DISK OK - p0 - 149.10 312481280 u0-0-1 DISK OK - p2 - 149.10 312481280 u0-0-2 DISK OK - p3 - 149.10 312481280 u0-1 RAID-5 OK - - 64K - - u0-1-0 DISK OK - p4 - 149.10 312481280 u0-1-1 DISK OK - p5 - 149.10 312481280 u0-1-2 DISK OK - p6 - 149.10 312481280
//localhost> /c0/u1 show
Unit UnitType Status %Cmpl Port Stripe Size(GB) Blocks ---------------------------------------------------------------------- u1 RAID-0 OK - - 64K 3576.06 7499550720 u1-0 DISK OK - p0 - 298.01 624962560 u1-1 DISK OK - p1 - 298.01 624962560 u1-2 DISK OK - p2 - 298.01 624962560 u1-3 DISK OK - p3 - 298.01 624962560 u1-4 DISK OK - p4 - 298.01 624962560 u1-5 DISK OK - p5 - 298.01 624962560 u1-6 DISK OK - p6 - 298.01 624962560 u1-7 DISK OK - p7 - 298.01 624962560 u1-8 DISK OK - p8 - 298.01 624962560 u1-9 DISK OK - p9 - 298.01 624962560 u1-10 DISK OK - p10 - 298.01 624962560 u1-11 DISK OK - p11 - 298.01 624962560 u1/v0 Volume - - - - 2047.00 4292870144 u1/v1 Volume - - - - 1529.06 3206680576
Example:
//localhost> /c0/u0 show status
/c0/u5 status = OK
Example:
//localhost> /c0/u5 show rebuildstatus
/c0/u5 is not rebuilding, its current state is OK
Example:
//localhost> /c0/u5 show verifystatus
/c0/u5 is not verifying, its current state is OK
Example:
//localhost> /c0/u5 show initializestatus
/c0/u5 is not initializing, its current state is OK
Example:
//localhost> /c0/u5 show volumes
/c0/u5 Volume(s) = 2
Example:
//localhost> /c0/u5 show name
/c0/u5 Name = Joe
Example:
//localhost> /c0/u5 show serial
/c0/u5 Serial Number = 12345678901234567890
Example:
//localhost> /c0/u5 show qpolicy
/c0/u5 Command Queuing Policy = on
For detail, see /cx/ux set storsave=protect|balance|perform (9550SX and 9590SE only).
Example:
//localhost> /c0/u5 show storsave
/c0/u5 Command Storsave Policy = protect
If the Auto-Carving policy was on at the time the unit was created and the unit is over the carve size (default is 2 TB - 1), multiple volumes will be created and will be displayed at the end of the summary information.
Example:
//localhost> /c0/u1 show all
/c0/u1 status = OK /c0/u1 is not rebuilding, its current state is OK /c0/u1 is not verifying, its current state is OK /c0/u1 is not initializing, its current state is OK /c0/u1 volume(s) = 2 /c0/u1 name = 1234567 /c0/u1 serial number = C6CPR7JMF98DA8001DF0 Unit UnitType Status %Cmpl Port Stripe Size(GB) Blocks ---------------------------------------------------------------------- u1 RAID-0 OK - - 64K 3576.06 7499550720 u1-0 DISK OK - p0 - 298.01 624962560 u1-1 DISK OK - p1 - 298.01 624962560 u1-2 DISK OK - p2 - 298.01 624962560 u1-3 DISK OK - p3 - 298.01 624962560 u1-4 DISK OK - p4 - 298.01 624962560 u1-5 DISK OK - p5 - 298.01 624962560 u1-6 DISK OK - p6 - 298.01 624962560 u1-7 DISK OK - p7 - 298.01 624962560 u1-8 DISK OK - p8 - 298.01 624962560 u1-9 DISK OK - p9 - 298.01 624962560 u1-10 DISK OK - p10 - 298.01 624962560 u1-11 DISK OK - p11 - 298.01 624962560 u1/v0 Volume - - - - 2047.00 4292870144 u1/v1 Volume - - - - 1529.06 3206680576
Use caution when using this command. Units that are currently in use or mounted cannot be removed.
Use caution when using this command. This is a destructive command and should be used with extreme care. Units that are currently in use or mounted should not be deleted.
Note that the disk to be used to rebuild a unit, must be a SPARE or unconfigured disk.
Model | Raid0 | Raid1 | Raid5 | Raid10 | Raid50 | Single | JBOD | Spare | ------+-------+-------+-------+--------+--------+--------+------+-------+ 7K/8K | No | Yes | Yes | Yes | N/A | N/A | No | No | ------+-------+-------+-------+--------+--------+--------+------+-------+ 9K | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ------+-------+-------+-------+--------+--------+--------+------+-------+
Note that if subsequent to this command, one enables the background verify task to follow the scheduled slots, then this on-demand task will be paused until the next scheduled timeslot.
Rebuild pause function is provided to enable 7000/8000 users to achieve
functionality with use of OS provided schedulers such as cron(8)
or, at(1)
in Linux or user supplied programs.
Rebuild resume function is provided to
enable 7000/8000 users to achieve similar functionality with use of OS provided
schedulers such as cron(8)
or, at(1)
in Linux or user supplied programs.
Model | Raid0 | Raid1 | Raid5 | Raid10 | Raid50 | Single | JBOD | Spare | ------+-------+-------+-------+--------+--------+--------+------+-------+ 7K/8K | No | Yes | Yes | Yes | N/A | N/A | No | No | ------+-------+-------+-------+--------+--------+--------+------+-------+ 9K | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ------+-------+-------+-------+--------+--------+--------+------+-------+
Note that if subsequent to this command, one enables the background verify task to follow the scheduled slots, then this on-demand task will be paused until the next scheduled timeslot.
You can use the show verify command to display the existing schedule windows. The autoverify operation is a continuous verify operation, which takes place within the existing schedule windows (displayed with /cx show verify) if the schedule is enabled. While the ``/cx show verify'' command allows you to see the time for the verify operation, this command allows you to enable or disable the autoverify operation on the specified unit. This feature only applies to 9000 models.
Model | Raid0 | Raid1 | Raid5 | Raid10 | Raid50 | Single | JBOD | Spare | ------+-------+-------+-------+--------+--------+--------+------+-------+ 7K/8K | Yes | Yes | Yes | Yes | N/A | N/A | Yes | No | ------+-------+-------+-------+--------+--------+--------+------+-------+ 9K | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | ------+-------+-------+-------+--------+--------+--------+------+-------+
Note: Users can also name a JBOD. But the naming information will not persist across power cycles or resets due to the nature of JBODs.
Example:
//localhost> /c0/u5 set qpolicy = on
Setting Command Queuing Policy for unit /c0/u5 to [on] ... Done.
This feature is available only within 9550SX and 9590SE controller family or above. There is a tradeoff among the available settings. The following description about the settings should help you to decide which one is suitable to you and your application. The protect mode is the default setting.
protect -- provide the maximum data protection among the controller settings. When user sets storsave to protect mode, it means :
1. ``Write Cache'' will be disabled when the unit becomes ``DEGRADED'',
2. all data flushing from controller cache will be flushed to media, and
3. incoming FUA (Force Unit Access) host request will be ignored if a BBU is installed and enabled; Otherwise, will be honored.
perform -- provide the maximum performance and less data protection among the the controller settings. When user sets the storsave to perform mode, it means:
1. ``Write Cache'' will not be disabled when the unit becomes ``DEGRADED'',
2. all data flushing from controller cache will be flushed to disk, and
3. incoming FUA (Force Unit Access) host request will be honored.
When storsave is set to perform, a warning about the data loss in the event of power failure is giving to user to confirm the option. If user want to skip the confirmation, [quiet] option can be used to by pass the warning.
balance -- provide more data protection than perform mode but less data protection than protect mode. And provide better performance than protect mode but less performance than perform mode. When user sets the storsave to the balance mode, it means:
1. ``Write Cache'' will not be disabled when the unit becomes ``DEGRADED'',
2. all data flushing from controller cache will be flushed to media if a BBU is installed and enabled; Otherwise, will be flushed to disk only, and
3. incoming FUA (Force Unit Access) host request will be ignored if a BBU is installed and enabled; Otherwise, will be honored.
Example:
//localhost> /c0/u5 set storsave=protect
Setting Command Storsave Policy for unit /c0/u5 to [protect] ... Done.
A special case of this command is when the source unit has a type of RAID1 and destination unit has a type of single. In this case, the migrate command splits drives participating in RAID1 into multiple units of type single. The source unit name information will be duplicated to all destination units. But the source unit serial number will not be carried over to new unit. The new destination unit will have its own serial number.
This feature is only available with 9000 series of controllers.
Note: We do not recommend users to move a migrating unit to another controller before its migrate operation is completed. Any unclean shutdown on the migrating unit may lead the unit to a RECOVERY state in another controller which the migrate operation can not be continue until the unit is moved back to its original controller.
type=RaidType consists of the destination unit RAID type as in raid0, raid1, raid5, raid10, raid50, or single.
For example ``type=raid5'' indicates the destination unit is RAID-5.
The following table illustrates valid migration paths:
Src/Dst | Raid0 | Raid1 | Raid5 | Raid10 | Raid50 | Single | JBOD | Spare | --------+-------+-------+-------+--------+--------+--------+------+-------+ Raid0 | Y | N | Y | Y | Y | N | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+ Raid1 | Y | N | Y | Y | Y | Y | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+ Raid5 | Y | N | Y | Y | Y | N | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+ Raid10 | Y | N | Y | Y | Y | N | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+ Raid50 | Y | N | Y | Y | Y | N | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+ Single | Y | Y | Y | Y | Y | N | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+ JBOD | N | N | N | N | N | N | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+ Spare | N | N | N | N | N | N | N | N | --------+-------+-------+-------+--------+--------+--------+------+-------+
disk=p:-p.. consists of a list of ports (disks) to be used in addition to the source disks in the construction of the destination unit. One or more ports can be specified. Multiple ports can be specified using ``:'' or ``-'' as port index separators. A dash indicates a range and can be mixed with ``:''. For example disk=0:1:2-5:9:12 indicates port 0, 1, 2 thru 5 (inclusive), 9 and 12.
group=3|4|5|6|7|8 is only applicable to type=raid50 which consists of a number of disks per group. Recall that a RAID-50 is a multi-tier array. At the most bottom layer, N number of disks per group are used to form the RAID-5 layer. These RAID-5 arrays are then integrated into a RAID-0. This option allows you to specify the number of disks in the RAID-5 level. Valid values are 3, 4, 5 and 6. For example group=3 indicates 3 disks of RAID-5 at the bottom layer of RAID-50.
Note that a sufficient number of disks are required for a given pattern or disk group. For example, given 6 disks, specifying 3 will create two RAID-5. However given 12 disks, specifying 3 will create four RAID-5 under the RAID-0 level. Given 6 disks and grouping of 6 is not allowed, as you'll basically be creating a RAID-5.
The default disk group varies based on number of disks. For 6 & 9 disks, default is group=3. For 8 disks, default is group=4. For 10 or 15 disks, default is group=5. For 12 or 16 disks, default is group=4. For 14 disks, default is group=7. Case of 12 disks could be grouped with group=3, group=4, or group=6. Group=4 was set by default as it provides best net capacity and performance. Case of 15 disks could be grouped with group=3 or group=5. And case of 16 disks could be grouped with group=4 and group=8.
Note that RAID-10 has group=2 always.
Stripe consists of the logical unit stripe size to be used. The following table illustrates the supported and applicable stripes on unit types and controller models. Stripe size units are in K (kilo bytes).
Model | Raid0 | Raid1 | Raid5 | Raid10 | JBOD | Spare | Raid50 | Single | ------+---------+--------+--------+---------+------+-------+--------+--------+ 9K | 16 | N/A | 16 | 16 | N/A | N/A | 16 | N/A | | 64 | | 64 | 64 | | | 64 | | | 256 | | 256 | 256 | | | 256 | | ------+---------+--------+--------+---------+------+-------+--------+--------+
noscan switch instructs CLI not to notify OS of creation of the new unit. By default CLI will inform the OS. One application of this feature is to avoid the OS from creating block special devices such as /dev/sdb and /dev/sdc as some implementations might create naming fragmentation and creating a moving target.
nocache switch instructs CLI disable the write cache on the migrated unit. Enabling write cache increases performance at the cost of high-availability.
autoverify switch enables the autoverify attribute on the unit that is to be migrated. For more details on this feature, refer to cx/ux set Commands section of this document.
For example:
In the case of split mirror:
$ tw_cli /c1/u3 migrate type=single
Indicates that u3 is a TWINSTOR or RAID-1 and the migrate command splits u3 to u3 and ux with RAID type of Single.
In the case of capacity expansion:
$ tw_cli /c0/u0 migrate type=raid10 disk=3-4 stripe=16
Indicates that the destination unit has a RAID type of raid10 and has the disk 3, 4 in addition to all the disks in the existing unit u0.
The following is a mockup of how migrating units will be displayed...
3ware CLI> /c0 show Unit UnitType Status %Cmpl Stripe Size(GB) Cache AVerify IgnECC ------------------------------------------------------------------------------------ u0 Migrator MIGRATING 67 - 149.05 ON OFF OFF u1 RAID-5 OK - 64k 298.22 ON OFF OFF
3ware CLI> /c0/u0 show
Unit UnitType Status %Cmpl Port Stripe Size(GB) Blocks ---------------------------------------------------------------------- u0 Migrator MIGRATING 67 - - - -
su0 RAID-1 OK - - - 149.001 312477696 su0-0 DISK OK - p0 - 149.001 312477696 su0-1 DISK OK - p2 - 149.001 312477696
du0 RAID-10 OK - - 16K 298.002 624955392 du0-0 RAID-1 OK - - - - - du0-0-0 DISK OK - p0 - 149.001 312477696 du0-0-1 DISK OK - p2 - 149.001 312477696 du0-1 RAID-1 OK - - - - - du0-1-0 DISK OK - p3 - 149.001 312477696 du0-1-1 DISK OK - p4 - 149.001 312477696
The above report indicates that /c0/u0 is a migrating unit with 67% completion. The report also indicate that Source Unit su0 is of type RAID-1 and Destination Unit du0 is of type RAID-10.
Port Object Messages are commands (a.k.a. methods/messages) that are sent to an instance of a disk which attaches to a port such as /c0/p0.
Example:
//localhost> /c0/p5 show Port Status Unit Size Blocks Serial --------------------------------------------------------------- p5 OK u5 149.05 GB 312581808 WD-WMACK1406498
The above report indicate that port 5 of controller 0 is attached to one Western Digital disk with status OK participating in unit 5.
Example:
//localhost> /c0/p5 show status /c0/p5 Status = OK
Example:
//localhost> /c0/p5 show model /c0/p5 Model = WDC WD1600BB-00DAA0
Example:
//localhost> /c0/p5 show serial /c0/p5 Serial = WD-WMACK1406498
Example:
//localhost> /c0/p5 show firmware /c0/p5 Firmware Version = 65.13G65
Example:
//localhost> /c0/p5 show identify
/c0/p5 Identify Status = on
Example:
//localhost> /c0/p5 show ncq
/c0/p5 NCQ Supported = No /c0/p5 NCQ Enabled = No
Example:
//localhost> /c0/p5 show lspeed
/c0/p5 SATA Link Speed Supported = 3.0 Gb/s /c0/p5 SATA Link Speed = 3.0 Gb/s
Example:
//localhost> /c0/p5 show capacity 149.05 GB (312581808)
Example:
//localhost> /c0/p5 show smart
10 00 01 0B 00 C8 C8 00 00 00 00 00 00 00 03 07 00 9A 96 BC 14 00 00 00 00 00 04 32 00 64 64 7A 00 00 00 00 00 00 05 33 00 C8 C8 00 00 00 00 00 ... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
Note that at this writing, we are not decoding the SMART data. Also note that if the disk attached to the specified port is not present or there are cabling problems reaching the disk, CLI will return an error. This could be one way of detecting whether a disk is present or not.
Use caution when using this command. Drives, which are part of a redundant array, can be removed, but the array will be degraded. Non-redundant drives, which are part of a unit, can not be removed.
Note: Enclosure services hardware is also required.
Example:
//localhost> /c0/p5 set identify=on
Setting Port Identify on /c0/p5 to [on] ... Done.
BBU (Battery Backup Unit) Object Messages are commands (a.k.a. methods/messages) that are sent to an instance of a BBU such as /c0/bbu. This object is only available on 9000S controllers where the BBU is actually installed.
For example:
//localhost> /cx/bbu show
Name OnlineState BBUReady Status Volt Temp Hours LastCapTest --------------------------------------------------------------------------- bbu On No Testing OK OK 72 01-Jul-2004
Indicates the date the battery capacity was last measured is 01-Jul-2004. The battery is estimated to last for 72 hours from the last tested date. The BBU unit is currently testing the battery. Both voltage and temperature are normal. And the BBU is not ready to backup the write cache on the controller due to the testing.
Testing
Battery test is currently in progress. It may take up to 24 hours to complete. During the test, the BBU is not capable of backup operation and the write cache of the applicable RAID units are also disabled. If the test is completed with no error and the BBU returns back to WeakBat or OK state, the write cache will be resumed. If a Fault, Failed or an Error occurs during the test, the write cache remains at the disabled state until the problem is fixed.
Charging
BBU is currently charging the battery. The charging is started automatically by the BBU whenever necessary. During the charging, the BBU is not capable of backup operation and the write cache is disabled. Once charging is completed and the BBU returns back to OK status, the write cache will be resumed. If a FAULT or an ERROR occurs during the test, the write cache remains at the disabled state until the problem is fixed.
Fault
A battery fault is detected. At this state, the BBU is not capable of backup operation and the write cache is disabled. We recommend you to replace the battery and/or the BBU board to fix the problem as soon as possible so that the write cache will be enabled again.
Error
Other BBU error is detected. At this state, the BBU is not capable of backup operation and the write cache is disabled. We recommend you to replace the battery and/or the BBU board to fix the problem as soon as possible so that the write cache will be enabled again.
Failed
The battery failed a test. At this state, the BBU is not capable of backup operation and the write cache is disabled. We recommend you to replace the battery and/or the BBU board to fix the problem as soon as possible so that the write cache will be enabled again.
WeakBat
BBU is functioning normally which means it is online and capable of backing up the write cache. But the battery is weak and should be replaced.
OK
BBU is ready, online and capable of backing up the write cache.
-
Battery is not present or BBU unit is not installed.
For example:
//localhost> /c1/bbu show all
/c1/bbu Firmware Version = BBU: 1.04.00.007 /c1/bbu Serial Number = Engineering Sample. /c1/bbu Online State = On /c1/bbu BBU Ready = Yes /c1/bbu BBU Status = OK /c1/bbu Battery Voltage = OK /c1/bbu Battery Temperature = OK /c1/bbu Estimated Backup Capacity = 241 Hours /c1/bbu Last Capacity Test = 22-Jun-2004 /c1/bbu Battery Intallation Date = 20-Jun-2004 /c1/bbu Bootloader Version = BBU 0.02.00.002 /c1/bbu PCB Revision = 65
//localhost>
Check with the alarms command, AEN (Asynchronous Event Notification) messages are also generated by controllers to notify user the status of the command.
Note: The test cannot be terminated before it completes.
This command set provides brief on-line help. At top level of the command set, it is considered to be in the Shell Object. The Shell object has focus, show, flush, rescan, and commit commands. In addition to the Shell Object, we also have other objects such as /cx, /cx/ux, /cx/px, and /cx/bbu. Using the help command on objects, the help command shows all possible sub-commands associate with the object.
For example: help on the controller object /cx, will display all the sub-commands associated with the controller /cx.
//localhost> help /cx
/cx show /cx show attribute [attribute ...] where attributes are: achip|allunitstatus|autocarve(9000 series)|bios|driver|firmware autorebuild(9550SX and 9590SE only)|carvesize(9000 series) drivestatus|exportjbod|ctlbus(9550SX and 9590SE only) memory|model|monitor|numdrives|numports|numunits|unitstatus ondegrade(9000S only)|pcb|pchip|serial|spinup|stagger /cx show all where all means attributes and configurations. /cx show diag /cx show alarms [reverse] /cx show rebuild (9000 series) /cx show verify (9000 series) /cx show selftest (9000 series)
/cx add type=<RaidType> disk=<p:-p..> [stripe=<Stripe>] [noscan] [nocache] [group=<3|4|5|6|7|8>] [autoverify] [ignoreECC] [name=string (9000S only)] [storsave=<protect|balance|perform> (9550SX and 9590SE only)] RaidType = { raid0, raid1, raid5, raid10, raid50, single, spare, JBOD(7000/8000 only)} /cx add rebuild=ddd:hh:duration (9000 series) /cx add verify=ddd:hh:duration (9000 series) /cx add selftest=ddd:hh (9000 series)
/cx del rebuild=slot_id (9000 series) /cx del verify=slot_id (9000 series) /cx del selftest=slot_id (9000 series)
/cx set exportjbod=on|off (9000 series) /cx set ondegrade=cacheoff|follow (9000S only) /cx set spinup=nn (9000 series) /cx set stagger=nn (9000 series) /cx set autocarve=on|off (9000 series) /cx set carvesize=[1024..2048] (9000 series) /cx set autorebuild=on|off (9550SX and 9590SE only) /cx set rebuild=enable|disable|<1..5> (enable|disable for 9000 series) /cx set verify=enable|disable|<1..5> (enable|disable for 9000 series) /cx set selftest=enable|disable [task=UDMA|SMART] (9000 series)
/cx flush /cx commit (** Windows only **) (previously known as shutdown) /cx start mediascan (7000/8000 only) /cx stop mediascan (7000/8000 only) /cx rescan [noscan] NOTE: Does not import non-JBOD on 7000/8000 models.
//localhost>
However, user can also get help with ``?'' or ``help'' as the user progresses with the specific object or a command after an object.
For example: User progresses to /c0 show and needs help on what specific attribute syntax, user can use '?' to get help as following:
//localhost> /c0 show ?
/cx show /cx show attribute [attribute ...] where attributes are: achip|allunitstatus|autocarve(9000 series)|bios|driver|firmware autorebuild(9550SX and 9590SE only)|carvesize(9000 series) drivestatus|exportjbod|ctlbus(9550SX and 9590SE only) memory|model|monitor|numdrives|numports|numunits|unitstatus ondegrade(9000S only)|pcb|pchip|serial|spinup|stagger /cx show all where all means attributes and configurations. /cx show diag /cx show alarms [reverse] /cx show rebuild (9000 series) /cx show verify (9000 series) /cx show selftest (9000 series)
//localhost>
//localhost> help
Copyright(c) 2004, 2005 Applied Micro Circuits Corporation(AMCC). All rights reserved.
AMCC/3ware CLI (version 2.00.00.048)
Commands Description ------------------------------------------------------------------- info Displays information about controller(s), unit(s) and port(s). maint Performs maintenance operations on controller(s), unit(s) and ports. alarms Displays current AENs. set Displays or modifies controller and unit settings. sched Schedules bachground tasks on controller(s) (9000 controllers only). quit Exits the CLI. ---- Primary Command Syntax ---- show Displays information about controller(s), unit(s) and port(s). flush Flush write cache data to units in the system. rescan Rescan all empty ports for new unit(s) and disk(s). commit Commit dirty DCB to storage on controller(s). /cx Controller specific commands. /cx/ux Unit specific commands. /cx/px Port specific commands. /cx/bbu BBU specific commands. (9000 controllers only)
Type help <command> to get more details about a particular command. For more detail information see tw_cli's documentation.
//localhost>
The functionality provided by tw_cli(8)
in the legacy command syntax can be divided
into the following categories:
Important Notice: The legacy command syntax will be discontinued in the future releases. Please change your existing CLI related scripts or automation programs with the primary command syntax as soon as possible.
------------------------------------------------------------
Info commands are read-only operations showing various values of controllers, units and drives.
Example:
//localhost> info c0 driver /c0 Driver Version = 1.02.00.036
Example:
//localhost> info c0 model /c0 Model = 7500-12
Example:
//localhost> info c0 firmware /c0 Firmware Version = FGXX 2.01.00.025
Example:
//localhost> info c0 bios /c0 BIOS Version = BG9X 2.01.00.026
Example:
//localhost> info c0 monitor /c0 Monitor Version = BLDR 1.00.00.008
Example:
//localhost> info c0 serial /c0 Serial Number = F12705A3240009
Example:
//localhost> info c0 pcb /c0 PCB Version = Rev3
Example:
//localhost> info c0 pchip /c0 PCHIP Version = 1.30-33
Example:
//localhost> info c0 achip /c0 ACHIP Version = 3.20
Example:
//localhost> info c0 numports /c0 Number of Ports = 12
Example:
//localhost> info c0 numunits /c0 Number of Units = 1
disk(s)
will not be detected unless
I/O is performed against the disk. See info cid pid smart for a workaround.
Example:
//localhost> info c0 numdrives /c0 Number of Drives = 5
Example:
//localhost> info c0 unitstatus
Unit UnitType Status %Cmpl Stripe Size(GB) Cache AVerify IgnECC ------------------------------------------------------------------------------ u0 RAID-5 OK - 64K 223.485 OFF OFF ON u1 JBOD OK - - 76.3352 OFF OFF - u2 RAID-0 OK - 64K 148.99 ON ON -
Example:
//localhost> info c0 allunitstatus /c0 Total Optimal Units = 2 /c0 Not Optimal Units = 0
Example:
//localhost> info c0 drivestatus
Port Status Unit Size Blocks Serial --------------------------------------------------------------- p0 OK u0 149.05 GB 312581808 3JS0TF14 p1 OK u0 149.05 GB 312581808 3JS0TETZ p2 OK u1 149.05 GB 312581808 3JS0VG85 p3 OK u1 149.05 GB 312581808 3JS0VGCY p4 OK u1 149.05 GB 312581808 3JS0VGGQ p5 OK u2 149.05 GB 312581808 3JS0VH1P p6 OK - 149.05 GB 312581808 3JS0TF0P p7 OK - 149.05 GB 312581808 3JS0VF43 p8 OK - 149.05 GB 312581808 3JS0VG8D p9 NOT-PRESENT - - - - p10 NOT-PRESENT - - - - p11 NOT-PRESENT - - - -
Example:
//localhost> info c0 u0
Unit UnitType Status %Cmpl Port Stripe Size(GB) Blocks ---------------------------------------------------------------------- u0 RAID-50 OK - - 64K 596.05 1249921024 u0-0 RAID-5 OK - - 64K - - u0-0-0 DISK OK - p0 - 149.10 312481280 u0-0-1 DISK OK - p2 - 149.10 312481280 u0-0-2 DISK OK - p3 - 149.10 312481280 u0-1 RAID-5 OK - - 64K - - u0-1-0 DISK OK - p4 - 149.10 312481280 u0-1-1 DISK OK - p5 - 149.10 312481280 u0-1-2 DISK OK - p6 - 149.10 312481280
Example:
//localhost> info c0 u0 status /c0/u5 status = OK
Example:
//localhost> info c0 u5 rebuildstatus /c0/u5 is not rebuilding, its current state is OK
Example:
//localhost> info c0 u5 verifystatus /c0/u5 is not verifying, its current state is OK
Example:
//localhost> info c0 u5 initializestatus /c0/u5 is not initializing, its current state is OK
Example:
//localhost> info c0 p5 Port Status Unit Size Blocks Serial --------------------------------------------------------------- p5 OK u5 149.05 GB 312581808 WD-WMACK1406498
The above report indicate that port 5 of controller 0 is attached to one Western Digital disk with status OK participating in unit 5.
Example:
//localhost> info c0 p5 status /c0/p5 Status = OK
Example:
//localhost> info c0 p5 model /c0/p5 Model = WDC WD1600BB-00DAA0
Example:
//localhost> info c0 p5 serial /c0/p5 Serial = WD-WMACK1406498
Example:
//localhost> info c0 p5 firmware /c0/p5 Firmware Version = 65.13G65
Example:
//localhost> info c0 p5 capacity /c0/p5 Capacity = 149.05 GB (312581808)
Example:
//localhost> info c0 p5 smart
10 00 01 0B 00 C8 C8 00 00 00 00 00 00 00 03 07 00 9A 96 BC 14 00 00 00 00 00 04 32 00 64 64 7A 00 00 00 00 00 00 05 33 00 C8 C8 00 00 00 00 00 ... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2C
Note that at this writing, we are not decoding the SMART data. Also note that if the disk attached to the specified port is not present or there are cabling problems reaching the disk, CLI will return an error. This could be one way of detecting whether a disk is present or not.
Example:
$ tw_cli info c0 diag > diag.txt
Example:
//localhost> info c0 exportjbod /c0 JBOD Export Policy = Not Supported.
//localhost> info c1 exportjbod /c1 JBOD Export Policy = on
Sub-commands under this category allow you to create and mutate objects and their attributes such as creating and deleting logical units, rebuilding, flushing, etc. These commands are read/write operations and should be used with care.
unit(s)
or drive(s)
will be listed.
If no controller is specified, all controllers will be rescanned. One or many controllers can be specified. noscan is used to not inform the OS of the unit discovery. Default is to inform the OS.
Example:
//localhost> maint rescan Rescanning controller /c0 for units and drives ...Done. Found following unit(s): [none]. Found following drive(s): [none]. Rescanning controller /c1 for units and drives ...Done. Found following unit(s): [/c1/u3]. Found following drive(s): [/c1/p7, /c1/p8].
Note: Does not import non-JBOD on 7000/8000 models
Since this command is by far the richest command, it deserves more details.
cid is the controller name as in c0, c1, etc.
RaidType consists of letter ``r'' followed by RAID or logical unit type as in raid0, raid1, raid5, raid10, raid50, single, spare, and jbod. For example ``rraid50''. The following table illustrates supported types and controller models.
Model | R0 | R1 | R5 | R10 | JBOD | Spare | R50 | Single | ------+----+----+----+-----+------+-------+-----+--------+ 7K/8K | Y | Y | Y | Y | Y | Y | N | N | ------+----+----+----+-----+------+-------+-----+--------+ 9K | Y | Y | Y | Y | Y | Y | Y | Y |
PidList consists of letter ``p'' followed by a list of ports (disks) to be used in the construction of the specified unit type. One or more ports can be specified. Multiple ports can be specified using ``:'' or ``-'' as port index separators. A dash indicates a range and can be mixed with ``:''. For example p0:1:2-5:9:12 indicates port 0, 1, 2 thru 5 (inclusive), 9 and 12.
Stripe consists of letter ``k'' followed by the stripe size to be used. The following table illustrates the supported and applicable stripes on unit types and controller models. Stripe size units are in K (kilo bytes).
Model | R0 | R1 | R5 | R10 | JBOD | Spare | R50 | Single | ------+------+-----+-----+------+------+-------+-----+--------+ 7K/8K | 64 | N/A | 64 | 64 | N/A | N/A | N/S | N/S | | 128 | | | 128 | | | | | | 256 | | | 256 | | | | | | 512 | | | 512 | | | | | | 1024 | | | 1024 | | | | | ------+------+-----+-----+------+------+-------+-----+--------+ 9K | 16 | N/A | 16 | 16 | N/A | N/A | 16 | N/A | | 64 | | 64 | 64 | | | 64 | | | 256 | | 256 | 256 | | | 256 | | ------+------+-----+-----+------+------+-------+-----+--------+
DskGrp consists of letter ``g'' followed by the number of disks per group for a RAID-50 type. Recall that a RAID-50 is a multi-tier array. At the most bottom layer, N number of disks per group are used to form the RAID-5 layer. These RAID-5 arrays are then integrated into a RAID-0. This attribute allows you to specify the number of disks in the RAID-5 level. Valid values are 3, 4, 5 and 6.
Note that a sufficient number of disks are required for a given pattern or disk group. For example, given 6 disks, specifying 3 will create two RAID-5. However given 12 disks, specifying 3 will create four RAID-5 under the RAID-0 level. Given 6 disks a grouping of 6 is not allowed, as you'll basically be creating a RAID-5.
The default gDskGrp varies based on number of disks. For 6 & 9 disks, the default is 3. For 8 disks, the default is 4. For 10 disks, the default is 5 and for 12 disks, the default is 4. Since 12 disks could be grouped into 3, 4, or 6 RAID-5 arrays. A grouping of 4 was set by default as it provides best net capacity and performance.
noscan attribute instructs CLI not to notify OS of creation of the new unit. By default CLI will inform the OS. One application of this feature is to avoid the OS from creating block devices such as /dev/sdb and /dev/sdc as some implementations might create naming fragmentation and creating a moving target.
nocache attribute instructs CLI disable the write cache on the newly create unit. Enabling write cache increases performance at the cost of high-availability. A BBU (battery backup unit) or UPS is recommended to prevent data lost if the cache is enabled in the event of a power failure.
autoverify attribute enables the autoverify attribute on the unit that is to be created. For more details on this feature, refer to Set Commands section of this document. This feature is not supported on model 7000/8000. On model 9000, JBOD autoverify attribute is not persistent (does not survive reboots).
ignoreECC attribute enables the ignoreECC, also known as the overwriteECC attribute on the unit that is to be created. For more details on this feature, refer to Set Commands section of this document. The following table illustrates the supported RAID unit types. This table only applies to setting this feature at unit creation time. Generally ignoreECC applies to redundant units.
Model | R0 | R1 | R5 | R10 | JBOD | Spare | R50 | Single | ------+----+----+----+-----+------+-------+-----+--------+ 7K/8K | N | N | N | N | N | N | N | N | ------+----+----+----+-----+------+-------+-----+--------+ 9K | N | Y | Y | Y | N | N | Y | N |
Note that the port (disk) to be used to rebuild a unit, must be a SPARE or unconfigured disk.
cron(8)
or, at(1)
in linux or user supplied programs.
See also Sched Commands.
Model | R-0 | R-1 | R-5 | R-10 | R-50 | Single | JBOD | Spare | ------+-----+-----+-----+------+------+--------+------+-------+ 7K/8K | No | Yes | Yes | Yes | N/A | N/A | No | No | ------+-----+-----+-----+------+------+--------+------+-------+ 9K | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ------+-----+-----+-----+------+------+--------+------+-------+
Note that if subsequent to this command, one enables the background verify task to follow the scheduled slots, then this on-demand task will be paused until the scheduled time.
disk(s)
and clear the in-transaction
bit.
Typical application of this feature is when an application is using a given unit in raw mode (such as databases) and user would like to shutdown the host (Including UPS post failure automations). This command can then expedite the process by instructing the controller to finish pending requests, clear DCB's in-transaction flag as we are going down.
This command only applies to Windows operating system.
Model 9000 supports background tasks. Background tasks include ``rebuild'', ``verify'', or ``self test'' activities. For each activity, up to 7 tasks can be registered, known as slots 1 through 7. Each activity can be managed by this command including adding, removing, enabling and disabling a task. Background tasks have a slot id, category (rebuild, verify, selftest), start-day-time and duration attributes.
rebuild activity attempts to (re)synchronize all members of redundant units such as RAID-1, RAID-10, RAID-5 and RAID-50. Rebuild can be started manually or automatically if a spare has been defined. Scheduled rebuilds will take place during the scheduled window, if enabled.
verify activity attempts to verify all units based on their unit type. Verifying RAID-1 involves checking that both drives contain the exact data. On RAID-5, the parity information is used to verify data integrity. RAID-10 and 50 are composite types and follow their respective array types. On 9000 series, non-redundant units such as RAID-0, JBOD, single, and spare, are also verified (by reading and reporting un-readable sectors).
selftest activity provides two types of selftests; UDMA (Ultra Direct Memory Access) and SMART (Self Monitoring Analysis and Reporting). Both self tests are checked once each day by default.
UDMA self test entails checking the current ATA bus speed (between controller and attached disk), which could have been throttled down during previous operations and increase the speed for best performance (usually one level higher). Possible speeds include 33, 66, 100 and 133 Mhz (at this writing). Note that UDMA selftest is not applicable (or required) with SATA drives, but is left enabled by default.
SMART activity instructs the controller to check certain SMART supported thresholds by the disk vendor. An AEN is logged to the alarms page if a drive reports a SMART failure.
$ tw_cli sched rebuild c1
Rebuild Schedule for Controller /c1 ======================================================== Slot Day Hour Duration Status -------------------------------------------------------- 1 Mon 2:00pm 10 hr(s) disabled 2 Thu 7:00pm 18 hr(s) disabled 3 - - - - 4 - - - - 5 - - - - 6 Mon 1:00am 4 hr(s) disabled 7 Sun 12:00am 1 hr(s) disabled
Status ``disabled'' indicates that the controller will not use the tabled schedules.
For example:
$ tw_cli sched rebuild c1 add d0 h16 t3
Will add a rebuild background task to be executed on Sundays at 4:00 PM for a duration of 3 hours.
For example:
$ tw_cli sched rebuild c1 remove 2
Will remove rebuild background task in slot 2.
Warning: If all timeslots are removed, be sure to also disable the schedule. Otherwise the applicable background task will never occur.
$ tw_cli sched verify c1
Verify Schedule for Controller /c1 ======================================================== Slot Day Hour Duration Status -------------------------------------------------------- 1 Mon 2:00am 4 hr(s) disabled 2 - - - - 3 Tue 12:00am 24 hr(s) disabled 4 Wed 12:00am 24 hr(s) disabled 5 Thu 12:00am 24 hr(s) disabled 6 Fri 12:00am 24 hr(s) disabled 7 Sat 12:00am 24 hr(s) disabled
Status indicates that the controller will not use the tabled schedules.
For example:
$ tw_cli sched verify c1 add d0 h16 t3
Will add a verify background task to be executed on Sundays at 4:00 PM for a duration of 3 hours.
For example:
$ tw_cli sched verify c1 remove 3
Will remove rebuild background task in slot 3.
Warning: If all timeslots are removed, be sure to also disable the schedule. Otherwise the applicable background task will never occur.
$ tw_cli sched selftest c1
Selftest Schedule for Controller /c1 ======================================================== Slot Day Hour UDMA SMART -------------------------------------------------------- 1 Sun 12:00am enabled enabled 2 Mon 12:00am enabled enabled 3 Tue 12:00am enabled enabled 4 Wed 12:00am enabled enabled 5 Thu 12:00am enabled enabled 6 Fri 12:00am enabled enabled 7 Sat 12:00am enabled enabled
For example:
$ tw_cli sched selftest c1 add d0 h16
Will add a selftest background task to be executed on Sundays at 4:00 PM.
For example:
$ tw_cli sched selftest c1 remove 3
Will remove rebuild background task in slot 3.
Warning: If all timeslots are removed, be sure to also disable the schedule. Otherwise the applicable background task will never occur.
For example:
$ tw_cli sched selftest c1 enable s0
Will enable UDMA selftest on controller c0.
For example:
$ tw_cli sched selftest c1 disable s1
Will disable SMART selftest on controller c0.
Asynchronous events are originated by firmware and captured by their respective device drivers. These events are kept in a finite queue inside the kernel, awaiting extraction by user space programs such as CLI and/or 3DMPlus. These events reflect warning, debugging and/or informative messages for end user.
Alarms generated on 7000/8000 models do not have dates, as such you'll see a '-' (read not-applicable) in ``Date'' column. Also on 7000/8000 models, the alarm message, contain the severity as well, hence the ``Severity'' column is showing a '-' as well.
Typical output looks like:
//localhost> alarms
Ctl Date Severity Message -------------------------------------------------- c0 - - ERROR: Unit degraded: Unit #0 c1 [Fri Nov 28 04:26:31 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=2 c1 [Fri Nov 28 06:13:54 2003] INFO (0x04:0x000B): Rebuild started: unit=0 c1 [Fri Nov 28 06:30:35 2003] INFO (0x04:0x003B): Background rebuild paused: unit=0 c1 [Fri Nov 28 06:33:00 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=0 c1 [Fri Nov 28 06:33:04 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=4 c1 [Fri Nov 28 06:33:46 2003] INFO (0x04:0x000B): Rebuild started: unit=0 c1 [Fri Nov 28 06:37:58 2003] INFO (0x04:0x000B): Rebuild started: unit=0 c1 [Fri Nov 28 07:51:34 2003] INFO (0x04:0x0005): Background rebuild done: unit=0 c1 [Fri Nov 28 07:59:43 2003] INFO (0x04:0x0005): Background rebuild done: unit=0 c1 [Mon Dec 1 02:26:12 2003] ERROR (0x04:0x0002): Degraded unit detected: unit=0, port=3
These commands allow you to view and/or set certain controller and unit specific parameters as described below.
Model | R-0 | R-1 | R-5 | R-10 | R-50 | Single | JBOD | Spare | ------+-----+-----+-----+------+------+--------+------+-------+ 7K/8K | Yes | Yes | Yes | Yes | N/A | N/A | Yes | No | ------+-----+-----+-----+------+------+--------+------+-------+ 9K | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | ------+-----+-----+-----+------+------+--------+------+-------+
This command set provides brief on-line help.
//localhost> help
Copyright(c) 2004, 2005 Applied Micro Circuits Corporation(AMCC). All rights reserved.
AMCC/3ware CLI (version 2.00.00.048)
Commands Description ------------------------------------------------------------------- info Displays information about controller(s), unit(s) and port(s). maint Performs maintenance operations on controller(s), unit(s) and ports. alarms Displays current AENs. set Displays or modifies controller and unit settings. sched Schedules bachground tasks on controller(s) (9000 controllers only). quit Exits the CLI. ---- Primary Command Syntax ---- show Displays information about controller(s), unit(s) and port(s). flush Flush write cache data to units in the system. rescan Rescan all empty ports for new unit(s) and disk(s). commit Commit dirty DCB to storage on controller(s). /cx Controller specific commands. /cx/ux Unit specific commands. /cx/px Port specific commands. /cx/bbu BBU specific commands. (9000 controllers only)
Type help <command> to get more details about a particular command. For more detail information see tw_cli's documentation.
While informative messages are written to standard output, error messages are written to standard error. On success, 0 is returned. On failure 1 is returned.
If you wish to use CLI in single command mode (not interactive), make sure to avoid collision with your command interpreter (OS shell) by escaping the meta-characters (such as ?, <, >, @, &, *, etc) appropriately with single quote around them.
For example, given the
$ tw_cli /c0 ?
This is a case of single command usage where the user intends to get help on Controller
related commands. While this is a valid CLI command, but since the arguments to CLI
are first processed by the shell, then some shells like csh(1)
will interpret the '?' as
a meta-character to be used toward file completion and if no file is found with a single
character, then shell will complain before the arguments are even passed down to CLI.
One solutions of this problem can be :
$ tw_cli help /cx
or
$ tw_cli '/c0 ?'
Note: Some of the OS shell does not have this problem such as bash.
tw_cli(8) reporting has changed (hopefully for better). The intent has been to provide a consistent tabular reporting so that relevant and important information (such as B<info>) are made available as fast as possible. For example, firmware, PCB, PCHIP and similar information have been removed from the info summary report, as this type of information is not frequently needed.
The new style also accommodates automation much better by providing consistent columns with or without values so that it could be easily parsed. The intent is to make CLI yet another API (to approach it).
However to accommodate current automations around tw_cli and to ease the migration, the old behavior can still be requested by setting TW_CLI_STYLE environment variable to OLD as follows:
If Bash, then "export TW_CLI_STYLE=OLD" If csh, then "setenv TW_CLI_STYLE OLD" if Windows, then "set TW_CLI_STYLE=OLD"
This backward compatibility window, will be communicated by official AMCC/3ware representatives.
On the 9K series of controllers, the rebuild scheduling controls both rebuild and
initialize processes if it is enabled. Currently, tw_cli(8)
does not have any direct command to pause or resume an initialization process.
If such action is needed, use the rebuild scheduling to handle it.
=head1 ENVIRONMENT VARIABLES
TW_CLI_STYLE setting this variable to OLD, will provide the old reporting style. TW_CLI_INPUT_STYLE setting this variable to OLD, will disable focus feature in the interactive mode.
Medi Montaseri
AMCC/3ware CLI User Guide AMCC/3ware User Guide AMCC/3ware Installation Guide http://www.amcc.com