C H A P T E R 1 |
Overview |
This chapter introduces the Sun StorEdge™ Command-Line Interface (Sun StorEdge CLI) and includes the following topics:
The Sun StorEdge CLI provides the capability to monitor and configure Sun StorEdge 3000 family arrays from an operating system command-line interface using inband or out-of-band interfaces.
The management mode is determined based on the following:
Note - If the array’s IP address cannot be found, the --oob option does not switch to out-of-band mode. This prevents scripts from failing when the array’s IP address is not set. |
The Sun StorEdge CLI must be installed on the server attached to the array that you want to access. For instructions about installing the Sun StorEdge CLI, refer to the Sun StorEdge 3000 Family Software Installation Guide.
Note - You cannot use the Sun StorEdge CLI and Sun StorEdge Configuration Service at the same time to configure, monitor, or maintain an array. |
To access the Sun StorEdge CLI, follow the appropriate procedure for your operating system.
The Sun StorEdge CLI start-up time depends on several factors:
The SES driver exhibits undesirable behavior when the Sun StorEdge CLI attempts to open a device file corresponding to a non-existent SES device. This is similar to the way the format(1M) command startup time depends on the number of disk devices on the system and the I/O load presented to those devices.
To Access the Sun StorEdge CLI from UNIX Operating Systems |
To access the Sun StorEdge CLI from the Solaris operating system or Linux, HP-UX, or AIX operating systems, perform the following steps.
1. To access the Sun StorEdge CLI, log in as root on the server that is attached to the array.
Note - If you do not have /usr/sbin in your PATH environment variable, you can run the Sun StorEdge CLI as /usr/sbin/sccli. |
To Access the Sun StorEdge CLI from the Microsoft Windows Operating System |
To access the Sun StorEdge CLI, go to Start Programs Sun StorEdge CLI Family Command Line Interface. This launches the file: c:\program files\sun\sccli\sccli.bat. You can modify this file if you want to change the command-line options passed to the Sun StorEdge CLI.
You can also access the Sun StorEdge CLI from a command shell. In the shell window, type:
Refer to the Sun StorEdge CLI man page and the Release Notes for the latest documentation updates.
To Access the Man Page from UNIX Operating Systems |
For the Solaris operating system or Linux, HP-UX, or AIX operating systems, to access the man page, type:
To Access Help from the Microsoft Windows Operating System |
To access help in Windows, go to Start Programs Sun StorEdge CLI Family Command Line Help.
The Sun StorEdge CLI supports single-command mode and interactive mode. In interactive mode no command is specified on the command line. Specifying the device name on the command line is optional. If the device name is omitted, the Sun StorEdge CLI searches for any locally attached Sun StorEdge 3000 family arrays. If one is found, it is selected automatically. If more than one device is found, a list of choices is displayed. If no device is found, the Sun StorEdge CLI exits with an error.
In interactive mode, specify the device on the command line. For instance, type:
# sccli 206.1.111.111 sccli: selected se3000://206.1.111.111:58632 [SUN StorEdge 3310 SN#000001] sccli> show disks free sccli: no free disks found |
To choose from a list of available devices, do not specify a device on the command line. For instance, in Solaris, type:
In single-command mode, the name of the target device and the command to execute are specified on the command line. The Sun StorEdge CLI executes the command and exits.
To start single-command mode, type:
In single-command mode, type the entire command on the command line. For instance, in Solaris, type:
In single-command mode in Windows, type:
When the Sun StorEdge CLI performs a single command, an exit code indicates the success or failure of the command. An exit code of 0 indicates success, and any non-zero code indicates the command failed.
Sun StorEdge CLI commands are case-independent. Uppercase, lowercase, or mixed case parameters, commands, and options can be used. Options have a long form and a single-letter form. Options begin with a single dash “-” for single-letter form and with two dashes “--” for long form.
In most cases, you can abbreviate command keywords to the shortest unambiguous substring. For example, abbreviate the show disks command to sh d. Or, type show lds to execute the show logical-drive command. However, to avoid ambiguity, do not abbreviate the command name.
The general syntax for commands in single-command mode is:
Except for the help, about, and version commands, all Sun StorEdge CLI commands require the specification of a device name.
The following table shows the parameters and options that are used with commands in the following chapters. TABLE 1-2 also shows the options that can be used to simplify script creation and retrieve information.
A single-host LUN mapping for a logical unit on a host channel can be specified using 3 dotted decimals in this form, where ch is the physical host channel number, id is the SCSI ID of the logical unit, and lun is the logical unit number. |
||
For more information, see Device Names for Inband Communication and Device Names for Out-of-Band Communication. |
||
Physical disk drives are specified as two decimal integers separated by a period. The first number is the physical channel number, and the second number is the SCSI target ID for the drive on that channel. For example, specify the disk with target ID 1 on channel 2 as 2.1. |
||
LVD JBOD enclosure only. Selects the disk enclosure containing the specified disk. Specify a Solaris device name such as sd31 or c1t0d0. This option is an alternative to specifying an enclosure services device such as /dev/es/sesn when selecting a JBOD enclosure. The disk option does not support split-bus JBOD enclosures. |
||
A list of disk specifiers, separated by commas. For example, 1.0, 1.1, 1.2. |
||
--help, --usage |
Displays a usage message and exits without processing any commands. This option can also be used as a command. For information about the help command, see help. |
|
The command abbreviation, icl, provides an alternative to typing the full command name. |
||
A comma-separated list of logical drive indexes, for example, ld0,ld1,ld2, or a list of logical drive identifiers. Note that these logical drive numbers do not necessarily correspond to the single-digit logical drive identifiers in the firmware menu interface. The Sun StorEdge CLI logical drive indexes might change when logical drives are deleted. |
||
Displays a list of local or remote devices that the Sun StorEdge CLI manages, and exits without processing any commands. The output includes a file name or URL that can be used to access the device in subsequent commands and the SCSI inquiry data and serial number of the subsystem. If a network URL is specified on the command line, the output is limited to that device. If a local device file name or directory name is specified, the search is limited to matching devices. The output includes the device name, vendor, product ID, and serial number. |
||
A logical drive can be represented by a logical drive index (a small decimal number distinguished by an ld prefix), or a logical drive identifier (an eight-digit hexadecimal number). For example, a logical drive might be identified both by its logical drive index ld3 and its logical drive ID 71038221. For additional information, see Logical Drive Syntax. Note that these logical drive numbers do not necessarily correspond to the single-digit logical drive identifiers in the firmware menu interface. The Sun StorEdge CLI logical drive indexes might change when logical drives are deleted. |
||
Logical volumes are specified using either a logical volume index, such as lv12, or an eight-digit hexadecimal logical volume ID. For additional information, see Logical Volume Syntax. Note that these logical volume numbers do not necessarily correspond to the single-digit logical volume identifiers in the firmware menu interface. The Sun StorEdge CLI logical volume indexes might change when logical volumes are deleted. |
||
Partitions of a logical drive or logical volume are made available to hosts by mapping each partition to a target ID and logical unit number on one or more channels of the array controller. Commands with a lun parameter accept the physical channel number, target ID, and logical unit as three decimal numbers separated by periods. For example, 4.1.2 represents physical channel 4, target ID 1, logical unit number 2. |
||
A comma-separated list of logical volume indexes, for example, lv0,lv1,lv2, or a list of logical volume identifiers. Note that these logical volume numbers do not necessarily correspond to the single-digit logical volume identifiers in the firmware menu interface. The Sun StorEdge CLI logical volume indexes might change when logical volumes are deleted. |
||
Assumes a no response to any yes/no prompts. Use this option to prompt the user before running scripts. |
||
Accesses the selected device using out-of-band communication rather than using the SCSI or Fibre Channel host bus adapter (HBA) with which the array is connected to the host. This option accesses the device using a local HBA only briefly, to retrieve the array’s network address, and all subsequent access is done over the network. This can provide better performance when the array is processing large quantities of SCSI I/O. If the IP address for the array cannot be determined, inband communication is used instead. |
||
A logical drive or logical volume identifier with a suffix indicating a specific partition within the logical drive or volume, for example, ld2-03 or 2CA48914-03. The suffix is a hexadecimal number ranging from 0 to 7F. |
||
Specifies the password assigned to the array controller. The user must supply the correct password when issuing potentially dangerous commands to the array over a network connection. For security reasons, it is preferable to supply this password using the Sun StorEdge CLI password command, or enter the password interactively when prompted for it. No password is required for commands which do not modify the state of the controller, or commands issued using the inband communication mode. |
||
Displays the version number of the Sun StorEdge CLI and exits without processing any commands. |
||
Assumes a yes response to any yes/no prompts. Use this option to run scripts without prompting the user. |
For inband communication, device names include one of the following:
For systems using the Solaris operating system, the device name is typically specified as:
In the preceding device name code:
s2 = slice 2 of the (logical) disk. Usually, slice 2 is specified when identifying a disk for administrative purposes, but any slice number between 0 and 7 (if the slice exists) works.
An example of the device name in Solaris is:
To access a JBOD enclosure services device using Solaris, specify the device name as shown in the following example, or use the --disk option and specify the name of a disk device within the enclosure.
For Windows operating systems, the device name is specified using the Windows internal device name for the physical device, where N corresponds to the disk number displayed in the Disk Administrator.
Note - If inband management access has been disabled by Sun StorEdge CLI--the firmware application--or Sun StorEdge Configuration Service, and a user attempts to use inband management, the message “RAID controller not responding” displays when a command is run. If this occurs, use out-of-band management to access Sun StorEdge CLI. For details, see Device Names for Out-of-Band Communication. |
To access a RAID array using its out-of-band network interface rather than using the SCSI or FC host bus adapter (HBA) with which the array is connected to the host, specify the --oob option. This option accesses the device using a local HBA only briefly, to retrieve the array’s network address, and all subsequent access is done over the network. Out-of-band communication is useful when heavy SCSI I/O makes inband access slow. It can also be used when the host has no path to the primary controller, but can still retrieve the IP address of the array from a logical unit number (LUN) mapped from the secondary controller.
Alternately, if the host on which the Sun StorEdge CLI is running is not connected to the array with a SCSI or FC HBA, a URL can be specified to indicate that the Sun StorEdge CLI should connect to the remote array over the network.
In out-of-band management, the device name is typically specified as a URL in the format:
A physical disk attached to the array can be identified with any of the following:
Logical drives can be specified by one of the following alphanumeric strings:
Note - Logical drive indexes can change whenever a logical drive is deleted, while a logical drive identifier never changes over the life of the logical drive. |
The logical drive index number referenced with each logical drive is dynamic; it might change when logical drives are created or deleted. The index number is used strictly as a placeholder that enables you to visually keep track of logical drives. For example, if four logical drives exist, and LD2 is deleted, the existing LD3 dynamically changes to LD2, and LD4 changes to LD3. Only the LD index number changes; all LUN mapping and data on the logical drives remains unchanged. Care must be taken not to assume that a logical drive keeps the same logical drive index after creating or deleting any logical drive or rebooting the array controller.
Note - In contrast, in the firmware application, the LG number on the View and Edit Logical Drives menu is not dynamic. After a logical drive is deleted, you see an empty placeholder. |
Some commands accept a list of logical drives, or LD-list. This list is constructed by concatenating one or more logical drive identifiers or indexes as shown in the following examples.
This example lists logical drives using the local drive identifier.
This example lists logical drives using the index number.
Note - Do not include spaces before or after the commas when specifying a logical drive list. |
Logical volumes are specified by one of the following alphanumeric strings:
Note - Logical volume indexes can change whenever a logical volume is deleted, while a logical volume identifier never changes over the life of the logical volume. |
The logical volume index number referenced with each logical volume is dynamic; it might change when logical volumes are created or deleted. The index number is used strictly as a placeholder that enables you to visually keep track of logical volumes. For example, if four logical volumes exist, and LV2 is deleted, the existing LV3 dynamically changes to LV2, and LV4 changes to LV3. Only the LV index number changes; all LUN mapping and data on the logical volume remains unchanged. Care must be taken not to assume that a logical volume keeps the same logical volume index after creating or deleting any logical volume or rebooting the array controller.
A list of logical volumes identifiers or indexes can be specified by concatenating one or more logical drive identifiers or logical volume indexes, separating them with commas.
Note - In contrast, in the firmware application, the LG number on the View and Edit Logical Drives menu is not dynamic. After a logical volume is deleted, you see an empty placeholder. |
This example lists logical volumes using the local volume identifier.
This example lists logical volumes using the local volume index number.
In the Sun StorEdge CLI, all device capacity is displayed in powers of 1024.
1 Mbyte = 1024 Kbyte = 1,048,576 bytes
1 Gbyte = 1024 Mbyte = 1,073,741,824 bytes
1 Tbyte = 1024 Gbyte = 1,099,511,627,776 bytes
Copyright © 2009 Sun Microsystems, Inc. All rights reserved.