tw-cli monitor and configure 3ware Raid Controller

In this example i am using Debian 7 with raid controller 3ware 9500S-12 PCI SATA

It is necessary to add repository for the package:

Please add deb http://hwraid.le-vert.net/debian wheezy main to /etc/apt/sources.list

Then apt-get update && apt-get install tw-cli

tw_cli is a command line tool to manage and monitor Eskaled cards

Once the package is installed we can check how the raid works :

List available controllers:
server:~# tw-cli info

Ctl Model (V)Ports Drives Units NotOpt RRate VRate BBU
————————————————————————
c0 9500S-12 2 2 1 0 2 – –

All arrays and disks from controller “c0”:
server:~# tw-cli /c0 show

Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy
——————————————————————————
u0 RAID-1 OK – – – 153.385 OFF –

Port Status Unit Size Blocks Serial
—————————————————————
p0 OK u0 153.38 GB 321672960 VNRD3EC4C7J1SM
p1 OK u0 153.38 GB 321672960 VNRD3EC4C7HZZM

Enabling/Disabling Write Cache
//server> info c0

Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy
——————————————————————————
u0 RAID-1 OK – – – 232.885 OFF –

Write cache is OFF. Let’s turn it ON.
//server> set cache c0 u0 on
Setting Write Cache Policy on /c0/u0 to [on] … Done.

//server> info c0

Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache AVrfy
——————————————————————————
u0 RAID-1 OK – – – 232.885 ON –

Author:viliev