3ware 8000 Series CLI

Command Line Interface
PN 900-0024-00, Revision E
April 23, 2003
User Guide
CLI
for Linux

Copyright

Trademarks

3ware, the 3ware logo, Escalade, StorSwitch, TwinStor, R5 Fusion and 3DM are all registered trademarks of 3ware, Inc. All other trademarks herein are property of their respective owners.

Disclaimer

3ware, Inc. assumes no responsibility for errors or omissions in this docu­ment, nor does 3ware, Inc. make any commitment to update the informa­tion contained herein.
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Ways to Run the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
1) Interactive with command interface . . . . . . . . . . . . . . . . . .4
2) Single command with output . . . . . . . . . . . . . . . . . . . . . . . .4
3) Multiple commands through an input file . . . . . . . . . . . . . .5
Controller Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
The info command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . . .7
Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
The set command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . .12
Array Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
The maint command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . .17
Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
The alarms command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 4
Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . .35
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
The help command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . .36
3ware Technical Support and Services . . . . . . . . . . . . . . . . . 40
Sales and ordering information . . . . . . . . . . . . . . . . . . . . . . . . . 40
Feedback on this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
iii

Introduction

Introduction
The Command Line Interface (CLI) for Linux is provided to manage 7000 and 8000 series 3ware Esca lade trollers. Multipl e syst ems con taini ng Esca lade cont roll ers ma y be managed using the CLI via a command line or script. CLI is use­ful in environmen ts where a graphical user interface (GUI) is not available.
ATA RAID con-
1 www.3ware.com

Features

Features
The 3ware CLI provides the basic functionality of the 3ware Disk
®
Management (3DM You can view array status and version information, and perform maintenance functions like adding or removing dri ves. CLI also includes advanced featu res for reconfiguring RAID arrays online.
) utility through a Command Line Interface.
Note:
User’s Guide for complete information on 3DM and for configuring or upgrading your computer.
The CLI command set is listed below and described in detail in the Command Line Interface chapter of this guide:
• info - to view basic controller information
• alarms - to disp lay a list of AENs for all controllers
• set - to display and modify current settings
• maint - to perform drive and RAID arr ay maint enance opera­tions for a single controller
• help - to display a li st of commands and options
Refer to the Escalade ATA RAID Controller
www.3ware.com 2

Installation

Installation
You will need to be root or have root privileges to install the CLI to /usr/sbin and to run the CLI.
Filename: tw_cli.tar
To install the CLI, type the following as root:
tar xf tw_cli.tar -C /usr/sbin
To install the CLI to a different location, change /
usr/sbin/
to the
desired location.
Note:
The installation location needs to be in the envi­ronment path for root to execu te the CLI without using complete pa ths (i.e., if installed to /
usr/sbin/
, you can type tw_cli on the command line, otherwise you will have to type the com p le te path:
Warning!
/home/user/tw_cli
).
For all of the func ti ons of the CLI to work properly, you must have the proper CLI, firmware, and driver versi ons installed. Check www.3ware.com for the latest versions
and upgrade instructions. If the proper firmware and driver versions are not installed CLI will not report the controller when issuing the info command.
3 www.3ware.com

Command Line Interface

Command Line Interface
Note:
In this chapter, text surrounded by [] brackets
indicates optional par amet er s.

Ways to Run the CLI

1) Interactive with command interface
tw_cli
Description:
Execute tw_cli to get into a console where you can interactively enter commands to get, set or maintain your Escalade.
Example:
tw_cli 3ware CLI>
The main prompt is display ed when the program is awaiting a com­mand.
3ware CLI>
2) Single command with output
tw_cli <command line arguments>
CLI run command
Description:
This command doesn’t invoke the main CLI prompt if used with com­mand line arguments.
Syntax:
tw_cli <command line arguments>
www.3ware.com 4
3ware Escalade ATA RAID Controller CLI User Guide
Example:
tw_cli info c 0 u0
3) Multiple commands through an input file
tw_cli -f <filename>
CLI run command
Description:
This method executes a specific filename, where the filename is the name of a text file containing a list of CLI commands which the user types in advance. Each command should be on a separate line.
Syntax:
tw_cli -f <filename>
Example:
tw_cli -f clicommand.txt
Note:
All examples given in the follo w ing sections will
reflect the interactive mode method.

Controller Information

Note:
identification.
The
info
command
The info command provides information about the 3ware Escalade controller, the attached drives, and configured RAID arrays or units. This command is for querying purposes only. To make modi­fications use the set command to change the settings and the maint command to maintain the R A ID arrays.
5 www.3ware.com
Commands will be displayed in italics for easy
Command Line Interface
Specific options for the info command:
•Controller in formation options
- model - provides the controller model number
- firmware - provides the controller firmware version
- bios - provides the controller bios version
- monitor - provides the controller monitor version
- driver - provides the controller driver version.
- serial - provides the controller serial number
- pcb - provides the controller revision number
- achip - provides the controller achip version
- pchip - provides the contro ller pchip version
- numunits - provides the number of units on the controller
- numports - provides the number of ports on the controller
- numdrives - provides the number of drives on the controller
- allunitstatus - provides simple numeric status for all units
- drivestatus - provides the status of drives on the controller
•Unit information options
- status - provides the status of a specific unit
- rebuildstatus - provides percent complete of rebuild
- verifystatus - provides percent complete of verify
- initializestatus - provide percent complete of initialization.
•Port (drive) information options
- status - provides the status of a drive on the controller
- model - provides the drive manufacturer model number
- serial - provides the drive serial number
- capacity - provides drive capacity
- smart - provides SMART data in hex format for troubleshooting a drive
Syntax:
info [c<c>[u<u>|p<p>][item]]
www.3ware.com 6
3ware Escalade ATA RAID Controller CLI User Guide
Note:
Ιf c is not specified, information for all controllers is dis-
played, including a brief description of each.
Ιf only c is specified, information about the cth controller is
provided in detail.
Ιf c is specified and u is also specified, information about the uth unit on the cth controller is provided in detail.
Ιf c is specified and u is also specified with status, text and hex code of the status is displayed in the form OK (0xFF). Also, an error code is returned, bi t masking bad drives if any of the drives used by the array are bad. For example, if port 2 is bad, the return code would be 4 (in hex).
Ιf c is specified and u is also specified with rebuildstatus, then the status of the array is displayed (e.g., 0=array is not rebuilding, 1-99 = the percentage of the rebuild)
Ιf c is specified and p is also specified, information about
the pth port on the cth controller is displayed.
Examples using Interactive Mode
info
Example:
3ware CLI> info
Sample of output:
List of controllers
------------------­Controller 1: Escalade 7000-2 (2 ports) Controller 0: Escalade 7500-8 (8 ports)
7 www.3ware.com
Command Line Interface
info
for specific controller
Example:
3ware CLI> info c0
Sample of output:
Controller 0
-----------­Model: 7500-8 FW: FE7X 1.05.00.034 BIOS: BE7X 1.08.00.038 Monitor: ME7X 1.01.00.035 Serial #: D415TGZE PCB: Rev B Achip: 3.2 Pchip: 1.3
# of units: 3
Unit 0: RAID 5 60 .3 GB (117262 592 blocks ): REBUILDING (2%) Unit 3: JBOD 20.48 GB (40000464 blocks): OK Unit 4: RAID 1 81 .96 GB (16008 4480 block s) : VERIFYING (16%)
# of ports: 8
Port 0: MAXTOR 98196H8 V80EDX1C 81.96 GB (160086528 blocks): OK(unit 0) Port 1: Maxtor 98196H8 V80539XC 81.96 GB (160086528 blocks): OK(unit 0) Port 2: Maxtor 98196H8 V80539RC 81.96 GB (160086528 blocks): OK(unit 0) Port 3: Maxtor 92048D8 W802SE1A 20.48 GB (40000464 blocks): OK (unit 3) Port 4: Maxtor 98196H8 V80HRGRC 81.96 GB (160086528 blocks): OK (unit 4) Port 5: Maxtor 98196H8 V80HRGFC 81.96 GB (160086528 blocks): OK (unit 4) Port 6: DRIVE NOT PRESENT Port 7: DRIVE NOT PRESENT
www.3ware.com 8
3ware Escalade ATA RAID Controller CLI User Guide
info
Example:
3ware CLI> info c0 u0
for specific unit on a controller
Sample of output:
Controller 0, Unit 0
-------------------­Status: REBUILDING (54%) Unit type: RAID 5 Size: 60.3 GB (117262592 blocks) # of subunits: 3
Subunit 0: CBOD: OK Physical Port: 0 Logical Port: 0
Subunit 1: CBOD: OK Physical Port: 1 Logical Port: 1
Subunit 2: CBOD: OK Physical Port: 2 Logical Port: 2
info
Example:
3ware CLI> info c0 p0
9 www.3ware.com
for specific por t (dr ive)
Sample of output:
Controller 0, Port 0
---------------------­Status: OK Model: MAXTOR 98196H8 Size: 81.96 GB (160086528 blocks) FW: ZAH814Y0 Serial #: V80EDX1C Unit: 0
Command Line Interface
info
for specific code versions on a specific controller
(firmware, bios, monitor, model, driver)
Example:
3ware CLI> info c0 firmware
Sample of output:
FE7X 1.12.34.24
info
Example:
3ware CLI> info c0 p0 serial
info
Example:
3ware CLI> info c0 p0 smart
for specific por t (dr ive)
Sample of output:
D415TGZE
for SMART data on a specific drive
Sample of output:
10 00 01 0A 00 FD FC A8 00 00 00 00 00 00 03 27 00 C8 C8 52 53 00 00 00 00 00 04 32 00 FD FD 63 00 00 00 00 00 00 05 33 00 FD FD 00 00 00 00 00 00 00 06 01 00 FD FD 00 00 00 00 00 00 00 07 0A 00 FD FC 00 00 00 00 00 00 00 08 27 00 FC EF 49 BC 00 00 00 00 00 09 32 00 F6 F6 F4 69 00 00 00 00 00 0A 2B 00 FD FC 00 00 00 00 00 00 00 0B 2B
Note:
www.3ware.com 10
The SMART data is displayed in hex format.
3ware Escalade ATA RAID Controller CLI User Guide
drivestatus
Description:
To get a general status of the drives of a controller.
Example:
3ware CLI> info c0 drivestatus
Sample of output:
# of ports: 4
Port 0: Maxtor 98196H8 V8096CC C 81.96 GB (160 086528 blocks): OK (unit 0) Port 1: DRIVE NOT PRESENT Port 2: DRIVE NOT PRESENT Port 3: Maxtor 98196H 8 V805W6SC 81 .96 GB (16008 6528 blocks): OK (unit 0)
rebuildstatus
Example:
3ware CLI> info c0 u2 rebuildstatus
Sample of output:
60
Controller not found
Example:
3ware CLI> info c2
Sample of output:
Invalid controller id specified, no control­ler with id 2 exists.
11 www.3ware.com
Loading...
+ 30 hidden pages