This guide is intended for system administrators, developers, and engineers who need to use the command line interface (CLI) tool and its associated commands and script files. Selected CLI commands perform functions that you can also access from the Modular Disk (MD) Storage Manager, which is the graphical user interface (GUI) to the storage array. See the User's Guide, which describes the Storage Manager software that is used to create and manage multiple storage arrays. For additional information, see the hardware and software manuals that shipped with your system.
NOTE: Always check for updates on support.dell.com and read the updates first because they often supersede information in other documents.
NOTE: CLI commands do not have interactive warnings for destructive commands.
The command line interface (CLI) is a software tool that enables storage array installers, developers, and engineers to configure and monitor storage arrays. Using the command line interface, you can issue commands from an operating system prompt, such as the Microsoft® Windows® command prompt (C:\)or a Linux operating system terminal.
Each command performs a specific action for managing a storage array or returning information about the status of a storage array. You can enter individual commands, or run script files when you need to perform operations more than once (such as installing the same configuration on several storage arrays). A script file can be loaded and run from the command line interface. You can also run commands in an interactive mode. Interactive mode enables you to connect to a specific storage array and rapidly enter a command, determine the effect on the storage array, and then enter a new command.
The command line interface gives you direct access to a script engine utility in the Dell PowerVault Modular Disk Storage Manager software (MD Storage Manager). The script engine reads the commands, or runs a script file, from the command line and performs the operations instructed by the commands.
You can use the command line interface to perform the following functions:
Directly access the script engine and run commands in interactive mode or using a script file.
Create script command batch files to be run on multiple storage arrays when you need to install the same configuration on different storage arrays.
Run script commands on a storage array directly connected to a host, a storage array connected to a host by an Ethernet, or a combination of both.
Display configuration information about the storage arrays.
Add storage arrays to and remove storage arrays from the management domain.
Perform automatic discovery of all storage arrays attached to the local subnet.
Add or delete Simple Network Management Protocol (SNMP) trap destinations and email alert notifications.
Specify the mail server and sender email address or Simple Mail Transport Protocol (SMTP) server for alert notifications.
Direct the output to a standard command line display or to a named file.
How to Use the Command Line Interface
Using the CLI commands, you can access the script engine, specify which storage array receives the script commands, and set operation environment parameters.
A CLI command consists of the following elements:
The term SMcli
Storage array identifier
Parameters
Script commands
The following syntax is the general form of a CLI command:
SMcli storageArray parameters script-commands;
SMcli
Invokes the command line interface
storageArray
Host name or IP address of the storage array
parameters
CLI parameters that define the environment and purpose for the command
script-commands
One or more script commands or the name of a script file containing script commands
The script commands are the storage array configuration commands. About the Script Commands presents an overview of the script commands. Script Commands provides definitions, syntax, and parameters for the script commands.
Usage Notes
If you enter SMcli and a storage array name but do not specify CLI parameters, script commands, or a script file, the command line interface runs in interactive mode. Interactive mode enables you to run individual commands without prefixing the commands with SMcli. You can enter a single command, view the results, and enter the next command without typing the complete SMcli string. Interactive mode is useful for determining configuration errors and quickly testing configuration changes.
If you enter SMcli without any parameters or with an incorrect parameter, the script engine returns usage information.
NOTE: The SMcli command is installed under the client directory of the selected path during a management station install of the MD Storage Manager software.
NOTE: The SMcli command should be a component of the system environment command path.
CLI Commands
This section lists the CLI commands you can use to perform the following functions:
Identify storage arrays.
Set passwords.
Add storage arrays.
Specify communication parameters.
Enter individual script configuration commands.
Specify a file containing script configuration commands.
The following are general forms of the CLI commands, showing the parameters and terminals used in each command. Table 1-1 lists definitions for the parameters shown in the CLI commands.
Specify either the host name or the Internet Protocol (IP) address of an in-band managed storage array (IPv4 or iPv6) or an out-of-band managed storage array (IPv4 only).
If you manage a storage array by using a host connected directly to the storage array (in-band storage management), you must use the -n parameter if more than one storage array is connected to the host.
If you manage a storage array through an Ethernet connection (out-of-band storage management), you must specify the host-name-or-IP-address of the redundant array of independent disks (RAID) controller modules.
If you have previously configured a storage array in the graphical user interface (GUI) of the MD Storage Manager, you can specify the storage array by its user-supplied name by using the-n parameter.
-A
Use to add a storage array to the configuration files. If you do not follow the -A parameter with a host-name-or-IP-address, automatic discovery scans the local subnet for storage arrays.
-a
Use to add an SNMP trap destination or an email address alert destination.
When adding an SNMP trap destination, the SNMP community is automatically defined as the community name for the trap and the host is the IP address or Domain Name Server (DNS) host name of the system to which the trap should be sent.
When adding an email address for an alert destination, the email-address is the email address to which to send the alert message.
-c
Use to indicate that you are entering one or more script commands to run on the specified storage array. Terminate each command by using a semicolon (;).
You cannot place more than one -c parameter on the same command line. You can include more than one script command after the -c parameter.
-d
Use to display the contents of the script configuration file.
-e
Use to disable syntax checking when executing the current CLI command.
-F (uppercase)
Use to specify the email address from which all alerts will be sent.
-f (lowercase)
Use to specify a file name containing script commands intended to run on the specified storage array.
This parameter is similar to the -c parameter in that both are intended for running script commands. The -c parameter allows you to execute individual script commands. The -f parameter allows you to execute script commands contained in a file.
NOTE: By default, any errors encountered when running the script commands in a file are ignored, and the file continues to run. To override this behavior, use the set session errorAction=stop command in the script file.
-g
Use to specify an ASCII file that contains email sender contact information to include in all email alert notifications. The CLI assumes the ASCII file is text only, without delimiters or any expected format. A typical file contains the following information:
Name
Title
Company
Phone
Pager
NOTE: You can use any file name that your operating system supports. You must not use userdata.txt. Some operating systems reserve userdata.txt for system information.
-h
Use with the -a and -x parameters to specify the host name that is running the SNMP agent to which the storage array is connected.
-I
Use to specify the type of information to be included in the email alert notifications. The following are valid information arguments:
eventOnly Only event information is included in the email.
profile Event and array profile information is included in the email.
supportBundle Event and support bundle information is included in the email.
NOTE: You can enter only one information argument each time you execute the command. If you want all of the information, you must run the command three times.
-i
Use with the -d parameter to display the IP address of the known storage arrays.
-m
Use to specify the host name or IP address of the email server from which to send email alert notifications.
-n
Use to specify the name of the storage array on which to run the script commands. This name is optional when you use host-name-or-IP-address; however, if you are using the in-band method for managing the storage array, you must use the -n parameter if more than one storage array is connected to the host at the specified address.
The storage array name is required when host-name-or-IP-address is not used; however, the name of the storage array configured for use in the MD Storage Manager GUI (that is, listed in the configuration file) must not be a duplicate name of any other configured storage array.
-o
Use with the -cor -f parameter to specify a file name for all output text that is a result of running the script commands.
-p
Use to specify the password for the storage array on which to run commands. A password is not necessary under the following conditions:
A password has not been set on the storage array.
The password is specified in a script file that is running.
The storage array password is specified by using the-cparameter and the set session password=passwordcommand.
-q
Use to specify how frequently to include additional profile or support bundle information in the email alert notifications. An email alert notification that contains at least the basic event information is always generated for every critical event. If you set the-Iparameter to eventOnly, the only valid argument for -q is everyEvent. If you set the-Iparameter to either profile or supportBundle, this information is included with the emails with the frequency specified by the-qparameter.
Valid frequency arguments are:
everyEvent Information is returned with every email alert notification.
2 Information is returned no more than once every two hours.
4 Information is returned no more than once every four hours.
8 Information is returned no more than once every eight hours.
12 Information is returned no more than once every 12 hours.
24 Information is returned no more than once every 24 hours.
-r
Use with the -a or -x parameter to specify the name of a management station. The name of a management station can be either direct_sa (out-of-band storage array) or host_sa (in-band storage arrays [host-agent]). The-rparameter enables you to set or change the alert notifications for all storage arrays under each management station.
-S (uppercase)
Use to suppress the informational messages describing command progress that appear when running script commands. (Suppressing informational messages is also called silent mode.) This parameter suppresses the following messages:
Performance syntax check
Syntax check complete
Executing script
Script execution complete
SMcli completed successfully
-s (lowercase)
Use with the -dparameter to display the alert settings in the configuration file.
-v
Use with the -d parameter to display the current global status of the known devices in the storage array configuration file. (The configuration file lists all of the devices in a storage array configuration and the relationship between the devices. Use the configuration file to reconstruct a storage array.)
-X (uppercase)
Use to delete a storage array from the configuration file. (The configuration file lists all of the devices in a storage array configuration and the relationship between the devices. Use the configuration file to reconstruct a storage array.)
-x (lowercase)
Use to remove an SNMP trap destination or an email address alert destination. The community is the SNMP community name for the trap, and the host is the IP address or DNS host name of the system to which you want the trap sent.
-?
Use this parameter to display usage information about the CLI commands.
Formatting Considerations
Quotation marks (" ") used as part of a name or label require special consideration when you run the CLI and script commands on a Microsoft® Windows® operating system. The following explains the use of quotation marks in names while running CLI and script commands on Windows.
When quotation marks (" ") are part of an argument, you must insert a backslash (\) before each quotation mark character unless you are in interactive mode. For example:
-c "set storageArray userLabel=\"Engineering\";"
where Engineering is the storage array name.
You cannot use quotation marks (" ") as part of a character string (also called string literal) within a script command. For example, you cannot enter the following string to set the storage array name to "Finance"Array:
On a Linux operating system, the delimiters around names or labels are single quotation marks (` '). The Linux versions of the previous examples are:
-c `set storageArray userLabel="Engineering";'
Detailed Error Reporting
Error data collected from an error encountered by the CLI is written to a file. Detailed error reporting under the CLI works as follows:
If the CLI must abnormally end execution or abort script command execution, error data is collected and saved before the CLI aborts.
The CLI automatically saves the error data by writing the data to a file with a standard name.
The CLI does not have any provisions to avoid overwriting an existing version of the file containing error data.
For error processing, errors appear as two types:
Parameter or syntax errors you might enter
Exceptions that occur as a result of an operational error
When the CLI encounters either type of error, it writes information describing the error directly to the command line and sets a return code. Depending on the return code, the CLI might also write additional information about which parameter caused the error. The CLI also writes information about what command syntax was expected to help you identify any syntax errors you might have entered.
When an exception occurs while executing a command, the CLI automatically saves the error information to a file named excprpt.txt. The CLI attempts to place excprpt.txt in the directory specified by the system property devmgr.datadir, which by default is the "client/data" directory under the main installation directory in Windows and the /var/opt/SM directory in Linux. If for any reason the CLI cannot place the file in the devmgr.datadir-specified directory, the CLI saves the excprpt.txt file in the same directory from which the CLI is running. You cannot change the file name or location. The excprpt.txt file is overwritten every time an exception occurs. To save the information in the excprpt.txt file, you must to copy the information to a new file or directory.
Exit Status
After you run a CLI command or a CLI and script command, status is displayed that indicates the success of the operation defined by the command. The status values are shown in Table 1-3.
Table 1-3. Exit Status
Status Value
Meaning
0
The command terminated without an error.
1
The command terminated with an error. Error information is also displayed.
2
The script file does not exist.
3
An error occurred while opening an output file.
4
A storage array is not at the specified address.
5
Addresses specify different storage arrays.
6
A storage array name does not exist for the host agent connected.
7
The storage array name was not at the specified address.
8
The storage array name was not in the configuration file.
10
A management class does not exist for the storage array.
11
A storage array was not found in the configuration file.
12
An internal error occurred.
13
Invalid script syntax was found.
14
The RAID controller module was unable to communicate with the storage array.
15
A duplicate argument was entered.
16
An execution error occurred.
17
A host was not at the specified address.
18
The World Wide Identifier (WWID) was not in the configuration file.
19
The WWID was not at the address.
20
An unknown IP address was specified.
21
The event monitor configuration file was corrupted.
22
The storage array was unable to communicate with the event monitor.
23
The RAID controller module was unable to write alert settings.
24
The wrong management station was specified.
25
The command was not available.
26
The device was not in the configuration file.
27
An error occurred while updating the configuration file.
28
An unknown host error occurred.
29
The sender contact information file was not found.
30
The sender contact information file could not be read.
31
The userdata.txt file exists.
32
An invalid -I value in the email alert notification was specified.
33
An invalid -fvalue in the email alert notification was specified.
Usage Examples
The following examples show how to enter CLI commands on a command line. The examples show the syntax, form, and, in some examples, script commands. Examples are shown for both Windows and Linux operating systems. The usage for the-c parameter varies depending on your operating system. On Windows operating systems, put quotation marks (" ") around the script command following the -c parameter. On Linux operating systems, put single quotation marks (` ') around the script command following the -cparameter.
NOTE: See Script Commands for descriptions of the script commands used in the following examples.
This example shows how to change the name of a storage array. The original name of the storage array is Payroll_Array. The new name is Finance_Array.
This example shows how to delete an existing virtual disk and create a new virtual disk on a storage array. The existing virtual disk name is Stocks_<_Bonds. The new virtual disk name is Finance. The RAID controller module host names are finance1 and finance2. The storage array is protected and requires the password TestArray.
This example shows how to run commands in a script file named scriptfile.scr on a storage array named Example. The -e parameter runs the file without checking syntax. Executing an SMcli command without checking syntax enables the file to run more quickly; however, the SMcli command may not execute correctly if the syntax is incorrect.
SMcli -n Example -f scriptfile.scr -e
This example shows how to run commands in a script file named scriptfile.scr on a storage array named Example. In this example, the storage array is protected by the password My_Array. Output, as a result of commands in the script file, goes to file output.txt.
Windows:
SMcli -n Example -f scriptfile.scr -p "My_Array" -o output.txt
Linux:
SMcli -n Example -f scriptfile.scr -p `My_Array' -o output.txt
This example shows how to display all storage arrays that are currently discovered in the current configuration. The command in this example returns the host name of each storage array.
SMcli -d
If you want to know the IP address of each storage array in the configuration, add the -i parameter to the command.