C H A P T E R  2

Using the Command-Line Interface

This chapter explains how to use the text-based command-line interface that provides the same functions as the Sun StorageTek RAID Manager graphical user interface (GUI) in environments where a GUI is not available.

This chapter provides a description, syntax, and examples for each CLI command. Text that you enter literally is shown in bold. Optional parameters are shown enclosed in [square brackets]. Variables for which you must substitute values are shown in italics. When you may select between multiple parameters, options are separated by a bar ( | ).

This chapter contains the following sections:


Understanding the Command-Line Interface

This section contains the following subsections:

About the Command-Line Interface Modes

The command-line interface is used interactively or in batch mode. With interactive mode, enter commands at the prompt. In batch mode, create scripts and run the script in the appropriate shell. For example:


TABLE 2-1 Batch Files and Scripts

Environment

Batch File

Run Script

Windows

.bat

CMD.EXE

Linux/UNIX

.sh

sh / bash


In either mode, if the command fails, you immediately see an error message for the command that failed. Other script messages that you may encounter indicate the command completed successfully, or the command was aborted.

To access the online help for a specific command, type name-of-CLI-utility, then press Enter.

Identifying Return Codes

The return values are as follows:

0x00: SUCCESS 
0x01: FAILURE

The requested command failed

0x02: ABORT

The command was aborted because parameters failed validation

0x03: INVALID_ARGUMENTS

The arguments are incorrect. (Displays COMMAND help)

0x04: UNSUPPORTED

The command is unsupported

0x06: INVALID_ADAPTER

The adapter specified does not exist (special case for INVALID_ARGUMENTS)

Using Event Log Files

The command-line interface event log shows the results of a command in the form of the following:

Additionally, when using the romupdate or driverupdate commands, the event log will display the old and new version of the firmware or driver being updated.

This feature allows you to save logs documenting all commands. The following is an example of saving a firmware update event log.


arcconf romupdate 1 as4805 noprompt eventlog romupdate_1.log errorlog update_err.log

Using Error Log Files

The error log keeps an inventory of all relevant information from an event failure. The error log file also contains return codes (for details see Identifying Return Codes) that will help diagnose why a command failed.

When saving an event log, you can specify the log name and path by using the eventlog optional parameter, type name-of-CLI eventlog path, then press Enter.

This feature allows you to save logs documenting all event failures. The following is an example of saving a driver update error log.


arcconf driverupdate_1 c:\sdrivers noprompt eventlog driverupdate_1.log errorlog update_err.log


arcconf Commands

This section provides information on the arcconf commands. The section contains the following subsections:

arcconf copyback

Description

Enables or disables the copyback feature, which attempts to keep drives in the original slot order after rebuilds.

Syntax

arcconf copyback controller-number on | off

Options

The controller number

Enables or disables the copyback feature.

Examples


arcconf copyback 1 on

arcconf create

Description

Creates a new logical drive. You must provide the channel and device ID of the physical devices.

On redundant logical drives, arcconf performs auto synchronization.

Syntax

arcconf create controller-number logicaldrive [stripesize size] [legs number] [name name] [priority low | medium | high] [Method build | clear | quick] [ron | roff] [wt | tb | wbb]] [size | max] [RAID-number] [channel-number channel-ID-number] [noprompt]

arcconf create controller-number logicaldrive rvolume volume [logical-drive-number] [logical-drive-number] [noprompt]

Options

The controller number

A logical drive will be created

Optional parameter to specifying a stripe size. The size can be 16, 32, 64, 128, 256, 512 and 1024 KB. The default is 256 KB.

Optional parameter to specify the number of legs in the multi-layer array. Value is an integer for RAID 0x. For RAID 50/60--2 - 16 legs, 3 - 16 drives/leg, 48 drives max

Optional parameter to specify the alias name of a logical device that is displayed in the utilities. Value is a string of up to 16 characters.

Initialization priority for logical drive to be created.

Initialization method for the logical drive.

Turn on or off logical drive read cache

wt / wb: disable or enable logical drive write cache write-through. wbb: enable logical drive write cache write-back enabled when protected by a battery

The size of the logical drive in megabytes. Use max to set size to available space.

RAID level for the new logical drive. 0, 1, 1E, 10, 5, 5EE, 50, 6, 60, and volume are supported.

The space-delimited channel number and device number pairs for each device to add to the logical drive.

The RAID level for a RAID volume logical drive.

Logical drive numbers for two or more logical drives to be concatenated into the RAID volume. At least two must be used.

Used mostly for the purpose of scripting setup, this parameter overrides all user confirmations.

Examples


arcconf create 1 logicaldrive STRIPESIZE 64 MAX 0 1 0 1 1 1 2 noprompt

arcconf datascrub

Description

Sets the background consistency check modes of the controller.

Syntax

arcconf datascrub controller-number on | off | period days [noprompt]

Options

The controller number

on turns the background consistency check on.

off turns the background consistency check off.

period days the number of days to complete a background consistency check. period automatically turns on the background consistency check days indicates a minimum of 10 days (quick) and a maximum of 365 days (slow)

Used mostly for the purpose of scripting setup, this parameter overrides all user confirmations.

Examples


arcconf datascrub 1 period 10

arcconf delete

Description

Deletes a logical drive. All data stored on the logical drive will be lost. Spanned drives cannot be deleted with this function.

Syntax

arcconf delete controller-number logicaldrive logical-drive-number-to-delete | all logical-drive-number logical-drive-number [noprompt]

arcconf delete controller-number logicaldrive all [noprompt]

Options

The controller number

The number of the logical drive to be deleted. all deletes all logical drives

Logical drive numbers for two or more logical drives.

Used mostly for the purpose of scripting setup, this parameter overrides all user confirmations.

Examples


arcconf delete 1 logicaldrive 1 2 3
arcconf delete 1 logicaldrive all

arcconf driverupdate

Description

Updates Windows device drivers. When given a directory name, it will attempt to update a driver to the version found in the given directory.



Note - This command is available only on Windows systems.


Syntax

arcconf driverupdate directory-path

Options

The directory path containing the driver that you want to update.

Examples


arcconf driverupdate C:\windowsall

arcconf getconfig

Description

Lists information about the controllers, logical drives, and physical devices. This information can include (but is not limited to) the following items:

Syntax

arcconf config controller-number [ad | ld | pd | al]

Options

The controller number

Adapter information only

Logical drive information only

Physical device information only

All information

Examples


arcconf getconfig 1 ad

arcconf getlogs

Description

Obtains controller log information. Provides access to the status and event logs of a controller.

Syntax

arcconf getlogs controller-number device | dead | event [clear | tabular]

Options

The controller number

Retrieve a log of any device errors the controller has encountered

Retrieve a log that records any occurrences of defunct devices

Retrieve a log of special events that may have occurred (for example, rebuilds, LDMs, and so on)

Optional, clears the specified controller log

Optional, displays logs in a table format

Examples


arcconf getlogs 1 device
arcconf getlogs 1 device tabular 

arcconf getstatus

Description

The getstatus function displays the status of any background command that is currently running. Including information about the most recent rebuild, synchronization, logical-drive migration, and compaction/expansion. The information includes the type of operation, status, logical drive number, logical drive size, and percentage of the operation completed.



Note - getstatus reports currently active operations for both arcconf commands and commands issued from the Sun StorageTek RAID Manager software. It reports verify, clear, initialize, and secure erase operations on physical devices. It only reports active operations. It does not display information if the operation is completed.


Syntax

arcconf getstatus controller-number

Options

The controller number

Examples


arcconf getstatus 1

arcconf getversion

Description

Lists version information for all controllers or a specific controller’s software components, including information about the BIOS, driver, firmware currently running, and firmware that will run after a reboot.



Note - The firmware version that will run after a reboot is called the “staged” firmware.


Syntax

arcconf getversion controller-number

Options

The controller number. If no controller number is specified, information for all controllers is retrieved.

Examples


arcconf getversion

arcconf identify

Description

Identifies a physical or logical device by blinking its LEDs

Syntax

arcconf identify controller-number logicaldrive logical-drive-number

arcconf identify controller-number device channel-number ID-number

Options

The controller number

The number of the logical drive to be identified

The channel and ID number for the device to be identified

Examples


arcconf identify 1 device 0 0
arcconf identify 1 all

arcconf key

Description

Loads a feature key onto a Sun controller

Syntax

arcconf key controller-number set key-number

Options

The controller number

type the key number provided by Sun

Examples


arcconf key 1 set ABCD EFGH IJKL MNOP QRST UVWX

arcconf modify

Description

Morphs a logical device from one raid level to another (RAID Level Migration). Expands a logical device from original to one with larger capacity (Online Capacity Expansion). Can be used to make mirrored sets.

Syntax

arcconf modify controller-number from logical-drive-number to [stripe-size | init-priority | legs | [size | max] RAID-number | channel-number ID-number[channel-number ID-number]] [noprompt]

Options

The controller number

The logical drive to be modified

The logical drive number

The modifications

The stripe size in KB. Options are 16, 32, 64, 128, 256, 512, and 1024. the default is 256 KB.

The priority level of the modification. Options are low, med, and high.

The number of subarrays for a RAID level-50 or RAID level 60 array. Possible values are 2-16 legs and 3-16 drives/leg (to 48 drives maximum).

Desired size in MB or max to use all available space on the disk

The RAID level for the logical drive 0, 1, 5, 5EE, or 10.



Note - The channel number and ID number parameters is the list of devices that will contain the target modification object.


The channel number for the device

The device_ID (device number) for the device



Note - Channel and device_ID are repeatable parameters.


Used mostly for the purpose of scripting setup, this parameter overrides all user confirmations.

Examples


arcconf modify 1 from 1 to 262144 1 0 0 0 1

arcconf rescan

Description

Enables the controller to check for the removal of any disk drives in the ready state and to check for the connection of any new disk drives to the controller. The command returns when the rescan is complete.

Syntax

arcconf rescan controller-number

Options

The controller number

Examples


arcconf rescan 1

arcconf romupdate

Description

Allows new firmware and BIOS to be flashed to the controller. A reboot is required for the new firmware to take effect.



Note - This function is only supported in Windows and Linux. Be sure to copy the *.UFI update files from the CD and not from the BIOS / firmware update diskettes.


Syntax

arcconf romupdate controller-number basename

Options

The controller number

The name of the ROM image basename or the fully qualified name if you have a set of controller ROM images.



Note - All UFI files must be in the same directory prior to invoking arcconf. If you are copying UFI files from floppy images, be sure to check all images.


Examples


arcconf romupdate 1 AC2200
arcconf romupdate 1 AC220001.UFI

arcconf setalarm

Description

Sets the state of the controller audible alarm, if present.

Syntax

arcconf setalarm controller-number on | off | silence | test

Options

The controller number

Enables the alarm

Disables the alarm

Quiets the currently sounding alarm

Triggers the alarm

Examples


arcconf setalarm 1 test
arcconf setalarm 1 silence

arcconf setcache

Description

Changes a logical drive’s cache mode.

Syntax

arcconf setcache controller-number logicaldrive logical-drive-number [ron | rof] [wt | tb | wbb] [noprompt]

arcconf setcache controller-number device channel-number ID-number [ron | roff] [wt | tb | wbb] [noprompt]

Options

The controller number

The number of the logical drive whose cache will be altered

Turn on or off logical drive read cache

wt / wb: disable or enable logical drive write cache write-through. wbb: enable logical drive write cache write-back enabled when protected by a battery

The channel number and device number for the device

Used mostly for the purpose of scripting setup, this parameter overrides all user confirmations.

Examples


arcconf setcache logicaldrive 1 ron
arcconf setcache device 0 0 wb

arcconf setconfig

Description

Resets the controller's configuration. Logical drives are deleted, hard disks are reset to the READY state.

Syntax

arcconf setconfig controller-number default [noprompt]

Options

The controller number

Restores the controller’s default configuration

Used mostly for the purpose of scripting setup, this parameter overrides all user confirmations.

Examples


arcconf setconfig 1 default

arcconf setname

Description

Renames a logical drive.

Syntax

arcconf setname controller-number logicaldrive logical-drive-number new-name

Options

The controller number

The number of the logical drive to be renamed

The new name of the logical drive

Examples


arcconf setname 1 logicaldrive 1 BACKUP_A

arcconf setstate

Description

Changes the state of a physical device from its current state to the designated state (hot-spare).

Syntax

arcconf setstate controller-number device channel-number ID-number device-number hsp | rdy | ddd logicaldrive logical-drive-number [logical-drive-number]

Options

The controller number

The channel and ID number for the device

The device number for the device

Create a hot-spare from a ready drive

Remove a hot-spare designation

Force a drive offline

Logical drive number(s) used to create an assigned hot-spare

Examples


arcconf setstate 1 device 0 0 hsp logicaldrive 1 2 3
arcconf setstate 1 device 0 0 rdy logicaldrive 2

arcconf task

Description

Performs a task on a logical drive.

Syntax

arcconf task start | stop controller-number logicaldrive logical-drive-number [verify_fix | verify | clear] [noprompt]

arcconf task start | stop controller-number device channel-number ID-number[verify_fix | verify | clear | initialize | secureerase] [noprompt]

Options

The controller number

The number of the logical drive on which the task is to be performed

The channel and ID number on which the task is to be performed

Verifies the disk media and repairs the disk if bad data is found

Verifies the disk media

Removes all data from the drive

Returns a drive to the READY state (erases the metadata)

Removes all data from the drive in a secure fashion to prevent possible recovery of the erased data

Used mostly for the purpose of scripting setup, this parameter overrides all user confirmations.

Example:


arcconf task start 1 logicaldrive 1 verify
arcconf task start 1 device 0 0 initialize