3ware - CLI UserGuide
3ware - CLI UserGuide
Command Line Interface for Linux For use on 7000 and 8000 Series Escalade ATA RAID Controllers
PN 720-0087-00, Revision A August 30, 2002
User Guide
Copyright 2002 3ware, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form by any means, electronic, mechanical, photocopying, recording or otherwise, without the proper written consent of 3ware, Inc., 701 East Middlefield Road, Suite 300, Mountain View CA 94043. 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 document, nor does 3ware, Inc. make any commitment to update the information 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 . . . . . . . . . . . . . . . . . . . . . 13 Array Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 The maint command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . . 15 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 The help command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . . 18
3ware Technical Support and Services . . . . . . . . . . . . . . . . . 22
iii
Introduction
Introduction
The Command Line Interface (CLI) for Linux is provided to manage 7000 and 8000 series 3ware Escalade ATA RAID controllers. Multiple systems containing Escalade controllers may be managed using the CLI via a command line or script. CLI is useful in environments were a graphical user interface (GUI) is not available.
www.3ware.com
Features
Features
The 3ware CLI provides the basic functionality of the 3ware Disk Management (3DM) utility through a Command Line Interface. You can view array status and version information, and perform maintenance functions like adding or removing drives.
Note: Refer to the Escalade ATA RAID Controller
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 set - to display and modify current settings maint - to perform maintenance operations help - to display a list of commands and options
www.3ware.com
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 to a different location, change /usr/sbin/ to the desired location.
Note: The installation location needs to be in the environment path for root to execute the CLI without using complete paths (i.e., if installed to /usr/sbin/, you can type tw_cli on the command line, otherwise you will have to type the complete path: /home/user/tw_cli).
www.3ware.com
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 Escalade CLI>
This command doesnt invoke the main CLI prompt if used with command line arguments.
Syntax:
www.3ware.com
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:
Controller Information
Note: Commands will be displayed in italics for easy
indentification.
The info command The info command provides basic information on the controller, unit and port. This command is for querying purposes only. To make modifications use the set or maint command.
www.3ware.com
Syntax:
info [c<c>[u<u>|p<p>]]
www.3ware.com
Note: f c is not specified, information for all controllers is displayed, 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, bit 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.
info
Example: Escalade CLI> info Sample of output: List of controllers ------------------Controller 1: Escalade 7000-2 (2 ports) Controller 0: Escalade 7500-8 (8 ports)
www.3ware.com
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 (117262592 blocks): REBUILDING (2%) Unit 3: JBOD 20.48 GB (40000464 blocks): OK Unit 4: RAID 1 81.96 GB (160084480 blocks) : VERIFYING (16%) # of ports: 8 Port 0: MAXTOR 98196H8 V80EDX1C (160086528 blocks): OK(unit 0) Port 1: Maxtor 98196H8 V80539XC (160086528 blocks): OK(unit 0) Port 2: Maxtor 98196H8 V80539RC (160086528 blocks): OK(unit 0) Port 3: Maxtor 92048D8 W802SE1A (40000464 blocks): OK (unit 3) Port 4: Maxtor 98196H8 V80HRGRC (160086528 blocks): OK (unit 4) Port 5: Maxtor 98196H8 V80HRGFC (160086528 blocks): OK (unit 4) Port 6: DRIVE NOT PRESENT Port 7: DRIVE NOT PRESENT
www.3ware.com
www.3ware.com
www.3ware.com
10
unitstatus
Description:
drivestatus
Description:
# of ports: 4 Port 0: Maxtor 98196H8 V8096CCC 81.96 GB (160086528 blocks): OK (unit 0) Port 1: DRIVE NOT PRESENT Port 2: DRIVE NOT PRESENT Port 3: Maxtor 98196H8 V805W6SC 81.96 GB (160086528 blocks): OK (unit 0)
rebuildstatus
Example: Escalade CLI> info c0 u2 rebuildstatus Sample of output: 60
11
www.3ware.com
Settings
The set command
The set command can be used to display and modify settings.
rebuild - sets the rebuild rate (per controller basis) cache - enables or disables caching on a per array unit basis for RAID 1, 5, and 10 arrays.
Warning!
Syntax:
www.3ware.com
12
set
Description:
Using the set command without the rebuild or cache options displays the current configuration, as shown below:
Example: Escalade CLI> set Sample of output: Controller 1 ======================================= Rebuild Rate setting for Controller 1 ------------------------------------1 (Fastest Rebuild) Cache Settings for Controller 1 -------------------------------Unit 0: ON Controller 0 ======================================= Rebuild Rate setting for Controller 0 ------------------------------------1 (Fastest Rebuild) Cache Settings for Controller 0 -------------------------------Unit 0: ON
13
www.3ware.com
set rebuild
Description:
Array Maintenance
The maint command
The maint command enables a user to perform maintenance operations on the controller, its units, and drives. It is recommended that you use the info command first to query the controller information prior to using the maint command. The array maintenance feature supports:
add - adds a drive. The new drive can be specified as a hot spare or as a new JBOD after it is physically connected to the controller. If not specified, it is added as a CBOD; a configurable JBOD which can be used to rebuild a degraded array.
www.3ware.com
14
remove - removes a drive from a port. After this is done, a drive can safely be removed from the controller. rebuild - rebuilds a degraded array. Specify a unit number on a controller you want to rebuild, along with the port number of an available disk drive. Specifying the ignoreECC option continues the rebuild even if ECC errors are detected. flush - flushes cache on the controller(s). verify - verifies the redundancy of a RAID 1, RAID 10, or RAID 5 array.
Warning! If you try to add a JBOD, you must add it to a port that was a JBOD prior to removal of the drive.
Syntax: maint [ add c<c> p<p> [JBOD|SPARE] | remove c<c> p<p> | rebuild c<c> u<u> [s<s>] p<p> [ignoreECC]| flush c<c> [u<u>] verify c<c> u<u> ]
maint add
Description:
15
www.3ware.com
maint remove
Description:
To rebuild a degraded array, unit 2 (u2) on controller 0, with a disk drive that is attached to port 3.
Example: Escalade CLI> maint rebuild c0 u2 p3 Sample of output: Rebuild started on unit 2 on controller 0
To rebuild a degraded array unit 2 (u2) on controller 0, with a disk drive that is attched to port 3.
www.3ware.com
16
Example: Escalade CLI> maint rebuild c0 u2 p3 Sample of output: Replace command failed, cannot start rebuild (108)
To rebuild a degraded array, unit 2 (u2) on controller 0, with a disk drive that is attached to port 3. This is a RAID 10 array, so the (s) parameter must also be specified to indicate the subunit. Example: Escalade CLI> maint rebuild c0 u2 s0 p3 Sample of output: Rebuild started on unit 2 on controller 0
maint flush
Description:
To flush the cache on all units attached to controller 1. Example: Escalade CLI> maint flush c1 Sample of output: Flushed cache on controller 1 unit 0 Flushed cache on controller 1 unit 6 Flushed cache on controller 1 unit 8
To flush the cache only on unit 6 of controller 1. Example: Escalade CLI> maint flush c1 u6 Sample of output: Flushed cache on controller 1 unit 6
17
www.3ware.com
maint verify
Description:
Help
The help command
The help command displays a list of the CLI commands and options.
www.3ware.com
18
Type help <command> to get more details about a particular command --------------------------
Example: Escalade CLI> help info Sample of output: info [c<c>[u<u>|p<p>]] - If c is not specified, it will show all the controllers in the machine - If c is specified and u nor p is not, it will show information about the cth controller - If c is specified and u is also specified, it will show information about the uth unit on the cth controler - If c is specified and p is also specified, it will show information about the pth port on the cth controller - u and p cannot both be specified Examples: info // displays all the controller found on your machine info c0 // displays information about controller 0 info c0 u4 // displays information about unit 4 on controller 0 - Each example above can be followed by a specific option Controller (model, firmware, bios, monitor, numports, numunits, numdrives, unitstatus, drivestatus) Unit (status, rebuildstatus, verifystatus)
19
www.3ware.com
model,
serial,
capacity,
Escalade CLI> help set Sample of output: set [ rebuild c<c> <1..5> | cache c<c> u<u> [on|off] ] Examples: set rebuild c0 // rebuild rate of controller 0 Displays the
set rebuild c0 3 // sets the rebuild rate of controller 0 to 3 (medium pace) set cache c0 // Displays the cache settings for all the cacheable units on controller 0 set cache c0 u8 off // Turns off the write cache on unit 8 of controller 0 Example: Escalade CLI> help maint Sample of output: maint [ add c<c> p<p> [JBOD|SPARE] | remove c<c> p<p> | rebuild c<c> u<u> [s<s>] p<p> [ignoreECC]| flush c<c> [u<u>] verify c<c> u<u> ] Examples: maint add c0 p5 // Add a CBOD to port 5 on controller 0
www.3ware.com
20
maint add c0 p4 spare // Add a Spare drive to port 4 on controller 0 maint remove c2 p5 // Removes drive 5 on controller 2 maint rebuild c1 u4 p8 // Rebuild unit4 on controller 1 with a newly added CBOD on port 8 maint rebuild c1 u4 p8 ignoreECC // Rebuild unit4 on controller 1 with a newly added CBOD on port 8 continue rebuild even if ECC errors are detected. maint rebuild c1 u4 s1 p7 // Rebuild subunit 1 of unit 4 on controller 1 with CBOD on port 7 maint flush c0 // Flush cache from all units on controller 0 maint flush c0 u8 // Flush cache from unit 8 on controller 0 maint verify c1 u2 // Verify data on unit 2 on controller 1 Example: Escalade CLI> help quit Sample of output: quit Synonyms: q exit
21
www.3ware.com
22
www.3ware.com
www.3ware.com
23