How to use TW CLI


TW_CLI is a CLI tool for 3Ware RAID cards configuration. It provides in-depth control, various RAID configurations, monitoring and general tweaking of the present devices.

The following are a few examples of some useful commands.

You can either invoke the tool by 1. inserting tw_cli followed by enter or 2. run the commands directly by including the tw_cli as the first argument.

  1. tw_cli > Enter > //hostname > show.
  2. tw_cli show > output on new line.

* Show controller details and configuration

tw_cli help

* List controllers

tw_cli show

Ctl   Model        (V)Ports  Drives   Units   NotOpt  RRate   VRate  BBU
c0    9750-4i      36        36       4       0       1       1      OK

* Show controller and configuration info

tw_cli info c0

* Remove drive from configuration

tw_cli maint remove c0 p0

* Rescan devices

tw_cli maint rescan c0

* Export disk

tw_cli /c0/p0 export

* Send rebuild request

maint rebuild c0 u1 p0

* Delete unit

tw_cli maint deleteunit c0 u1

* Add disk as spare

tw_cli /c0 add raidtype=spare disk=2

* Create a new RAID

tw_cli maint createunit c0 rraid1

* Create a new RAID 6 with a selection of disks

tw_cli maint createunit c0 rraid6 p01:5-30

* : is used as comma , – as interval

There are plenty more commands available , these are the basic essentials.

Recent Posts