NAME

tw_cli(8) - 3ware Storage Controller Management Command Line Interface.


SYNOPSIS

 tw_cli                 Interactive Mode
 tw_cli -f file         Process from a file
 tw_cli command         Process single command (batch mode)


DESCRIPTION

tw_cli(8) is a Command Line Interface Storage Management Software for 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 (aka 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.

The functionality provided by tw_cli(8) can be divided into the following categories:

info
A collection of sub-commands under this category allows you to view attributes of objects such as controllers, logical units and drives. This is a read-only operation.

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

sched
This is a read/write operation. It allows you to set background tasks associated with a controller. Background tasks are executed concurrent to I/O and management operations.

alarms
Displays alarms, which have been generated by controllers. Alarms or AENs (Asynchronous Event Notification) have different levels of severity. These can be extracted and archived for overall trend analysis.

set
Displays or modifies controller settings such as enabling or disabling cache on units, turning auto-verify on or off.

help
Display help on various sub-commands.

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

Info Commands

Info commands are read-only operations showing various values of controllers, units and drives.

info
Provides information on all detected controllers. Note that the appropriate kernel device drivers should be loaded for the list to show all controllers. The intention is to provide a global view of the environment.

Typical output looks like:

 3ware CLI> info
 Ctl     Model           Ports   Drives  Units   NotOpt   RRate   VRate
 ---------------------------------------------------------------------
 c0      7500-12         12      8       3       1        2       -
 c1      9506S-12        12      6       1       0        3       5

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). Not Optimal refers to any state except OK and VERIFYING. Other states include INITIALIZING, REBUILDING, DEGRADED, MIGRATING, and INOPERABLE.

info cid
Provides an overall summary information on controller cid. This report consists of two parts; a Unit summary listing all present units, and a Port summary section listing of all present disks and their attached ports.

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

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.

Additional attributes about controllers, units, ports and disks can be obtained by querying for them explicitly. See other info sub-commands below.

Typical output looks like:

 3ware CLI> info c0
 Unit   UnitType       Status         %Cmpl   Stripe  Size(GB) Cache  AVerify  OvrECC
 ------------------------------------------------------------------------------------
 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      -      -           -             -

info cid driver
This command reports the device driver version associated with controller cid.

Example:

 3ware CLI> info c0 driver
 /c0 Driver Version = 1.02.00.036

info cid model
This command reports the controller model of controller cid.

Example:

 3ware CLI> info c0 model
 /c0 Model = 7500-12

info cid firmware
This command reports the firmware version of controller cid.

Example:

 3ware CLI> info c0 firmware
 /c0 Firmware Version = FGXX 2.01.00.025

info cid bios
This command reports the BIOS version of controller cid.

Example:

 3ware CLI> info c0 bios
 /c0 BIOS Version = BG9X 2.01.00.026

info cid monitor
This command reports the monitor (firmware boot-loader) version of controller cid.

Example:

 3ware CLI> info c0 monitor
 /c0 Monitor Version = BLDR 1.00.00.008

info cid serial
This command reports the serial number of the specified controller cid.

Example:

 3ware CLI> info c0 serial
 /c0 Serial Number = F12705A3240009

info cid pcb
This command reports the PCB (Printed Circuit Board) revision of the specified controller cid.

Example:

 3ware CLI> info c0 pcb
 /c0 PCB Version = Rev3

info cid pchip
This command reports the PCHIP (PCI Interface Chip) version of the specified controller cid.

Example:

 3ware CLI> info c0 pchip
 /c0 PCHIP Version = 1.30-33

info cid achip
This command reports the ACHIP (ATA Interface Chip) version of the specified controller cid.

Example:

 3ware CLI> info c0 achip
 /c0 ACHIP Version = 3.20

info cid numports
This command reports the port capacity (number of physical ports) of the specified controller cid.

Example:

 3ware CLI> info c0 numports
 /c0 Number of Ports = 12

info cid numunits
This command reports the number of units currently managed by the specified controller cid. This report does not include off-line units (or exported units).

Example:

 3ware CLI> info c0 numunits
 /c0 Number of Units = 1

info cid numdrives
This command reports the number of drives currently managed by the specified controller cid. This report does not include (logically) removed/exported drives. Also note that physically removed disk(s) will not be detected unless I/O is performed against the disk. See info cid pid smart for a workaround.

Example:

 3ware CLI> info c0 numdrives
 /c0 Number of Drives = 5

info cid unitstatus
This command presents a list of units, their types, capacity and status currently managed by the specified controller cid.

Example:

 3ware CLI> info c0 unitstatus
 Unit   UnitType       Status         %Cmpl   Size        Blocks
 ---------------------------------------------------------------
 u0     RAID-1         OK             -       149.00 GB   312480256           
 u1     RAID-5         OK             -       298.00 GB   624960512           
 u2     SPARE          OK             -       149.04 GB   312562352

info cid allunitstatus
This command presents a count of total and NotOptimal units managed by the specified controller cid. See Info Commands for more on NotOptimal definition.

Example:

 3ware CLI> info c0 allunitstatus
 Total Units = 2
 NotOptimal Units = 0

info cid drivestatus
This command presents a list of drives, port assignment, vendor signature, size, status, and unit membership/affiliation.

Example:

 3ware CLI> 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      -      -           -             -

info cid uid
This command presents detailed information on the specified unit uid. If the unit consists of sub-units as with the case of RAID-1, RAID-5, RAID-10, RAID-50, then each sub-unit is further presented. 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:

 3ware CLI> info c0 u5
 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

info cid uid status
This command presents the status of the specified unit.

Example:

 3ware CLI> info c0 u5 status
 /c0/u5 status = DEGRADED

info cid uid rebuildstatus
This command presents the rebuildstatus (if any) of the specified unit.

Example:

 3ware CLI> info c0 u5 rebuildstatus
 /c0/u5 is not rebuilding, its current state is OK

info cid uid verifystatus
This command presents the verifystatus (if any) of the specified unit.

Example:

 3ware CLI> info c0 u5 verifystatus
 /c0/u5 is not verifying, its current state is OK

info cid uid initializestatus
This command presents the initializestatus (if any) of the specified unit.

Example:

 3ware CLI> info c0 u5 initializestatus
 /c0/u5 is not initializing, its current state is OK

info cid pid
This command presents various information on the specified disk attached to port pid. Typical information looks like:

Example:

 3ware CLI> 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.

info cid pid status
This command presents the status of the specified port.

Example:

 3ware CLI> info c0 p5 status
 /c0/p5 Status = OK

info cid pid model
This command presents the model of the specified port.

Example:

 3ware CLI> info c0 p5 model
 /c0/p5 Model = WDC WD1600BB-00DAA0

info cid pid serial
This command presents the serial number of the specified port.

Example:

 3ware CLI> info c0 p5 serial
 /c0/p5 Serial = WD-WMACK1406498

info cid pid firmware
This command presents the firmware version of the specified port.

Example:

 3ware CLI> info c0 p5 firmware
 /c0/p5 Firmware Version = 65.13G65

info cid pid capacity
This command presents the capacity, both in human readable (such as GB) and block count of the specified port. Note that at this writing, human readable format is computed based on division by 1000 (not 1024) as is popular with hard disk vendors.

Example:

 3ware CLI> info c0 p5 capacity
 149.05 GB (312581808)

info cid pid smart
This command extracts SMART (Self Monitoring Analysis and Reporting) data from the specified disk. Note that this data is actually extracted live from the disk, as such this command could be used to get most recent data about presence or lack of a disk. Be aware that extracting SMART data will burden the I/O bandwidth.

Example:

 3ware CLI> 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 attatched to the specified port is not present or there are cabling problems reaching the disk, CLI will return successful but the SMART data is all zeros. This could be one way of detecting whether a disk is present or not.

info cid diag
This command extracts controller diagnostics suitable for technical support usage. Note that some characters might not be printable or rendered correctly (human readable). It is recommended to save this output to a file, where it can be communicated to tech support or further studied with utilities like od(1).

Example:

 tw_cli info c0 diag > diag.txt

Maint Commands

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.

Use of the keyword ``maint'' is now optional. That is ``maint rescan c0'' is the same as ``rescan c0''.

maint add cid pid [jbod|spare]
This is an obsolete command, use rescan and/or createunit instead. Basically to add a port, simply use rescan. If you have a JBOD on a port, then rescan will bring the JBOD back on-line. If you wish to create a spare, simply use the createunit. Note with rescan and createunit, you also have the option to inform the OS or not (via noscan flag).

[maint] rescan [cid ...] [noscan]
This command instructs the controller to rescan all ports and reconstitute all units. The controller will update its list of ports (attached disks), and visits every DCB (Disk Configuration Block) in order to re-assemble its view and awareness of logical units.

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:

 3ware CLI> maint rescan 
 Rescanning controller /c0 for units and drives ...Done.
 Rescanning controller /c1 for units and drives ...Done.

[maint] remove cid uid [noscan]
This command allows you to remove (or export) a unit. Exporting a unit will instruct the firmware to remove the specified unit from its poll of managed units, but retains the DCB (Disk Configuration Block) meta-data. As such the unit can later be imported back. noscan is used to not inform the OS of this change. Default is to inform the OS.

[maint] remove cid pid [noscan]
This command allows you to remove (or export) a port (or drive). Exporting a port will instruct the firmware to remove the specified port form its poll of managed ports, but retains the DCB (Disk Configuration Block) meta-data on the attached disk. You can import (or re-introduce) the port via rescan. noscan is used to not inform the OS of this change. Default is to inform the OS.

[maint] deleteunit cid uid [noscan]
This command allows you to delete a unit. Deleting a unit not only remove the specified unit from the controller's list of managed units, but also destroys the DCB (Disk Configuration Block) meta-data. Ports (or disks) associated with this unit will now be part of the free poll of managed disks. This is a destructive command and should be used with care. noscan is used to not inform the OS of this change. Default is to inform the OS.

[maint] createunit cid RaidType PidList [Stripe] [noscan] [DskGrp] [nocache] [autoverify] [ignoreECC]
This command allows you to create a unit on the specified controller cid, of type RaidType, optional stripe size of Stripe, using one or many disks specified by PidList. By default the host operating system will be informed of the new block device and write cache is enabled. In case of RAID-50, you can also specify the layout of the unit by specifying the number of disks per diskgroup with DskGrp option.

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 option 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 and 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, default is g3. For 8 disks, default is g4. For 10 disks, default is g5 and for 12 disks, default is g4. Case of 12 disks could be grouped with g3, g4, or g6. g4 was set by default as it provides best net capacity and performance.

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 newly create 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 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 switch enables the ignoreECC/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 Model-UnitType. 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    |

[maint] rebuild cid uid pid [ignoreECC]
This command allows you to rebuild a DEGRADED unit by using the specified port. Rebuild only applies to redundant arrays such as RAID-1, RAID-5, RAID-10 and RAID-50. During rebuild, bad sectors on the source disk will cause the rebuild to fail. You can allow for the operation to continue via ignoreECC. Rebuild process is a background task and will change the state of a unit to REBUILDING. Various info commands also show a percent completion as rebuilding progresses.

Note that the port (disk) to be used to rebuild a unit, must be a SPARE or configured disk.

[maint] rebuild cid uid pause
This command allows you to pause the rebuild operation on the specified unit. This feature is intended for model 7000 and 8000 only. Model 9000 has an on-board scheduler where rebuild operations can be scheduled to take place at specified start and stop times. Rebuild pause and resume function is provided to enable 7000/8000 users to achieve similar functionality with use of OS provided schedulers such as cron(8), at(1) or user supplied programs.

See also Sched Commands.

[maint] rebuild cid uid resume
This command allows you to resume the rebuild operation on the specified unit. See ``rebuild cid uid pause'' for more.

[maint] flush cid [uid ...]
This command allows you to flush the write cache on the specified unit or all units associated with controller cid. Note that this command does not apply to spare unit types.

[maint] verify cid uid [stop]
This command starts/stops a background verification process on the specified unit uid. The following shows the supported matrix as a function of controller model and logical unit type. N/A (Not Applicable) refers to cases where the given logical unit type is not supported on that controller model.
 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 ignored.

[maint] mediascan cid start|stop
This command applies to 7000/8000 controllers. It provides media scrubbing for validating functionality of a disk. This includes bad block detection and remapping, etc. The commands starts or stops a media scan operation on the specified controller cid.

[maint] commit cid
This command instructs the controller to commit its dirty DCBs to persistent storage (ie disks). While controller is processing I/O requests against underlying disks, an in-transaction bit is set. If a failure (such as power failure) is experienced, subsequent read from the disks, will inform the controller that an un-clean shutdown took place. This command allows the end user to complete all pending I/Os on 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.

Note that block devices (cooked devices) do not require this and clients of block devices (such as Filesystem) will send such requests via ASPI SRB_SHUTDOWN_REQUEST.

This command only applies to Windows operating system. This command was previously known as 'shutdown'.

Sched Commands

Model 9000 supports background tasks. Background tasks include ``rebuild'', ``verify'', or ``selftest'' activities. For each activity, up to 7 tasks can be registered, known as slot 0 through 6. Each activity can be managed by this command including adding, removing, enabling and disabling a task. Background tasks have 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 AND 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). UDMA selftest 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.

SMART activity instructs the controller to check certain SMART supported thresholds by the disk vendor.

sched rebuild cid
This command displays the current rebuild background tasks as illustrated below.
 $ tw_cli sched rebuild c1
 Rebuild Schedule for Controller /c1
 ========================================================
 Slot    Day     Hour            Duration        Status
 --------------------------------------------------------
 0       Mon     2:00pm          10 hr(s)        disabled
 1       Thu     7:00pm          18 hr(s)        disabled
 2       -       -               -               -
 3       -       -               -               -
 4       -       -               -               -
 5       Mon     1:00am           4 hr(s)        disabled
 6       Sun     12:00am          1 hr(s)        disabled

Status ``disabled'' indicates that the controller will not use the tabled schedules.

sched rebuild cid add day hour duration
This command adds a new background rebuild task to be executed on day (range 0 .. 6, where 0 is Sunday), at hour (range 0 .. 23), for a duration of duration (range 1 .. 24) hours. This command will fail if no (empty) slot is available.

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.

sched rebuild cid remove slot_id
This command will remove (or unregister) the rebuild background task in slot slot_id.

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.

sched rebuild cid enable
This command will enable ALL rebuild background tasks on controller cid.

sched rebuild cid disable
This command will disable ALL rebuild background tasks on controller cid.

sched verify cid
This command displays the current verify background task as illustrated below.
 $ tw_cli sched verify c1
 Verify Schedule for Controller /c1
 ========================================================
 Slot    Day     Hour            Duration        Status
 --------------------------------------------------------
 0       Mon     2:00am           4 hr(s)        disabled
 1       -       -               -               -
 2       Tue     12:00am         24 hr(s)        disabled
 3       Wed     12:00am         24 hr(s)        disabled
 4       Thu     12:00am         24 hr(s)        disabled
 5       Fri     12:00am         24 hr(s)        disabled
 6       Sat     12:00am         24 hr(s)        disabled

Status indicates that the controller will not use the tabled schedules.

sched verify cid add day hour duration
This command adds a new background verify task to be executed on day (range 0 .. 6, where 0 is Sunday), at hour (range 0 .. 23), for a duration of duration (range 1 .. 24) hours. This command will fail if no (empty) slot is available.

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.

sched verify cid remove slot_id
This command will remove (or unregister) the verify background task in slot slot_id.

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.

sched verify cid enable
This command will enable ALL verify background tasks on controller cid. When enabled, only tabled scheduled tasks will be followed (or used). Any previous on-demand background tasks will be ignored.

sched verify cid disable
This command will disable ALL verify background tasks on controller cid.

sched selftest cid
This command displays the current selftest background task as illustrated below.
 $ tw_cli sched selftest c1
 Selftest Schedule for Controller /c1
 ========================================================
 Slot    Day     Hour            UDMA            SMART
 --------------------------------------------------------
 0       Sun     12:00am         enabled         enabled
 1       Mon     12:00am         enabled         enabled
 2       Tue     12:00am         enabled         enabled
 3       Wed     12:00am         enabled         enabled
 4       Thu     12:00am         enabled         enabled
 5       Fri     12:00am         enabled         enabled
 6       Sat     12:00am         enabled         enabled

sched selftest cid add day hour
This command adds a new background selftest task to be executed on day (range 0 .. 6, where 0 is Sunday), at hour (range 0 .. 23). Notice that selftest runs to completion and as such no duration is provided. This command will fail if no (empty) slot is available.

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.

sched selftest cid remove slot_id
This command will remove (or unregister) the selftest background task in slot slot_id.

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.

sched selftest cid enable selftest_task_id
This command will enable a particular selftest_task (UDMA or SMART). While s0 is interpreted as UDMA, s1 is interpreted as SMART.

For example:

 $ tw_cli sched selftest c1 enable s0

Will enable UDMA selftest on controller c0.

sched selftest cid disable selftest_task_id
This command will disable a particular selftest_task (UDMA or SMART). While s0 is interpreted as UDMA, s1 is interpreted as SMART.

For example:

 $ tw_cli sched selftest c1 disable s1

Will disable SMART selftest on controller c0.

Alarms Commands

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.

alarms [cid]
This command displays all available alarms on a given controller. Invoked without any controller id, will display alarms associated with all detected controllers.

Typical output looks like:

 tw_cli> 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

Set Commands

These commands allow you to view and/or set certain controller and unit specific parameters as described below.

set cid
This is an obsolete command. Info commands now show these values.

set rebuild cid 1..5
This command 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.

set verify cid 1..5
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.

set cache cid uid on|off
This command allows you to turn the write cache on a specified unit, on or off. This feature is supported on both 7000/8000 and 9000 models. The following is the RaidType-Model support matrix.
 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    |
 ------+-----+-----+-----+------+------+--------+------+-------+

set autoverify cid uid on|off
This command allows you to turn on/off the autoverify operation on a specified unit during allocated windows specified by sched verify commands. The autoverify operation is a continuous verify operation, which takes place within the window specified with ``sched verify''. While the ``sched verify'' command allows you to specify 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.

set overwriteECC cid uid on|off
This command allows you to set the ignoreECC policy for a given unit such that during rebuild of the specified unit, which could begin automatically (if the unit is degraded and spare has been defined) or manually, to be applied to the rebuild operation. Setting overwriteECC to on means ignoreECC. This feature only applies to 9000 models.

Help Commands

This command set provides brief on-line help.

help
This command provide a table of contents, providing an overall navigational help. Typical output looks like:

 3ware CLI> help
 Copyright (c) 2003 3ware, Inc.  All rights reserved.
 3ware CLI (version 2.00.00.042)

 List of Commands
 -------------------------------------------
 info   - displays information about the controller
 alarms - displays or deletes the list of AENs
 set    - displays or modifies controller settings
 maint  - performs maintenance operations on a controller
 sched  - Sets the schedule for a controller (9000 controllers only)
 quit   - exits the CLI

 Type help <command> to get more details about a particular command.

help info
This command provides specific info related help, illustrating various ways to use the info command. Info provides reports on Controllers, Units and Drives. See the Info Commands section for more on info.

help alarms
This command provides specific alarms related help, illustrating various ways to use the alarms command. See the Alarms Commands section for more.

help set
This command provides specific set related help, illustrating various ways to use the set command. See the Set Commands section for more.

help maint
This command provides specific maintenance related help, illustrating various ways to use the maint command. See the Maint Commands section for more.

help sched
This command provides specific scheduling related help, illustrating various ways to use the sched command. See the Sched Commands section for more.

help quit
This command provides specific quit related help, illustrating various ways to use the quit command. See the Quit Commands section for more.


RETURN CODE

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.


ERRATA

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 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 3Ware representatives.


ENVIRONMENT VARIABLES

TW_CLI_STYLE setting this variable to OLD, will provide the old reporting style.


AUTHOR

Medi Montaseri, support@3ware.com


SEE ALSO

 3Ware CLI User Guide
 3Ware User Guide
 3Ware Installation Guide
 http://www.3ware.com