Free Essay

3ware Cli Ug

In:

Submitted By hisunny
Words 6727
Pages 27
Command Line Interface for Linux

CLI

PN 900-0024-00, Revision E

April 23, 2003

User Guide

Copyright ©2003 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., 455 West Maude Avenue, Sunnyvale, CA 94085. 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 . . . . . . . . . . . . . . . . . . . . .12 Array Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 The maint command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Examples using Interactive Mode . . . . . . . . . . . . . . . . . . . . .17 Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 The alarms command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 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 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 where a graphical user interface (GUI) is not available.

1

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. CLI also includes advanced features for reconfiguring RAID arrays online.
Note: Refer to the Escalade ATA RAID Controller

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 display a list of AENs for all controllers • set - to display and modify current settings • maint - to perform drive and RAID array maintenance operations for a single controller • help - to display a list of commands and options

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 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).

Warning!

For all of the functions of the CLI to work properly, you must have the proper CLI, firmware, and driver versions 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 parameters.

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 displayed when the program is awaiting a command.
3ware CLI>

2) Single command with output

tw_cli
CLI run command Description:

This command doesn’t invoke the main CLI prompt if used with command line arguments.
Syntax:

tw_cli

www.3ware.com

4

3ware Escalade ATA RAID Controller CLI User Guide

Example: tw_cli info c0 u0

3) Multiple commands through an input file

tw_cli -f
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 Example: tw_cli -f clicommand.txt

Note: All examples given in the following sections will

reflect the interactive mode method.

Controller Information
Note: Commands will be displayed in italics for easy

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 modifications use the set command to change the settings and the maint command to maintain the RAID arrays.

5

www.3ware.com

Command Line Interface

Specific options for the info command: • Controller information 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 controller 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 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. 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

• Unit information options

• Port (drive) information options

Syntax:

info [c[u|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 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.

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 (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

81.96 GB 81.96 GB 81.96 GB 20.48 GB 81.96 GB 81.96 GB

www.3ware.com

8

3ware Escalade ATA RAID Controller CLI User Guide

info for specific unit on a controller
Example: 3ware CLI> info c0 u0 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 for specific port (drive)
Example: 3ware CLI> info c0 p0 Sample of output: Controller 0, Port 0 ---------------------Status: OK Model: MAXTOR 98196H8 Size: 81.96 GB (160086528 blocks) FW: ZAH814Y0 Serial #: V80EDX1C Unit: 0

9

www.3ware.com

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 for specific port (drive)
Example: 3ware CLI> info c0 p0 serial Sample of output: D415TGZE

info for SMART data on a specific drive
Example: 3ware CLI> info c0 p0 smart Sample of output: 10 00 01 0A 00 FD FC A8 00 C8 C8 52 53 00 00 00 00 00 00 00 00 00 05 33 00 00 06 01 00 FD FD 00 00 FD FC 00 00 00 00 00 BC 00 00 00 00 00 09 32 00 00 0A 2B 00 FD FC 00

00 00 00 00 00 00 00

00 00 FD 00 00 F6 00

00 04 FD 00 08 F6 00

00 32 00 00 27 F4 00

00 00 00 00 00 69 00

00 FD 00 00 FC 00 00

03 FD 00 07 EF 00 0B

27 63 00 0A 49 00 2B

Note: The SMART data is displayed in hex format.

www.3ware.com

10

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 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: 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 controller with id 2 exists.

11

www.3ware.com

Command Line Interface

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.
Note: A value of 1 indicates slowest I/O and fastest rebuild rate. A value of 5 indicates fastest I/O and slowest rebuild. Interim values scale linearly (e.g., a value of 3 indicates a rebuild rate half as fast as a rebuild of 1).

Syntax:

set [ rebuild c | cache c u [on|off] ]

Examples using Interactive Mode

set
Description:

Using the set command without the rebuild or cache options displays the current configuration, as shown below:
Example: 3ware CLI> set Sample of output: Controller 1 ======================================= Rebuild Rate setting for Controller 1

www.3ware.com

12

3ware Escalade ATA RAID Controller CLI User Guide

------------------------------------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

Command Line Interface

set cache enable
Example: 3ware CLI> set cache c0 u0 on Sample of output: Turning the cache on for unit 0 on controller 0

set cache disable
Example: 3ware CLI> set cache c0 u0 off Sample of output: Turning the cache off for unit 0 on controller 0

Note: The Escalade ATA RAID Controller gives you a choice of disabling the write cache for your disk arrays. Write cache is used to store data locally on the drive before it is written to the disk, allowing the computer to continue with its next task. Enabling the write cache results in the most efficient access times for your computer system. There may be instances when you always want the computer to wait for the drive to write all the data to disk before going on to its next task. For this case, you must disable the write cache.

set rebuild
Description:

To set the rebuild rate of controller 0 to 3 (the middle value).

www.3ware.com

14

3ware Escalade ATA RAID Controller CLI User Guide

Example: 3ware CLI> set rebuild c0 3 Sample of output: Setting the rebuild rate of controller to 3 (Balanced rebuild and I/O)

Note: Setting the rebuild rate of a controller allows the user to set the relative performance of normal IO and background tasks.

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, as a new JBOD after it is physically connected to the controller, or a CBOD, which is a configurable JBOD that can be used to rebuild a degraded array. • remove - removes a drive from a port. After this is done, a drive can safely be removed from the controller. • createunit- creates a unit. • deleteunit - deletes a unit. • 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.

15

www.3ware.com

Command Line Interface

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 p [jbod|cbod|spare] | remove c p | createunit c r [k] p [noscan] | deleteunit c u [noscan] | rebuild c u p [ignoreECC] | flush c [u] | verify c u [stop] ]

Table 1: Createunit RAID Types and Stripe Sizes
RAID Type Createunit allows the following to be specified Stripe Size

JBOD CBOD SPARE RAID10 RAID1 RAID5

For RAID1 and RAID10: 64k, 128k, 256k, 512, and 1024k. For RAID5: 64k.

Note: Do not specify a stripe size for JBOD, CBOD, or a spare. For more information regarding RAID types, see the Escalade User Guide available at www.3ware.com.

www.3ware.com

16

3ware Escalade ATA RAID Controller CLI User Guide

Examples using Interactive Mode

maint add
Description:

To add a disk drive that is at port 3 to controller 0.

Warning! Adding a drive with the CLI, as with 3DM, requires an approved hot swap carrier. If you do not have a hot swap carrier you must power down your system before adding any new drives. Refer to the Escalade User Guide’s Hardware Installation section for physically attaching new drives and using the Disk Array Configuration Utility. Attaching a new drive without a hot swap carrier can cause a system hang and data corruption. You may even damage the drive and computer system.

Adding a RAW drive

Newly added drives, which are not specified as a CBOD, JBOD, or a spare drive, will be added as a raw device with no unit number assigned. This drive can be used later as part of the createunit command or for rebuilding a degraded array. If you reboot your system before using the raw drive it will automatically become a CBOD unit. To add a raw drive with the CLI, physically add the drive using an approved hot swap carrier and issue the following command:
Example: 3ware CLI> tw_cli maint add c0 p2 Sample of output: Successfully added a raw drive to port controller 0

2 on

17

www.3ware.com

Command Line Interface

Adding a CBOD drive

A CBOD unit is a "configurable JBOD" that will be assigned a unit number when added. This number is usually the same as the port number unless the unit number is already in use as in the case of a degraded array. If this happens the new drive will be assigned the lowest available unit number. This single CBOD unit can be used later for rebuilding a degraded array. To add a CBOD unit with the CLI, physically add the drive using an approved hot swap carrier and issue the following command:
Example: 3ware CLI> tw_cli maint add c0 p1 cbod Sample of output: Successfully added a CBOD to port troller 0

1 on con-

Adding a JBOD drive

JBOD units are “just a bunch of disks” and used just like an individual drive. This type of RAID unit is assigned a unit number when added and must be added to the same port the JBOD unit was on before. JBODs can also be configured later as part of a software RAID array instead of configuring them as a 3ware hardware RAID array. To add a JBOD unit with the CLI, physically add the drive using an approved hot swap carrier and issue the following command.
Example: 3ware CLI> tw_cli maint add c0 p0 jbod Sample of output: Successfully added a JBOD to port troller 0

0 on con-

www.3ware.com

18

3ware Escalade ATA RAID Controller CLI User Guide

When adding a JBOD drive the physical drive cannot be from a previous 3ware array including a CBOD or a spare drive. To use a drive from a previous array as a JBOD, add the drive as a raw device instead of a JBOD and then use the createunit command to overwrite the old configuration.
Adding a SPARE drive

A SPARE unit is a drive that is reserved to replace a failed drive in a redundant array. The degraded array is then automatically rebuilt. This type of RAID unit will be assigned a unit number when added. This number is usually the same as the port number unless the unit number is already in use as in the case of a degraded array. If this happens, the new drive will be assigned the lowest available unit number. Hot spares should be created immediately after creating a RAID-1, RAID-10, or RAID-5 array. To specify a hot spare with the CLI, physically add the drive using an approved hot swap carrier and issue the following command:
Example: 3ware CLI> tw_cli maint add c0 p0 spare Sample of output: Successfully added a JBOD to port troller 0

0 on con-

Alert! Hot spare drives must be equal to or larger than the drives used for the redundant array in order for the rebuild to begin.

19

www.3ware.com

Command Line Interface

maint remove
Description:

To remove a disk drive from port 3 of controller 0. Note: Drives cannot be removed if they are part of a

degraded or non-redundant array, with the exception of JBOD drives. Warning! You must first unmount a JBOD drive before issuing the remove command. Failure to do so may result in a system hang and data corruption.
Example: 3ware CLI> maint remove c0 p3 Sample of output: Successfully removed drive from port 3 on controller 0

maint createunit
Description:

To create raid arrays. The following example illustrates the creation of a RAID 5 array with a 64k stripe size with drives on ports 0 through 7 on controller 0. Note: Before creating a unit you must first use the add

command for the controller to recognize each drive after they are physically connected. Ports that have a unit number already assigned cannot be used to create a new unit. Units include RAID arrays as well as CBOD, JBOD, and spare drives. Use the info command to determine if a port already has a

www.3ware.com

20

3ware Escalade ATA RAID Controller CLI User Guide

unit number. Newly added drives, which are not specified as a CBOD, JBOD, or spare drive, will be added as a raw device with no unit number assigned. Only raw drives can be used to create a new unit. When deleting a unit, the drives also become raw devices, which can then be used to create a new unit.
Example: 3ware CLI> maint createunit c0 rraid5 k64 p0:1:2:3:4:5:6:7 Sample of output: Created unit 0

maint createunit (with noscan option)
Description:

When creating a unit with the "noscan" option the unit will not be exported or seen by the OS.
Example: 3ware CLI> maint createunit c0 rraid10 k1024 p0:1:2:3:4 noscan Sample of output: Created unit 0

Note: Since "noscan" option was specified, device sda is

not available to the OS, as shown below: linux:~ # fdisk /dev/sda Unable to open /dev/sda

21

www.3ware.com

Command Line Interface

Note: If the device needs to be added at a later time there are two options: 1) Reboot system, at which time the OS will scan and add detected arrays, or 2) Issue the following command: echo "scsi add-single-device 0 0 0 0 " >/proc/scsi/scsi

SCSI # (3ware controller #) Channel # (Always 0) ID Unit # Port # (Always 0)

Echo "scsi add-single-device 0 0 0 0">/proc/scsi/scsi

Figure 1 . maint createunit (noscan) - Add device syntax options

maint deleteunit
Description:

To delete an existing RAID array unit.
Example: 3ware CLI> maint deleteunit c0 u2 Sample of output: Deleted unit 2

Warning! Backup any critical data prior to deleting a unit. Failure to do so will result in lost data.

www.3ware.com

22

3ware Escalade ATA RAID Controller CLI User Guide

Warning! You must first unmount the SCSI device in Linux before issuing the deleteunit command. CLI will not prevent you from deleting a mounted device.

Example: Deleting 3 RAID-1 Arrays and Creating a Single RAID-5 Array 3ware CLI> info c0 Controller 0 ------------Model: 7500-12 FW: FE7X 1.05.00.042 BIOS: BE7X 1.08.00.044 Serial #: M12600A2170030 PCB: Rev3 PCHIP: V1.30 ACHIP: V3.20 # of units: 5 Unit 0: RAID Unit 2: RAID Unit 4: RAID Unit 6: RAID Unit 8: RAID

1 1 1 1 5

30.01 GB (58631296 blocks): OK 122.94 GB (240119680 blocks): OK 122.94 GB (240119680 blocks): OK 122.94 GB (240119680 blocks): OK 245.88 GB (480253440 blocks): OK

# of ports: 12 Port 0: QUANTUM FIREBALLP LM30 186013438780 30.02 GB (58633344 blocks): OK (unit 0) Port 1: QUANTUM FIREBALLP LM30 186013534268 30.02 GB (58633344 blocks): OK (unit 0) Port 2: Maxtor 4G120J6 G6037FAE 122.94 GB (240121728 blocks): OK (unit 2) Port 3: Maxtor 4G120J6 G603GLDE 122.94 GB (240121728 blocks): OK (unit 2) Port 4: Maxtor 4G120J6 G603G1RE 122.94 GB

23

www.3ware.com

Command Line Interface

(240121728 Port 5: (240121728 Port 6: (240121728 Port 7: (240121728 Port 8: (160086528 Port 9: (160086528 Port 10: (160086528 Port 11: (160086528

blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks):

OK (unit 4G120J6 OK (unit 4G120J6 OK (unit 4G120J6 OK (unit 98196H8 OK (unit 98196H8 OK (unit 98196H8 OK (unit 98196H8 OK (unit

4) G6037FPE 122.94 4) G603FZRE 122.94 6) G603F9TE 122.94 6) V80FZGRC 81.96 8) V80HRGWC 81.96 8) V80HRG2C 81.96 8) V80GXC1C 81.96 8)

GB GB GB GB GB GB GB

Step 1: Backup any data (not shown) and unmount all arrays being deleted linux:~ # umount /dev/sdb1 linux:~ # umount /dev/sdc1 linux:~ # umount /dev/sdd1

Step 2: Delete RAID arrays or units in CLI
3ware CLI> maint deleteunit c0 u2 Deleted unit 2 3ware CLI> maint deleteunit c0 u4 Deleted unit 4 3ware CLI> maint deleteunit c0 u6 Deleted unit 6

www.3ware.com

24

3ware Escalade ATA RAID Controller CLI User Guide

Note: sda and sde remains available, but sdb, sdc, and sdd are no longer available to Linux:

linux:~ # fdisk /dev/sda The number of cylinders for this disk is set to 3649. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): q linux:~ # fdisk /dev/sdb Unable to open /dev/sdb linux:~ # fdisk /dev/sdc Unable to open /dev/sdc linux:~ # fdisk /dev/sdd Unable to open /dev/sdd linux:~ # fdisk /dev/sde Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.

25

www.3ware.com

Command Line Interface

The number of cylinders for this disk is set to 29894. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): q

Step 3: Create new RAID-5 unit in CLI
3ware CLI> maint p2:3:4:5:6:7 Created unit 2 createunit c0 rraid5 k64

Step 4: Partition and format new array linux:~ # fdisk /dev/sdb The number of cylinders for this disk is set to 74733. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): n Command action e extended p primary partition (1-4)

www.3ware.com

26

3ware Escalade ATA RAID Controller CLI User Guide

p Partition number (1-4): 1 First cylinder (1-74733, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-74733, default 74733): Using default value 74733 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. linux:~ # mkfs /dev/sdb1 mke2fs 1.26 (3-Feb-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 75038720 inodes, 150073197 blocks 7503659 blocks (5.00%) reserved for the super user First data block=0 4580 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000 Writing inode tables: 95/4580

Step 5: Verify changes
3ware CLI> info c0 Controller 0

27

www.3ware.com

Command Line Interface

------------Model: 7500-12 FW: FE7X 1.05.00.042 BIOS: BE7X 1.08.00.044 Serial #: M12600A2170030 PCB: Rev3 PCHIP: V1.30 ACHIP: V3.20 # of units: 3 Unit 0: RAID 1 30.01 GB (58631296 blocks): OK Unit 2: RAID 5 614.70 GB (1200598400 blocks): OK Unit 8: RAID 5 245.88 GB (480253440 blocks): OK # of ports: 12 Port 0: QUANTUM FIREBALLP LM30 186013438780 30.02 GB (58633344 blocks): OK (unit 0) Port 1: QUANTUM FIREBALLP LM30 186013534268 30.02 GB (58633344 blocks): OK (unit 0) Port 2: Maxtor 4G120J6 G6037FAE 122.94 GB (240121728 blocks): OK (unit 2) Port 3: Maxtor 4G120J6 G603GLDE 122.94 GB (240121728 blocks): OK (unit 2) Port 4: Maxtor 4G120J6 G603G1RE 122.94 GB (240121728 blocks): OK (unit 2) Port 5: Maxtor 4G120J6 G6037FPE 122.94 GB (240121728 blocks): OK (unit 2) Port 6: Maxtor 4G120J6 G603FZRE 122.94 GB (240121728 blocks): OK (unit 2) Port 7: Maxtor 4G120J6 G603F9TE 122.94 GB (240121728 blocks): OK (unit 2) Port 8: Maxtor 98196H8 V80FZGRC 81.96 GB (160086528 blocks): OK (unit 8) Port 9: Maxtor 98196H8 V80HRGWC 81.96 GB (160086528 blocks): OK (unit 8) Port 10: Maxtor 98196H8 V80HRG2C 81.96 GB (160086528 blocks): OK (unit 8)

www.3ware.com

28

3ware Escalade ATA RAID Controller CLI User Guide

Port 11: Maxtor 98196H8 V80GXC1C 81.96 GB (160086528 blocks): OK (unit 8)

Warning!

When adding a new CBOD or SPARE drive to replace a defective drive the unit number may not be the same as the port number. Always double check the unit number before deleting a unit.
In the example below removing port# 9 degraded the RAID-1 array consisting of ports 9 and 10. One might assume that re-adding port# 9 back as a spare drive is now unit# 9. This is not correct since the original array retains the original unit number until the next reboot. The new spare is actually assigned the next available unit number, in this case unit# 0, since unit# 9 was still in use. Deleting unit# 9 to delete the newly added spare drive would actually delete the remaining member of the RAID-1 array and your data!
Example: 3ware CLI> info c0 Controller 0 ------------Driver: 1.02.00.032 Model: 7500-12 FW: FE7X 1.05.00.043 BIOS: BE7X 1.08.00.045 Monitor: ME7X 1.01.00.035 Serial #: M12600A2170030 PCB: Rev3 PCHIP: V1.30 ACHIP: V3.20 # of units: 4

29

www.3ware.com

Command Line Interface

Unit 1: RAID 10 60.03 GB (117262592 blocks): OK Unit 2: RAID 5 491.76 GB (960478720 blocks): DEGRADED Unit 3: CBOD 122.94 GB (240121728 blocks): OK OFFLINE Unit 9: RAID 1 81.96 GB (160084480 blocks): OK # of ports: 12 Port 0: QUANTUM FIREBALLP LM30 186013438780 30.02 GB (58633344 blocks): OK (NO UNIT) Port 1: QUANTUM FIREBALLP LM30 186013534268 30.02 GB (58633344 blocks): OK (unit 1) Port 2: Maxtor 4G120J6 G6037FAE 122.94 GB (240121728 blocks): OK (unit 2) Port 3: Maxtor 4G120J6 G603GLDE 122.94 GB (240121728 blocks): OK (unit 3) Port 4: Maxtor 4G120J6 G603G1RE 122.94 GB (240121728 blocks): OK (unit 2) Port 5: Maxtor 4G120J6 G6037FPE 122.94 GB (240121728 blocks): OK (unit 2) Port 6: Maxtor 4G120J6 G603FZRE 122.94 GB (240121728 blocks): OK (unit 1) Port 7: Maxtor 4G120J6 G603F9TE 122.94 GB (240121728 blocks): OK (unit 2) Port 8: Maxtor 98196H8 V80FZGRC 81.96 GB (160086528 blocks): OK (unit 1) Port 9: Maxtor 98196H8 V80HRGWC 81.96 GB (160086528 blocks): OK (unit 9) Port 10: Maxtor 98196H8 V80HRG2C 81.96 GB (160086528 blocks): OK (unit 9) Port 11: Maxtor 98196H8 V80GXC1C 81.96 GB (160086528 blocks): OK (unit 1) 3ware CLI> maint remove c0 p9 Successfully removed drive from port ler 0

9 on control-

www.3ware.com

30

3ware Escalade ATA RAID Controller CLI User Guide

3ware CLI> maint add c0 p9 spare Successfully added a SPARE to port 3ware CLI> maint deleteunit c0 u9 Deleted unit 9 3ware CLI> info c0 Controller 0 ------------Driver: 1.02.00.032 Model: 7500-12 FW: FE7X 1.05.00.043 BIOS: BE7X 1.08.00.045 Monitor: ME7X 1.01.00.035 Serial #: M12600A2170030 PCB: Rev3 PCHIP: V1.30 ACHIP: V3.20 # of units: 4 Unit 0: SPARE 81.96 GB OFFLINE Unit 1: RAID 10 60.03 GB Unit 2: RAID 5 491.76 DEGRADED Unit 3: CBOD 122.94 GB OFFLINE

9 on controller 0

(160086528 blocks): OK (117262592 blocks): OK GB (960478720 blocks): (240121728 blocks): OK

# of ports: 12 Port 0: QUANTUM FIREBALLP LM30 186013438780 30.02 GB (58633344 blocks): OK (NO UNIT) Port 1: QUANTUM FIREBALLP LM30 186013534268 30.02 GB (58633344 blocks): OK (unit 1) Port 2: Maxtor 4G120J6 G6037FAE 122.94 GB (240121728 blocks): OK (unit 2) Port 3: Maxtor 4G120J6 G603GLDE 122.94 GB (240121728 blocks): OK (unit 3)

31

www.3ware.com

Command Line Interface

Port 4: (240121728 Port 5: (240121728 Port 6: (240121728 Port 7: (240121728 Port 8: (160086528 Port 9: (160086528 Port 10: (160086528 Port 11: (160086528

Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks): Maxtor blocks):

4G120J6 G603G1RE OK (unit 2) 4G120J6 G6037FPE OK (unit 2) 4G120J6 G603FZRE OK (unit 1) 4G120J6 G603F9TE OK (unit 2) 98196H8 V80FZGRC OK (unit 1) 98196H8 V80HRGWC OK (unit 0) 98196H8 V80HRG2C OK (NO UNIT) 98196H8 V80GXC1C OK (unit 1)

122.94 122.94 122.94 122.94 81.96 81.96 81.96 81.96

GB GB GB GB GB GB GB GB

maint rebuild successful
Description:

To rebuild a degraded array, unit 2 on controller 0, with a disk drive that is attached to port 3.
Example: 3ware CLI> maint rebuild c0 u2 p3 Sample of output: Rebuild started on unit 2 on controller 0

Note: When rebuilding a degraded RAID 10, the first degraded subunit mirrored pair that is found will be rebuilt. When issuing a rebuildstatus command immediately after the rebuild of a RAID 10 has started, the overall percentage complete of that array will display 50%. However, the degraded subunit that is being rebuilt will display 0%. If there are multiple degraded mirror pairs in a RAID 10 array, the

www.3ware.com

32

3ware Escalade ATA RAID Controller CLI User Guide

command will need to be issued again to initiate a rebuild on additional degraded pairs.

maint flush
Description:

To flush the cache on all units attached to controller 1. Example: 3ware 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

maint flush on specific unit
Description:

To flush the cache only on unit 6 of controller 1. Example: 3ware CLI> maint flush c1 u6 Sample of output: Flushed cache on controller 1 unit 6

maint verify
Description:

To start a verify on unit 3 of controller 2. Example: 3ware CLI> maint verify c2 u3 Sample of output: Verify successfully started on unit 3 on controller 2 The Verif y feature verifies the redundancy of all RAID 1, 5 and 10 arrays. Arrays must be initialized and cannot be degraded to be verified. If the verify array process determines that the mirrored drives are not identical

33

www.3ware.com

Command Line Interface

or the parity is not correct, the array is degraded and the rebuild process is launched. For RAID 1 or 10 Arrays: RAID 1 and 10 arrays are not profiled when created, or initialized after booting into the OS. When the firmware receives the first verify request, given that the array was never initialized, the initialization will then begin. Any subsequent verify operations will then perform the verification of the array (check data consistency). An AEN will inform the user that the first verify is actually an initialization.

Alarms
The alarms command
The alarms command provides a log of alarms, also called Automatic Event Notifications (AENs), that have occurred on the disk arrays. An alarm occurs when the ATA RAID controller requires attention, such as when a disk array becomes degraded and is no longer fault tolerant. SMART notifications appear in this display. Alarm messages are categorized by the following levels of severity:

• Errors • Warnings • Information
Note: When this command is executed, only AENs that

have been logged since the last time the command was executed will be displayed. AENs are also saved in a text file at /var/log/messages.

www.3ware.com

34

3ware Escalade ATA RAID Controller CLI User Guide

Warning!

3ware does not recommend installing both 3DM and CLI. Conflicts may occur. Alarms will only be captured by one utility if both are installed.

Warning!

3DM and CLI handle alarms differently. CLI does not timestamp or save alarms as 3DM does. When using CLI, save the alarm data. Once the alarms are viewed, they cannot be viewed again.

Examples using Interactive Mode
Example: 3ware CLI> alarms Sample of output: Controller 1 Alarms -------------------INFO: Verify started: Unit #0 ERROR: Drive error: Port #0 ERROR: Unit degraded: Unit #0 INFO: Rebuild started: Unit #0 INFO: Rebuild complete: Unit #0 ---------------------

35

www.3ware.com

Command Line Interface

Help
The help command
The help command displays a list of the CLI commands and options.

Examples using Interactive Mode
Example: Esclade CLI> help Sample of output: Copyright (c) 2003 3ware, Inc. 3ware CLI (version 2.00.00.006) All rights reserved.

List of Commands ------------------------------------------info displays information about the controller alarms - displays or deletes the list of AENs set - displays or modifies controller settings

maint - performs maintenance operations on the controllers quit - exits the CLI

Type help to get more details about a particular command

www.3ware.com

36

3ware Escalade ATA RAID Controller CLI User Guide

Example: 3ware CLI> help info Sample of output:
This command will show you various pieces of information about controllers.

info [c [u|p] [item]] c - the controller id u - the unit id p - the port id If u is specified, item can be one of the following: status, rebuildstatus, verifystatus, initializestatus If p is specified, item can be one of the following: status, model, serial, capacity, smart If neither u or p is specified, item can be one of the following: driver, model, firmware, bios, monitor, serial, pcb, pchip, achip, numports, numunits, numdrives, unitstatus, drivestatus

-

-

37

www.3ware.com

Command Line Interface

Example: Esclade CLI> help alarms Sample of output: This command will display alarms for each controller alarms

Example: Esclade CLI> help set Sample of output: This command will adjust certain settings on the controllers set [ rebuild c | cache c u [on|off] ] c - the controller id u - the unit id If set is called without arguments, it will display rebuild and cache information for all controllers.

Example: 3ware CLI> help maint Sample of output: This command will perform certain maintenance functions on the controllers maint [ add c p [jbod|cbod|spare] | remove c p |

www.3ware.com

38

3ware Escalade ATA RAID Controller CLI User Guide

createunit c r [k] p [noscan] | deleteunit c u [noscan] | rebuild c u p [ignoreECC] | flush c [u] | verify c u [stop] ] c - the controller id u - the unit id p - the port id

For createunit, the k argument (stripe) is only valid for the following: raid0, raid10, raid5

Valid values for the k argument (stripe) are the following (in KB):
16, 32, 64, 128, 256, 512, 1024 (Note: Raid5 can only be 64kb.)

If no unit is specified for flush, it will flush the cache on all units. The "noscan" option for “create” and “delete unit” tells the CLI to NOT notify of the creation or deletion of a logical volume.

Example: Esclade CLI> help quit Sample of output: This command quits the CLI quit Synonyms: q exit

39

www.3ware.com

3ware Technical Support and Services

3ware Technical Support and Services
Product information, Frequently Asked Questions, software upgrades, driver files and other support are available through the 3ware World Wide Web site at http://www.3ware.com. 3ware's software library is accessible at: http://www.3ware.com/support/download.asp. For specific answers to questions or to give feedback about the product, visit our Web site at http://www.3ware.com/support and use our convenient e-mail form. 3ware also offers toll-free (877) 883-9273 and (408) 523-1111 direct phone support during normal business hours.

Sales and ordering information
For sales information, send an electronic mail message to sales@3ware.com.

Feedback on this manual
Your feedback is welcome. If anything in the guide seems unclear please let us know by sending e-mail to support@3ware.com.

40

www.3ware.com

3ware Escalade ATA RAID Controller CLI User Guide

www.3ware.com

41

Similar Documents