This article explains how to use the 3ware RAID controller administration program.
Introduction
- When you download the program, please make sure you select the architecture suitable for your operating system (
x86
for 32Bit systems andx86_64
for 64Bit systems). - After downloading it, extract the archive into a directory of your choice.
- If you use it within a UNIX system (Linux/BSD), we recommend making it executable and copying it to the
/bin
folder to make it convenient to use:cd /path/to/extracted/tw_cli/ chmod +x tw_cli cp tw_cli /bin/tw_cli
How to read the status of the hardware-based RAID
First, please obtain the identifier of the installed RAID controller using the following command:
tw_cli show
Ctl Model (V)Ports Drives Units NotOpt RRate VRate BBU
------------------------------------------------------------------------
c0 9750-4i 36 36 4 0 1 1 OK
In this example, the controller is identified as c0
. Replace the c0
examples of this article with the appropriate number.
You can get the status of the RAID by using the following command:
tw_cli /c0 show
Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy
------------------------------------------------------------------------------
u0 RAID-1 OK - - - 698.637 ON -
Port Status Unit Size Blocks Serial
---------------------------------------------------------------
p0 OK u0 698.63 GB 1465149168 S13UJ1CQ704597
p1 OK u0 698.63 GB 1465149168 S13UJ1BQ708871
In this example, one unit u0
is active, which consists of two drives – p0
and p1
. Replace u0
, p0
and p1
in the following examples with the identifiers that you obtain.
How to set up a hardware-based RAID
Regardless of whether you just need to make changes to the mode of an existing RAID, or if you need to set up a new RAID, first delete the existing unit(s):
tw_cli maint deleteunit c0 u0
As you have to specify multiple drives in the following commands, please be aware that :
is used for enumerations (like comma) and -
for ranges. For example p0:1:2
is the same as p0-2
.
Set up RAID 0 (with two drives, not recommended!):
tw_cli maint createunit c0 rraid0 p0:1
Set up RAID 1 (with two drives):
tw_cli maint createunit c0 rraid1 p0:1
Set up RAID 5 (with three drives):
tw_cli maint createunit c0 rraid5 p0:1:2
Set up RAID 5 (with four drives):
tw_cli maint createunit c0 rraid5 p0:1:2:3
Set up RAID 5 (with four drives and a starting size of 200GB):
tw_cli
//rescue> /c0 add type=raid5 disk=0:1:2:3 v0=200
Setup RAID 6 (with four drives):
tw_cli maint createunit c0 rraid6 p0-3
How to use the drives as JBOD
The 3ware 9650SE controller can configure the drives as JBOD, which makes them usable as one large unit with the capacity of the sum of all the drives. However, LSI/3ware recommends that the drives instead be configured as single drives.
Show current state:
tw_cli /c0 show exportjbod
/c0 JBOD Export Policy = off
Enable JBOD:
tw_cli /c0 set exportjbod=on
Enabling JBOD Export Policy on /c0... Done.
How to start a REBUILD using tw_cli with a DEGRADED RAID
First, check the status of the RAID controller:
tw_cli /c0 show
Example for RAID 1:
Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy
------------------------------------------------------------------------------
u0 RAID-1 DEGRADED - - - 698.637 ON -
Port Status Unit Size Blocks Serial
---------------------------------------------------------------
p0 DEGRADED u0 698.63 GB 1465149168 S13UJ1KS210609
p1 OK u0 698.63 GB 1465149168 S13UJ1NQ600102
You need to delete the DEGRADED
drives from the array:
tw_cli maint remove c0 p0
If one of the drives is faulty, request a replacement drive. Then you need to rescan the controller:
tw_cli maint rescan c0
Now you can restart the rebuild of the array:
tw_cli maint rebuild c0 u0 p0
As soon as this is done, the rebuild will start and you can query the status:
tw_cli /c0 show rebuild
When you start the rebuild, the output will look like this:
Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy
------------------------------------------------------------------------------
u0 RAID-1 REBUILDING 5 - - 698.637 ON -
Port Status Unit Size Blocks Serial
---------------------------------------------------------------
p0 DEGRADED u0 698.63 GB 1465149168 S13UJ1KS210609
p1 OK u0 698.63 GB 1465149168 S13UJ1NQ600102
If the rebuild is interrupted due to ECC errors, you can force a rebuild (not recommended):
tw_cli /c0/u0 start rebuild ignoreECC
Other useful commands
Show help and controller details
tw_cli help
Show controller and configuration information
tw_cli info c0
Read out the SMART values of a drive
- For series 6000, 7000, and 8000 controllers:
smartctl -a -d 3ware,p0 /dev/twe0
- For series 9000 controllers:
smartctl -a -d 3ware,p0 /dev/twa0
- For series 9750 controllers:
smartctl -a -d 3ware,p0 /dev/twl0
Export a drive
tw_cli /c0/p0 export
Set a drive as a hot spare
tw_cli /c0 add raidtype=spare disk=2