About This Guide 3ware 9000 Series Serial ATA Controller CLI Guide provides instructions for configuring and maintaining your 3ware controller using 3ware’s command line interface (CLI). This guide assumes that you have already installed your controller in your system. If you have not yet done so, see 3ware 9000 Series Serial ATA RAID Controller Installation Guide for instructions.
About This Guide Conventions The following conventions are used through this guide: 3BM refers to the 3ware BIOS Manager 3DM refers to the 3ware Disk Manager, version 2. is used for code and for things you type. Monospace font In commands, an italic font indicates items that you must specify, such as a controller ID, or a unit ID.
Introduction to the 3ware Command Line Interface The 3ware SATA RAID Controller Command Line Interface (CLI) for Linux, Windows, and FreeBSD is provided to manage 7000, 8000, and 9000-series 3ware ATA and Serial ATA RAID controllers. Multiple 3ware controllers can be managed using the CLI via a command line or script.
Introduction to the 3ware Command Line Interface as adding or removing drives. 3ware CLI also includes advanced features for creating and deleting RAID units online. For complete information on 3DM 2 and for information Note: about configuring or upgrading your computer, refer to the 3ware 9000 Series Serial ATA RAID Controller User Guide.
Installing the 3ware CLI Installing 3ware CLI on Windows 3ware CLI can be run from the 3ware CD, or copied to your computer from the 3ware software CD-ROM. You can also download the CLI from the 3ware web site, www.3ware.com. To install 3ware CLI on Windows, copy the file to the directory tw_cli.exe...
Introduction to the 3ware Command Line Interface Working with 3ware CLI You can work with the 3ware CLI in different ways: Interactively, entering commands at the main prompt As a series of single commands By creating a script—an input file with multiple commands This first section shows examples of each of these ways.
Understanding RAID Concepts and Levels Example tw_cli info c0 u0 This example gets information for unit0 of controller0. For complete information about the info commands, see “Info Commands” on page 18. Using an input file to execute a script You can operate 3ware CLI scripts by executing a file. The file is a text file containing a list of CLI commands which you have entered in advance.
Introduction to the 3ware Command Line Interface . In the storage industry, the term “array” is used to Arrays and Units describe two or more disk drives that appear to the operating system as a single unit. When you work with 3ware software, “unit” is the term used to refer to an array of disks that is configured and managed through the 3ware software.
Page 13
Understanding RAID Concepts and Levels RAID 0 Provides striping, but no mirroring. Striped disk arrays achieve high transfer rates because they can read and write data on more than one drive simultaneously. The stripe size is configurable in the 3ware CLI, 3ware BIOS Manager (3BM) and in the 3ware Disk Manager (3DM 2).
Page 14
Introduction to the 3ware Command Line Interface Figure 2. RAID 1 Configuration Example RAID 5 Combines striping data with parity (exclusive OR) to restore data in case of a drive failure. This array type provides performance, fault tolerance, high capacity, and storage efficiency. Requires a minimum of three drives. Parity information is distributed across all drives rather than being concentrated on a single disk (see Figure 3).
Understanding RAID Concepts and Levels Figure 4. RAID 10 Configuration Example RAID 50 This array is a combination of RAID 5 with RAID 0. This array type provides fault tolerance and high performance. Requires a minimum of six drives. Several combinations are available with RAID 50. For example, on a 12-port controller, you can have a grouping of 3, 4, or 6 drives.
Page 16
Introduction to the 3ware Command Line Interface Review the information under “Understanding RAID Concepts and Levels” on page 7 to determine the type of RAID configuration most appropriate for your needs and use the tables below to determine what RAID levels are available, based on your particular controller model and the number of available drives.
Page 17
Understanding RAID Concepts and Levels Drive Capacity Considerations The capacity of each drive is limited to the capacity of the smallest drive in the array. The total array capacity is defined as follows: Table 3: Drive Capacity RAID Level Capacity RAID 0 (number of drives) X (capacity of the smallest drive) RAID 1...
Page 18
Introduction to the 3ware Command Line Interface 3ware 9000 Series Serial ATA Controller CLI Guide...
CLI Reference This chapter provides detailed information about the 3ware CLI commands Info, Maint, Sched, Alarms, Set, and Help. All information contained in this document that describes Note: usage for the 3ware 9000 series products should not be used with 3ware 7000 or 8000 series controllers.
CLI Reference “Maint Commands” on page 28 and refer to your Linux documentation or manpages.) In addition, 3ware also includes on the 3ware CD a utility named tw_sched(1), which is a wrapper around tw_cli(1). Used in conjunction with a time-driven scheduler such as crond(1d), it provides background task scheduling features such as rebuild, verify, and mediascan.
Screen Reporting Style For example, in the maint command to rescan all ports and reconstitute all units, the syntax appears as The italic maint rescan [cid ...] [noscan]. cid indicates that you need to supply a controller ID. The ellipses indicate that you can specify more than one controller ID, separated by spaces.
CLI Reference Info Commands The info commands provide information about the 3ware controller, the attached drives, and configured RAID arrays or units. The info commands are for querying purposes only. Info commands are read-only operations showing various values of controllers, units, and drives. Syntax info info c<c>...
Info Commands info cid Provides overall summary information on controller cid. The report consists of two parts; a unit summary listing all present units, and a port summary section listing all present disks and their attached ports. The unit summary section lists all present units specifying their unit number, unit type (such as RAID 5), status, size (usable capacity) in gigabytes or terabytes, number of blocks, and unit status such as OK, VERIFYING, INITIALIZING, etc.
CLI Reference info cid driver This command reports the device driver version associated with controller cid. Example: 3ware CLI> info c0 driver /c0 Driver Version = 1.02.00.036 info cid model This command reports the controller model of controller cid. Example: 3ware CLI>...
Info Commands info cid serial This command reports the serial number of the specified controller cid. Example: 3ware CLI> info c0 serial /c0 Serial Number = F12705A3240009 info cid pcb This command reports the PCB (printed circuit board) revision of the specified controller cid.
CLI Reference info cid numdrives This command reports the number of drives currently managed by the specified controller cid. This report does not include units that have been removed (placed off-line) with the maint remove command. Also note that a physically removed disk is not detected unless I/O is performed against the disk.
Info Commands info cid drivestatus This command presents a list of port assignments, status, unit affiliation, size in GB, the number of blocks of 512 bytes, and the disk’s serial number. Example: 3ware CLI> info c0 drivestatus Port Status Unit Size Blocks Serial --------------------------------------------------------------...
CLI Reference info cid stagger This command shows the delay between drive groups that spin up at one time on this controller Example: 3ware CLI> info c0 stagger /c0 Spinup Stagger Time Policy (sec) = 2 info cid uid This command presents detailed information on the specified unit. If the unit consists of sub-units as is the case in RAID 1, RAID 5, RAID 10, and RAID 50 arrays (applicable for 9000 controllers), then details about each sub-unit are also presented.
Info Commands info cid uid rebuildstatus This command presents the rebuild status (if any) of the specified unit. Example: 3ware CLI> info c0 u5 rebuildstatus /c0/u5 is not rebuilding. Or, when the unit is rebuilding: 3ware CLI> info c0 u5 rebuildstatus /c0/u5 is rebuilding with Percent Completion = %14 info cid uid verifystatus This command presents the verify status (if any) of the specified unit.
CLI Reference info cid pid status This command presents the status of the specified port. Example: 3ware CLI> info c0 p5 status /c0/p5 Status = OK info cid pid model This command presents the model of the specified port. Example: 3ware CLI>...
Info Commands info cid diag This command extracts the internal log of diagnostic events of controller cid, controller diagnostics suitable for technical support usage. Note that some characters might not be printable or rendered correctly (human readable). It is recommended to save this output to a file, where it can be communicated to tech support.
CLI Reference Maint Commands The maint command lets you perform maintenance operations on the controller, its units, and drives. It is recommended that you use the info command first to verify the controller information before using the maint command to make any changes to it. Sub-commands under this category allow you to create and modify objects and their attributes such as creating and deleting logical units, rebuilding, etc.
Maint Commands Rescan imports JBOD units only when attached to either a 7000 or 8000 controller, unless you reboot. All other RAID types can be imported when attached to the 9000 series. Warning! Adding any drive requires use of an approved hot swap carrier. If you do not have such a carrier you must first power down your system.
CLI Reference [maint] remove cid pid [noscan] This command allows you to remove (or export) a port (or drive). Exporting a port instructs the firmware to remove the specified port from its poll of managed ports, but retains the Disk Configuration Block (DCB) metadata on the attached disk.
Maint Commands [maint] createunit cid rRAIDType pid_list [kStripe] [noscan] [Dsk_Grp] [nocache] [autoverify] [ignoreECC] This command allows you to create a unit on the specified controller cid, of type rRAIDType, optional stripe size of kStripe, using one or many disks specified by pid_list. By default the host operating system is informed of the new block device and write cache is enabled.
Page 36
CLI Reference gdsk_grp indicates the number of disks per group for a RAID 50 type. A RAID 50 is a multi-tier array. At the most bottom layer, N number of disks per group are used to form the RAID 5 layer. These RAID 5 arrays are then integrated into a RAID 0.
Maint Commands To create a hot spare using a drive on port-2 controller-0 for automatic rebuilds: CLI> maint createunit c0 rspare p2 Alert! When creating a hot spare, be sure to select a drive with an equal or larger size than the smallest drive in your redundant array. Otherwise it can’t be used in a rebuild.
CLI Reference [maint] flush cid [uid ...] This command allows you to flush the write cache on the specified unit or all units associated with controller cid. This command does not apply to Spare unit types. [maint] verify cid uid [stop] This command starts or stops a background verification process on the specified unit.
Page 39
Maint Commands Note that block devices (cooked devices) do not require this command. Clients of block devices (such as File system) send such requests via ASPI SRB_SHUTDOWN_REQUEST. www.3ware.com...
CLI Reference Sched Commands Sched commands are applicable for 9000-series controllers to schedule background tasks to occur at a later time or day, when peak performance is not required. When the schedule is disabled, by default, background task occur almost immediately. Background tasks include rebuild, verify, and selftest activities.
CLI Reference sched rebuild cid enable This command enables ALL rebuild background tasks on controller cid. sched rebuild cid disable This command disables ALL rebuild background tasks on controller cid. sched verify cid This command displays the current verify background task as illustrated below.
Sched Commands sched verify cid remove slot_id This command removes (or unregisters) the verify background task in slot slot_id. For example: 3ware CLI> tw_cli sched verify c1 remove 3 Removes the verify background task in slot 3. Warning: If all timeslots are removed, be sure to also disable the schedule.
CLI Reference sched selftest cid add day hour This command adds a new background selftest task to be executed on day (range 0 .. 6, where Sunday is zeroth day of the week), at hour (range 0 .. 23). Notice that selftest runs to completion and as such no duration is provided. This command fails if no (empty) slot is available.
Alarms Commands sched selftest cid disable selftest_task_id This command disables a particular selftest task (UDMA or SMART). For the selftest_task_id, s0 is interpreted as UDMA, s1 is interpreted as SMART. For example: 3ware CLI> tw_cli sched selftest c1 disable s1 Disables SMART selftest on controller c1.
CLI Reference Syntax alarms alarms c<c> [c<c> ...] Warning! 3ware does not recommend installing both 3DM and CLI. Conflicts may occur. If both are installed, alarms will be captured only by 3DM. Warning! 3DM and CLI handle alarms differently. When using CLI with the 7/8000 series, save the alarm data immediately after viewing it.
Set Commands Set Commands These commands allow you to set certain controller and unit specific parameters as described below. The set command can be used to set its rebuild rate, and enable or disable cache. For information about viewing information about the controller and units, see the “Info Commands”...
CLI Reference set cache cid uid on|off This command allows you to turn on or off the write cache on a specified unit. This feature is supported on both 7000/8000 and 9000 models. The following table shows the supported RAID types for caching as a function of controller model and logical unit type.
Help Commands Help Commands This command set provides brief on-line help. help This command provides a table of contents, providing brief descriptions of the help sub-commands. Typical output looks like: Copyright (c) 2003 3ware, Inc. All rights reserved. List of Commands ------------------------------------------- info - displays information about the controller...
CLI Reference help quit This command provides information about the CLI quit command. For example: 3ware CLI> help quit This command quits the CLI quit Synonyms: q exit Return Code While informative messages are written to standard output, error messages are written to standard error.
Need help?
Do you have a question about the 720-0104-00 and is the answer not in the manual?
Questions and answers