Tw cli

From Wikitech

Some of our hardware raid controllers are controlled by the tw_cli command line tool. Most machines that have hardware arrays will have it installed but if not then you can grab it from the vendor 3ware.

Once on a machine you can start interacting with the controller by doing the following

 root@amane:~# tw_cli 
 //amane> ?

 Copyright(c) 2004 Applied Micro Circuits Corporation(AMCC). All rights reserved.
 Copyright(c) 2002, 2003, 2004 3ware, Inc.  All rights reserved.

 AMCC/3ware CLI (version 2.00.02.009)


 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 only)
 quit      Exits the CLI.
           ---- New Command Syntax ----
 focus     Changes from one object to another.  For Interactive Mode Only!
 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).        (Windows only)
 /cx       Controller specific commands.
 /cx/ux    Unit specific commands.
 /cx/px    Port specific commands.
 /cx/bbu   BBU specific commands.                                  (9000 only)

To check up on the controller use the info command

 //amane> info

 Ctl   Model        Ports   Drives   Units   NotOpt   RRate   VRate   BBU
 ------------------------------------------------------------------------
 c0    9500S-8      8       7        1       1        2       4       Fault    
 c1    7006-2       2       2        1       0        2       -       -        
 c2    9500S-8      8       8        1       1        3       4       OK  

In this case c0 is showing us a serious fault. To find the details of the failure take a look at

//amane> info c0  

 Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC
 ------------------------------------------------------------------------------
 u0    RAID-10   INOPERABLE     -      64K     1490.07   OFF    OFF      OFF      

 Port   Status           Unit   Size        Blocks        Serial
 ---------------------------------------------------------------
 p0     DEGRADED         u0     372.61 GB   781422768     WD-WMAMY12171 
 p1     OK               u0     372.61 GB   781422768     WD-WMAMY12171 
 p2     OK               u0     372.61 GB   781422768     WD-WMAMY17829 
 p3     OK               u0     372.61 GB   781422768     WD-WMAMY11772 
 p4     SMART-FAILURE    u0     372.61 GB   781422768     WD-WMAMY12171 
 p5     NOT-PRESENT      -      -           -             -
 p6     OK               u0     465.76 GB   976773168     WD-WCAS877686 
 p7     OK               u0     372.61 GB   781422768     WD-WMAMY12170 

 Name  OnlineState  BBUReady  Status    Volt     Temp     Hours  LastCapTest
 ---------------------------------------------------------------------------
 bbu   On           No        Fault     TooLow   TooLow   0      xx-xxx-xxxx

Once the hardware fault has been identified, please add the repair to the Data Center tasks page.