Tw cli

From Freenas
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 +
<big> THIS SITE IS NOW DEPRECATED AND IN READ-ONLY MODE. REFER TO DOC.FREENAS.ORG FOR FREENAS DOCUMENTATION.</big>
 +
 
FreeNAS® includes the '''tw_cli''' command line utility for providing controller, logical unit, and drive management for AMCC/3ware ATA RAID Controllers. The supported models are listed in the man pages for the [http://www.freebsd.org/cgi/man.cgi?query=twe twe(4)] and [http://www.freebsd.org/cgi/man.cgi?query=twa twa(4)] drivers.
 
FreeNAS® includes the '''tw_cli''' command line utility for providing controller, logical unit, and drive management for AMCC/3ware ATA RAID Controllers. The supported models are listed in the man pages for the [http://www.freebsd.org/cgi/man.cgi?query=twe twe(4)] and [http://www.freebsd.org/cgi/man.cgi?query=twa twa(4)] drivers.
  

Latest revision as of 14:45, 17 September 2014

THIS SITE IS NOW DEPRECATED AND IN READ-ONLY MODE. REFER TO DOC.FREENAS.ORG FOR FREENAS DOCUMENTATION.

FreeNAS® includes the tw_cli command line utility for providing controller, logical unit, and drive management for AMCC/3ware ATA RAID Controllers. The supported models are listed in the man pages for the twe(4) and twa(4) drivers.

Before using this command, read its man page as it describes the terminology and provides some usage examples.

If you type tw_cli in Shell, the prompt will change, indicating that you have entered interactive mode where you can run all sorts of maintenance commands on the controller and its arrays.

Alternately, you can specify one command to run. For example, to view the disks in the array:

tw_cli /c0 show 
Unit  UnitType  Status         %RCmpl  %V/I/M  Stripe  Size(GB)  Cache AVrfy 
------------------------------------------------------------------------------
u0    RAID-6    OK             -       -       256K    5587.88   RiW   ON
u1    SPARE     OK             -       -       -       931.505   -     OFF
u2    RAID-10   OK             -       -       256K    1862.62   RiW   ON
VPort Status         Unit Size      Type  Phy Encl-Slot    Model
------------------------------------------------------------------------------
p8    OK             u0   931.51 GB SAS   -   /c0/e0/slt0  SEAGATE ST31000640SS
p9    OK             u0   931.51 GB SAS   -   /c0/e0/slt1  SEAGATE ST31000640SS
p10   OK             u0   931.51 GB SAS   -   /c0/e0/slt2  SEAGATE ST31000640SS
p11   OK             u0   931.51 GB SAS   -   /c0/e0/slt3  SEAGATE ST31000640SS
p12   OK             u0   931.51 GB SAS   -   /c0/e0/slt4  SEAGATE ST31000640SS
p13   OK             u0   931.51 GB SAS   -   /c0/e0/slt5  SEAGATE ST31000640SS
p14   OK             u0   931.51 GB SAS   -   /c0/e0/slt6  SEAGATE ST31000640SS
p15   OK             u0   931.51 GB SAS   -   /c0/e0/slt7  SEAGATE ST31000640SS
p16   OK             u1   931.51 GB SAS   -   /c0/e0/slt8  SEAGATE ST31000640SS
p17   OK             u2   931.51 GB SATA  -   /c0/e0/slt9  ST31000340NS
p18   OK             u2   931.51 GB SATA  -   /c0/e0/slt10 ST31000340NS
p19   OK             u2   931.51 GB SATA  -   /c0/e0/slt11 ST31000340NS
p20   OK             u2   931.51 GB SATA  -   /c0/e0/slt15 ST31000340NS
Name  OnlineState  BBUReady  Status    Volt     Temp     Hours LastCapTest
---------------------------------------------------------------------------
bbu   On           Yes       OK        OK       OK       212  03-Jan-2012

Or, to review the event log:

tw_cli /c0 show events 
Ctl  Date                        Severity  AEN Message
------------------------------------------------------------------------------
c0   [Thu Feb 23 2012 14:01:15]  INFO      Battery charging started
c0   [Thu Feb 23 2012 14:03:02]  INFO      Battery charging completed
c0   [Sat Feb 25 2012 00:02:18]  INFO      Verify started: unit=0
c0   [Sat Feb 25 2012 00:02:18]  INFO      Verify started: unit=2,subunit=0
c0   [Sat Feb 25 2012 00:02:18]  INFO      Verify started: unit=2,subunit=1
c0   [Sat Feb 25 2012 03:49:35]  INFO      Verify completed: unit=2,subunit=0
c0   [Sat Feb 25 2012 03:51:39]  INFO      Verify completed: unit=2,subunit=1
c0   [Sat Feb 25 2012 21:55:59]  INFO      Verify completed: unit=0
c0   [Thu Mar 01 2012 13:51:09]  INFO      Battery health check started
c0   [Thu Mar 01 2012 13:51:09]  INFO      Battery health check completed
c0   [Thu Mar 01 2012 13:51:09]  INFO      Battery charging started
c0   [Thu Mar 01 2012 13:53:03]  INFO      Battery charging completed
c0   [Sat Mar 03 2012 00:01:24]  INFO      Verify started: unit=0
c0   [Sat Mar 03 2012 00:01:24]  INFO      Verify started: unit=2,subunit=0
c0   [Sat Mar 03 2012 00:01:24]  INFO      Verify started: unit=2,subunit=1
c0   [Sat Mar 03 2012 04:04:27]  INFO      Verify completed: unit=2,subunit=0
c0   [Sat Mar 03 2012 04:06:25]  INFO      Verify completed: unit=2,subunit=1
c0   [Sat Mar 03 2012 16:22:05]  INFO      Verify completed: unit=0
c0   [Thu Mar 08 2012 13:41:39]  INFO      Battery charging started
c0   [Thu Mar 08 2012 13:43:42]  INFO      Battery charging completed
c0   [Sat Mar 10 2012 00:01:30]  INFO      Verify started: unit=0
c0   [Sat Mar 10 2012 00:01:30]  INFO      Verify started: unit=2,subunit=0
c0   [Sat Mar 10 2012 00:01:30]  INFO      Verify started: unit=2,subunit=1
c0   [Sat Mar 10 2012 05:06:38]  INFO      Verify completed: unit=2,subunit=0
c0   [Sat Mar 10 2012 05:08:57]  INFO      Verify completed: unit=2,subunit=1
c0   [Sat Mar 10 2012 15:58:15]  INFO      Verify completed: unit=0

If you add some disks to the array and they are not showing up in the GUI, try running the following command:

tw_cli /c0 rescan

Use the drives to create units and export them to the operating system. When finished, run camcontrol rescan all and they should now be available in the FreeNAS® GUI.

This forum post contains a handy wrapper script that will notify you of errors.

Personal tools
Navigation