3ware ® Serial ATA RAID Controller Command Line Interface Supports the 9590SE-4ME for the Power Mac® G5 PN: 720-0140-00 September 2006...
Page 2
AMCC, 215 Moffett Park Drive, Sunnyvale, CA 94089. AMCC shall not be responsible or liable for, and shall be held harmless against, any and all damages, claims, and/or disputes that arise from the copying or reproduction of this publication.
Note: The 3ware controller used for the Apple® Power Mac® G5 is the 9590SE- 4ME. AMCC makes a number of other 3ware controller models, including 9000- series (9500S, 9550SX, and 9590SE), and earlier 7000/8000 series boards, that work on other platforms.
Page 8
3ware Serial ATA RAID Controller CLI Guide for the Power Mac G5...
Introduction to the 3ware Command Line Interface 3ware RAID controllers can be managed using the CLI via a command line or script. Important! For all of the functions of the 3ware CLI to work properly, you must have the proper CLI, firmware, and driver versions installed.
Chapter 1. Introduction to the 3ware Command Line Interface Supported Operating Systems The 3ware CLI is supported under the following operating systems: • Mac OS X, running in a Power Mac® G5 (PowerPC™-based) with PCI Express®. • Windows®. Windows 2000, Windows XP, and Windows Server 2003, both 32-bit and 64-bit.
Installing the 3ware CLI on Mac OS X Installing the 3ware CLI on Mac OS X 3ware CLI can be installed from the 3ware software CD, or the latest version can be downloaded from the 3ware web site, http://www.3ware.com/support/ download.asp. To install 3ware CLI on Mac OS X •...
Chapter 1. Introduction to the 3ware Command Line Interface Using the command interface interactively You can use 3ware CLI interactively, entering commands at the main prompt and observing the results on the screen. To use the CLI interactively Enter the following command: ./tw_cli The main prompt is displayed, indicating that the program is awaiting a command.
You can have the output of the 3ware CLI, including errors, sent to a text file by adding 2>&1 to the end of the line. This could be useful, for example, if you want to email the output to AMCC Technical Support. Examples tw_cli /c2/p0 show >>...
Chapter 1. Introduction to the 3ware Command Line Interface Conventions The following conventions are used through this guide: • In text, is used for code and for things you type. monospace font • In descriptions and explanations of commands, a bold font indicates the name of commands and parameters, for example, /c0/p0 show all.
Understanding RAID Levels and Concepts RAID Concepts The following concepts are important to understand when working with a RAID controller: • Arrays and Units . In the storage industry, the term “array” is used to describe two or more disk drives that appear to the operating system as a single unit.
Chapter 1. Introduction to the 3ware Command Line Interface Available RAID Configurations The following RAID levels and configurations are available for drives attached to a 9590SE-4ME 3ware RAID controller: • RAID 0 • RAID 1 • RAID 5 • RAID 10 •...
Page 17
Understanding RAID Levels and Concepts Figure 1. RAID 0 Configuration Example RAID 1 RAID 1 provides fault tolerance and a speed advantage over non-RAID disks. Also known as a mirrored array. Mirroring is done on pairs of drives. Mirrored disk arrays write the same data to two different drives using RAID 1 algorithms (see Figure 2).
Page 18
Chapter 1. Introduction to the 3ware Command Line Interface Figure 3. RAID 5 Configuration Example RAID 10 RAID 10 is a combination of striped and mirrored arrays for fault tolerance and high performance. When drives are configured as a striped mirrored array, the disks are configured using both RAID 0 and RAID 1 techniques, thus the name RAID 10 (see Figure 4).
Understanding RAID Levels and Concepts Single Disk A single drive can be configured as a unit through 3ware software. (3DM 2 or CLI). Like disks in other RAID configurations, single disks contain 3ware Disk Control Block (DCB) information and are seen by the OS as available units.
Chapter 1. Introduction to the 3ware Command Line Interface Using Drive Capacity Efficiently To make the most efficient use of drive capacity, it is advisable to use drives of the same capacity. This is because the capacity of each drive is limited to the capacity of the smallest drive in the unit.
CLI Syntax Reference Note: The 3ware controller used for the Power Mac G5 is the 9590SE-4ME. AMCC makes a number of other 3ware controller models, including 9000-series (9500S, 9550SX, and 9590SE), and earlier 7000/8000 series boards, that work on other platforms.
Page 22
Chapter 2. CLI Syntax Reference Table 4: Common Tasks Mapped to CLI Commands Task CLI Command Page Controller Configuration Tasks View information about a controller /cx show View controller policies /cx show [attribute] [attribute] Set policies for a controller • Export JBODs /cx set exportjbod •...
Page 23
Common Tasks Mapped to CLI Commands Table 4: Common Tasks Mapped to CLI Commands Task CLI Command Page Add a time slot to a verify /cx add verify schedule Add a time slot to a selftest /cx add selftest schedule Enable/disable the rebuild/migrate /cx set rebuild schedule and set the task rate...
Shell Object Commands Port object commands provide information and Port Object Commands. perform actions related to a drive on a specific port. For example, you use port object commands for such tasks as seeing the status, model, or serial number of the drive.
./object specifies the next level of the object. specifies a relative path with respect to the current focused /c0/bbu hostname. Example: //localhost> focus //elvis.amcc.com //elvis.amcc.com> //elvis.amcc.com> focus /c0/u0 //elvis.amcc.com/c0/u0> //elvis.amcc.com/c0/u0> focus.. //elvis.amcc.com/c0>...
Shell Object Commands (Not Optimal) state, RRate (Rebuild Rate) of 2, VRate (Verify Rate) of 5, BBU of '-' (Not Applicable). Not Optimal refers to any state except OK and VERIFYING. Other states include VERIFY-PAUSED, INITIALIZING, INIT- PAUSED, REBUILDING, REBUILD-PAUSED, DEGRADED, MIGRATING, MIGRATE-PAUSED, RECOVERY, INOPERABLE, and UNKNOWN.
Chapter 2. CLI Syntax Reference show alarms [reverse] This command shows the alarms or AEN messages of all controllers in the system. The default is to display the most recent message first. The reverse attribute displays the most recent message last. show diag This command shows the diagnostic information of all controllers in the system.
Shell Object Commands show verify This command displays all verify schedules for the 9000 controllers in the system. Example: //localhost> show verify Verify Schedule for Controller /c0 ======================================================== Slot Hour Duration Status -------------------------------------------------------- 11:00pm 4 hr(s) enabled enabled enabled enabled enabled enabled enabled...
Chapter 2. CLI Syntax Reference flush This command sends a flush command to all 3ware controllers in the system. For more information, see “/cx flush” on page 39. rescan This command sends a rescan command to all 3ware controllers in the system. For more information, see “/cx rescan [noscan]”...
Controller Object Commands Controller Object Commands Controller object commands provide information and perform actions related to a specific controller, such as /c0. For example, you use controller object commands to see alarms specific to a controller, to create schedules for when background tasks are run, and to set policies for the controller.
Page 32
Chapter 2. CLI Syntax Reference /cx set verify=enable|disable|1..5 (9000 only) /cx set selftest=enable|disable [task=UDMA|SMART](9000 only) /cx flush /cx update filename_with_path [force] (9000 only) /cx commit (Windows only. Also known as shutdown) /cx start mediascan (7000/8000 only) /cx stop mediascan (7000/8000 only) /cx rescan [noscan] (Does not import non-JBOD on 7000/8000 models.
Chapter 2. CLI Syntax Reference show driver This command reports the device driver version associated with controller /cx. Example: //localhost> /c0 show driver /c0 Driver Version = 2.x show model This command reports the controller model of controller /cx. Example: //localhost>...
Controller Object Commands show serial This command reports the serial number of the specified controller /cx. Example: //localhost> /c0 show serial /c0 Serial Number = F12705A3240009 show pcb This command reports the PCB (Printed Circuit Board) version of the specified controller /cx. Example: //localhost>...
Chapter 2. CLI Syntax Reference show numports This command reports the port capacity (number of physical ports) of the specified controller /cx. Example: //localhost> /c0 show numports /c0 Number of Ports = 12 show numunits This command reports the number of units currently managed by the specified controller /cx.
Controller Object Commands show spinup This feature only applies to 9000 series controllers. This command reports the number of concurrent disks that will spin up when the system is powered on, after waiting for the number of seconds specified with the command.
Chapter 2. CLI Syntax Reference For operating systems that support units larger than 2TB, there is no need to set the policy to on unless you want the operating system to have multiple smaller volumes. If you use a 32-bit operating system, it is recommended that you keep the policy on unless you know that your operating system supports disks that are larger than 2 TB.
Controller Object Commands show autorebuild This feature only applies to 9550SX and 9590SE model controllers. This command shows the Auto-Rebuild policy. If the policy is enabled, the firmware will select drives to use for rebuilding a degraded unit using the following priority order.
Chapter 2. CLI Syntax Reference show allunitstatus This command presents a count of total and Not Optimal units managed by the specified controller /cx. For more about the meaning of Not Optimal, see “Shell Object Commands” on page 19. Example: //localhost>...
Controller Object Commands show all This command shows the current setting of all of the following attributes on the specified controller: driver, model, firmware, memory, bios, monitor, serial, pcb, pchip, achip, numports, numunits, numdrives, unitstatus, drivestatus, allunitstatus, exportjbod, ondegrade, spinup, autocarve, and stagger.
Chapter 2. CLI Syntax Reference =<RaidType> =<p:-p> add type disk Stripe <3|4|5|6> [stripe= ] [noscan] [group= string [nocache] [autoverify] [ignoreECC] [name= [storsave=<protect|balance|perform>] This command allows you to create a new unit on the specified controller. You specify type, disks, and optional stripe size. By default the host operating system will be informed of the new block device, write cache will be enabled, and a storsave policy of protect will be set.
Page 43
Controller Object Commands group=3|4|5|6 indicates the number of disks per group for a RAID 50 type. (This attribute can only be used when type=raid50.) Recall that a RAID 50 is a multi-tier array. At the bottom-most layer, N number of disks per group are used to form the RAID 5 layer.
Chapter 2. CLI Syntax Reference Table 6: Supported Model-Unit Types for ignoreECC Model R-10 R-50 Single JBOD Spare 7K/8K name=string attribute allows you to name the new unit. (This feature is for 9000 series and above controllers.) The string can be up to 21 characters and cannot contain spaces.
Controller Object Commands commit This command only applies to the Windows operating system. It commits all changes if a faster shutdown method is needed when running certain database applications. Linux and FreeBSD file systems do not require this command since they have their own ways of notifying the controller to do clean up for shut down.
Chapter 2. CLI Syntax Reference Recommendation: No need to update. Given the above recommendation... Do you want to continue ? Y|N [N]: y Downloading the firmware from file /tmp/prom0006.img ... Done. The new image will take effect after reboot. force attribute is optional. If you include it, the compatibility checks are bypassed.
Controller Object Commands In order to redirect the output you must run the following command from a command line, not from within the tw_cli shell. tw_cli /c0 show diag > diag.txt show rebuild 9000 series controllers support background tasks and allow you to schedule a regular time when they occur.
Page 48
Chapter 2. CLI Syntax Reference If the rebuild schedule is enabled while a rebuild process is underway, the rebuild will pause until a scheduled time slot. Example: If a unit is in the initialization state at noon on Wednesday and the rebuild schedule shown above is in use (with schedules disabled), you would see the following status using the show command: //localhost>/c1 show...
Controller Object Commands 74.53 GB 156301488 3JV3WRHC 74.53 GB 156301488 3JV3WQLQ 74.53 GB 156301488 3JV3WQLZ show verify 9000 series controllers support background tasks and allow you to schedule a regular time when they occur. Verify is one of the supported background tasks. Rebuild and selftest are other background tasks for which there are separate schedules.
Chapter 2. CLI Syntax Reference show selftest 9000 series controllers support background tasks and allow you to schedule a regular time when they occur. Selftest is one of the supported background tasks. Rebuild and verify are other background tasks for which there are separate schedules. Migrate and initialize are additional background tasks that follow the same schedule as rebuild.
Controller Object Commands ddd:hh:duration add rebuild= This command adds a new background rebuild task to be executed on the day ddd (where ddd is Sun, Mon, Tue, Wed, Thu, Fri, and Sat), at the hour hh (range 0 .. 23), for a duration of duration (range 1 .. 24) hours. A maximum of seven rebuild tasks can be scheduled.
Chapter 2. CLI Syntax Reference ddd:hh:duration add verify= This command adds a new background verify task to be executed on the day ddd (where ddd is Sun, Mon, Tue, Wed, Thu, Fri, and Sat), at hour hh (range 0 .. 23), for a duration of duration (range 1 .. 24) hours. A maximum of seven verify tasks can be scheduled.
Controller Object Commands ddd:hh add selftest= This command adds a new background selftest task to be executed on the day ddd (where ddd is Sun, Mon, Tue, Wed, Thu, Fri, and Sat), at hour hh (range 0 .. 23). Notice that selftest runs to completion and as such no duration is provided.
Chapter 2. CLI Syntax Reference slot_id del verify= This command removes the verify background task in slot slot_id. Example //localhost> /c1 del verify=3 removes verify background task in slot 3. Warning: If all time slots are removed, be sure to also disable the schedule. Otherwise the applicable background task will never occur slot_id del selftest=...
Previous models did not have such a policy enforcement feature. A JBOD is an unconfigured disk attached to your 3ware RAID controller. AMCC recommends that you use Single Disk as a replacement for JBOD, to take advantage of features such as RAID level migration.
Chapter 2. CLI Syntax Reference set ondegrade=cacheoff|follow This command is only for 9500S controllers. This command allows you to set a controller-based write cache policy. If the policy is set to cacheoff and a unit degrades, the firmware will disable the write-cache on the degraded unit, regardless of what the unit-based write cache policy is.
Controller Object Commands volume. Each volume can then be treated as an individual disk with its own file system. The default carvesize is 2 TB. This feature is useful for operating systems limited to 2TB file systems. For example, using the 2 TB default carvesize, a 3 TB unit will be configured into one 2 TB volume and one 1 TB volume.
Chapter 2. CLI Syntax Reference having to specify it as a spare. It also means that if you accidentally disconnect a drive (causing the controller to see it as a failed drive) and then reconnect it, the controller will automatically try to use it again. If the policy is off, spares are the only candidates for rebuild operations.
Unit Object Commands Unit Object Commands Unit Object commands provide information and perform actions related to a specific unit, such as (unit 1 on controller 0). For example, you use /c0/u1 logical disk object commands for such tasks as seeing the rebuild, verify, or initialize status of a unit, starting, stopping, and resuming rebuilds and verifies, and setting policies for the unit.
Chapter 2. CLI Syntax Reference One application of the /cx/ux show command is to see which sub-unit of a degraded unit has caused the unit to degrade and which disk within that sub- unit is the source of degradation. Another application is to see the source and destination units during a migration.
Unit Object Commands show rebuildstatus This command reports the rebuildstatus (if any) of the specified unit. Example: //localhost> /c0/u5 show rebuildstatus /c0/u5 is not rebuilding, its current state is OK If the unit is in the process of migrating, the command will return the following: //localhost>...
Chapter 2. CLI Syntax Reference show qpolicy This feature only applies to 9550SX and 9590SE model controllers. This command reports the queue policy of the firmware. If the queue policy is on, the firmware utilizes the drive queueing policy. If some drives in the unit do not support a queueing policy, this policy will have no effect on those drives.
Unit Object Commands show cache This command shows the current write cache state of the specified unit. Example: //localhost> /c0/u0 show cache /c0/u0 Cache State = on show ignoreECC This feature only applies to 9000 series controllers. This command shows the current setting of the ignoreECC policy for the specified unit.
Chapter 2. CLI Syntax Reference u1-2 DISK 298.20 u1-3 DISK 298.20 u1-4 DISK 298.20 u1-5 DISK 298.20 u1-6 DISK 298.20 u1-7 DISK 298.20 u1-8 DISK 298.20 u1-9 DISK 298.20 u1-10 DISK 298.20 u1-11 DISK 298.20 u1/v0 VOLUME 500.00 u1/v1 VOLUME 3078.40 remove [noscan] [quiet] This command allows you to remove (or export) a unit.
Unit Object Commands noscan is used to not inform the operating system of this change. The default is to inform the operating system. quiet is used for non-interactive mode. No confirmation is given and the command is executed immediately. This is useful for scripting purposes. Example of interactive mode: //localhost>...
Chapter 2. CLI Syntax Reference Table 7: Supported RAID (Logical Unit) Types for Verification Model Single Spare 7K/8K When you issue this command, the specified verify will begin if schedules are disabled; otherwise it will pause until the next scheduled verify. Verify will also pause if a rebuild or initialization is currently in progress.
Unit Object Commands flush This command allows you to flush the write cache on the specified unit /ux associated with controller /cx. Note that this command does not apply to spare unit types. set autoverify=on|off This feature only applies to 9000 series controllers. This command allows you to turn on and off the autoverify operation on a specified unit /cx/ux during allocated schedule windows.
Chapter 2. CLI Syntax Reference set identify=on|off This feature only applies to 9550SX and 9590SE model controllers. This command allows you to identify a unit within an enclosure. When that the EPCT (Enclosure Port Configuration Table) equates identify with blinking, as it does in the 3ware Sidecar Enclosure, the LEDs associated with the drive slots of the specified unit blink.
Unit Object Commands By default, qpolicy is off. Example: //localhost> /c0/u5 set qpolicy = on Setting Command Queuing Policy for unit /c0/u5 to [on] ... Done. set storsave=protect|balance|perform [quiet] This command applies only to 9550SX and 9590SE model controllers. This command sets the storsave policy to be either protect, balance, or perform when the unit write cache is enabled.
Chapter 2. CLI Syntax Reference • Write journaling is disabled, if no BBU is present, and is enabled, if a BBU is present. All data flushing from controller cache will be flushed to media if a BBU is installed and enabled. Otherwise, data will be flushed to disk only.
Page 71
Unit Object Commands Warning: Do not split a RAID 1 unit if you are booted from the drives or if the unit is mounted. Once the unit is split, any pending writes cannot be written to the second drive. In addition, the file system on the drive will not be clean. type=RaidType specifies the RAID type of the destination unit.
Page 72
Chapter 2. CLI Syntax Reference group=3|4|5|6 indicates the number of disks per group for a RAID 50 type. (This attribute can only be used when type=raid50.) Recall that a RAID 50 is a multi-tier array. At the bottom-most layer, N number of disks per group are used to form the RAID 5 layer.
Page 73
Unit Object Commands autoverify attribute enables the autoverify attribute on the unit that is to be migrated. For more details on this feature, see “/cx/ux set autoverify=on|off” on page 61. Migration Process In all cases of migration, the background migration process must be completed before the newly sized unit is available for use.
Page 74
Chapter 2. CLI Syntax Reference //localhost> /c0/u0 migrate type=raid10 disk=2-3 stripe=16 Sending migration message to /c0/u0 ... Done. 3ware CLI> /c0 show Unit UnitType Status %Cmpl Stripe Size(GB) Cache AVerify IgnECC --------------------------------------------------------------------------- Migrator MIGRATING 74.4951 Port Status Unit Size Blocks Serial --------------------------------------------------------------- 74.53 GB...
Port Object Commands Port Object Commands Port Object Messages are commands that provide information and perform actions related to a specific disk, attached to a port, such as /c0/p0. You use port object commands for such tasks as seeing the status, model, or serial number of the drive.
Chapter 2. CLI Syntax Reference show status This command displays the status of the drive attached to the specified port. (Definitions of the drive statuses are available in the 3ware Serial ATA RAID Controller User Guide.) Example: //localhost> /c0/p5 show status /c0/p5 Status = OK show model This command displays the model of the drive attached to the specified port.
Port Object Commands show ncq This command applies only to 9550SX and 9590SE model controllers. This command displays the NCQ (Native Command Queueing) information for the drive attached to the specified port, including whether NCQ is supported by the drive, and whether it is enabled at the drive. For queuing to be used, it must be enabled for the unit and supported by the drive.
Port Object Commands remove [noscan] [quiet] This command allows you to remove (or export) a port (or drive) /cx/px. Exporting a port instructs the firmware to remove the specified port from its pool of managed ports, but does not retain the DCB (Disk Configuration Block) metadata on the attached disk.
Chapter 2. CLI Syntax Reference BBU Object Commands BBU (Battery Backup Unit) Object Commands are commands that provide information and perform actions related to a specific BBU installed on a specific controller, such as /c0/bbu. This object is only available on 9000 series controllers on which a BBU is actually installed.
BBU Object Commands attribute attribute /bbu show ...] This command shows the current setting of the given attribute(s) on the BBU board. One or many attributes can be specified. Specifying an invalid attribute will terminate the loop. Possible attributes are: batinst, bootloader, cap, fw, lasttest, pcb, ready, status, serial, temp, volt.
HIGH, LOW, TOO-HIGH, and TOO-LOW. The HIGH and LOW are in warning range. TOO-HIGH and TOO-LOW are out of the operating range and indicate that it is time to replace the battery. (Contact AMCC to obtain a replacement battery.) /bbu show temp This command the temperature status of the battery.
BBU Object Commands /bbu show serial This command shows the BBU serial number. /bbu show fw This command shows the BBU firmware version number. /bbu show pcb This command the PCB revision number on the BBU. shows /bbu show bootloader This command shows the BBU's boot loader version.
Chapter 2. CLI Syntax Reference Note: Once started, the test can not be terminated before it completes. Write cache cannot be enabled until the test completes. AEN (Asynchronous Event Notification) messages are also generated by controllers to notify the user of the command status. Check for AENs with the alarms command /cx show alarms [reverse].
Enclosure Object Commands Enclosure Object Commands Enclosure object commands provide information and perform actions related to a specific enclosure, such as /e0 and its elements, such as /e0/slot0. Enclosure object elements include slot, fan, and temperature sensor elements. These commands support the 9550SX and 9590SE controllers. If you purchased an enclosure directly from a third-party vendor, the appropriate EPCT (Enclosure Port Configuration Table) must have been downloaded to the controller in order to take advantage of these commands.
Chapter 2. CLI Syntax Reference TempSensor Temperature ------------------------------- temp0 24~C(75~F) Slot Status Port Identify ---------------------------------------------------- slot0 /c0/p0 slot1 /c0/p1 slot2 NO-DEVICE slot3 NO-DEVICE attribute attribute show ...] This command shows the current setting of the given attribute(s). One or many attributes can be requested. An invalid attribute will terminate the loop. Possible attributes are: controllers, protocol, slots, fans, and temp.
Enclosure Object Commands show fans This command lists the fans in enclosure /ex and shows their status. Possible statuses are OK and Unknown. Example: //localhost> /e0 show fans Status ---------------------- fan0 show temp This command lists the temperature sensors in enclosure /ex and the current temperature.
Chapter 2. CLI Syntax Reference /slot show identify This command shows the identify status of the specified slot. The status can be either on or off. Example: //localhost> /e0/slot1 show identify /e0/slot1 Identify status = on /slot set identify=on|off This command causes the slot to be identified by blinking the LED associated with it, or turns off identification of the LED for this slot.
Help Commands Help Commands The Help commands provides brief on-line help. You can get overview help by typing Help at the top-level prompt. This displays a brief definition of commands in both the new syntax and the legacy syntax. (For an example, see the discussion of the command “help” on page 85.) You can also get help with specific commands, by entering help before an object name, or by typing a question mark (?) at the point in a command...
Chapter 2. CLI Syntax Reference /cx del selftest=slot_id (9000 only) /cx set exportjbod=on|off (9000 only) /cx set ondegrade=cacheoff|follow (9500S only) /cx set spinup=nn (9000 only) /cx set stagger=nn (9000 only) /cx set autocarve=on|off (9000 only) /cx set rebuild=enable|disable|<1..5> enable|disable for 9000 only) /cx set verify=enable|disable|<1..5>...
This help command provide a table of contents, providing help with the overall navigation of the CLI commands. Typical output looks like the following. //localhost> help Copyright(c) 2004, 2005 Applied Micro Circuits Corporation (AMCC). All rights reserved. AMCC/3ware CLI (version 2.x) Commands Description -------------------------------------------------------------- show Displays information about controller(s), unit(s) and port(s).
Chapter 2. CLI Syntax Reference help rescan This command provides specific rescan related help, illustrating various ways to use the rescan command. See the section “Shell Object Commands” on page 19 for more information. help update This command provides specific update-related help. See “Shell Object Commands”...
Return Code help /c /bbu This command provides specific /cx/bbu related help, illustrating various ways to use the /cx/bbu command. See the section “BBU Object Commands” on page 74 for more information. help /e This command provides specific enclosure /ex related help, illustrating various commands associated with the enclosure /ex.