Dell PowerVault MD3000i, PowerVault Modular Disk Storage Manager Cli Manual

Dell™ PowerVault™ Modular Disk
Storage Manager CLI Guide
www.dell.com | support.dell.com
Notes and Notices
NOTE: A NOTE indicates important information that helps you make better use of
your computer.
and tells you how to avoid the problem.
____________________
Information in this document is subject to change without notice. © 2008 Dell Inc. All rights reserved.
Reproduction in any manner whatsoever without the written permission of Dell Inc. is strictly forbidden.
Trademarks used in this text: Dell, the DELL logo, and PowerVault are trademarks of Dell Inc.; Microsoft, Internet Explorer , and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
Other trademarks and trade names may be used in this document to refer to either the entities claiming the marks and names or their products. Dell Inc. disclaims any proprietary interest in trademarks and trade names other than its own.
February 2008
Contents
1 About the Command Line Interface . . . . 13
How to Use the Command Line Interface . . . . . . . . 14
Usage Notes
CLI Commands
Command Line Parameters
Formatting Considerations
Detailed Error Reporting
Exit Status
. . . . . . . . . . . . . . . . . . . . . . . . 25
Usage Examples
. . . . . . . . . . . . . . . . . . . . 15
. . . . . . . . . . . . . . . . . . . 16
. . . . . . . . . . . . 18
. . . . . . . . . . . . . . . 24
. . . . . . . . . . . . . . . . 24
. . . . . . . . . . . . . . . . . . . . . 27
2 About the Script Commands . . . . . . . . . . 29
Script Command Structure . . . . . . . . . . . . . . . 30
Script Command Synopsis
. . . . . . . . . . . . . . . 32
Recurring Syntax Elements
Usage Guidelines
Adding Comments to a Script File
. . . . . . . . . . . . . . . 34
. . . . . . . . . . . . . . . . . . . . 40
. . . . . . . . . . . 41
Contents 3
3 Configuring a Storage Array . . . . . . . . . . 43
Configuring a Storage Array . . . . . . . . . . . . . . . 44
Determining What is on Your Storage Array
Saving a Configuration to a File
Using the Create Virtual Disk Command
Using the Auto Configure Command
Modifying Your Configuration
. . . . . . . . . . . . . . 55
Setting the Storage Array Password
Setting Up SMTP and SNMP Alerts
Setting the RAID Controller Module Clocks
Setting the Storage Array Host Type
Setting Modification Priority
Assigning Global Hot Spares
. . . . . . . . . . . . 58
. . . . . . . . . . . . 59
. . . . . . . . . . 47
. . . . . . . . 53
. . . . . . . . 56
. . . . . . . . 56
. . . . . . . . 57
. . . . 44
. . . . . . 48
. . . . 57
4 Using the Snapshot Feature . . . . . . . . . . 61
Using Host Servers to Create an Initial Snapshot Virtual Disk
. . . . . . . . . . . . . . . . . . . . . . . 63
4 Contents
Creating a Snapshot Virtual Disk
. . . . . . . . . . . . 63
Enabling the Snapshot Virtual Disk Feature
Creating a Snapshot Virtual Disk with User-Assigned Physical Disks
. . . . . . . . . . . 64
Preparing Host Servers to Create an Initial Snapshot Virtual Disk
. . . . . . . . . . . . . . . . 65
Creating the Initial Snapshot Virtual Disk
Creating a Snapshot Virtual Disk with Software-Assigned Physical Disks
Creating a Snapshot Virtual Disk by Specifying a Number of Physical Disks
User-Defined Parameters
. . . . . . . . . . . . . 70
Names of Snapshot Virtual Disks and Repository Virtual Disks
. . . . . . . . . . . . . . 72
. . . . 64
. . . . . 66
. . . . . . . . . 67
. . . . . . 69
Changing Snapshot Virtual Disk Settings . . . . . . . 73
Stopping and Deleting a Snapshot Virtual Disk
Re-creating the Snapshot Virtual Disk
. . . . 74
. . . . . . 75
Preparing Host Servers to Re-create a Snapshot Virtual Disk
Re-creating a Snapshot Virtual Disk
. . . . . . . . . . . . . . . 75
. . . . . . . . 76
5 Using the Virtual Disk Copy Feature . . . . 77
Creating a Virtual Disk Copy . . . . . . . . . . . . . . 78
Enabling the Virtual Disk Copy Feature
Determining Virtual Disk Copy Candidates
Creating a Virtual Disk Copy
. . . . . . . . . . . . 79
Preparing Host Servers to Create a Virtual Disk Copy
Copying the Virtual Disk
. . . . . . . . . . . . . . . . . . . . . . 80
. . . . . . . . . . . . . . 81
. . . . . . 79
. . . . 79
Viewing Virtual Disk Copy Properties
Changing Virtual Disk Copy Settings
Recopying a Virtual Disk
. . . . . . . . . . . . . . . . 84
. . . . . . . . . 82
. . . . . . . . . . 83
Preparing Host Servers to Recopy a Virtual Disk
Recopying the Virtual Disk
. . . . . . . . . . . . . . . . . . . . . 85
. . . . . . . . . . . . . 86
Stopping a Virtual Disk Copy . . . . . . . . . . . . . . 87
Removing Copy Pairs
Interaction with Other Features
Storage Partitioning
Snapshot Virtual Disks
. . . . . . . . . . . . . . . . . . 87
. . . . . . . . . . . . . 88
. . . . . . . . . . . . . . . . 88
. . . . . . . . . . . . . . . 89
Contents 5
6 Maintaining a Storage Array . . . . . . . . . . 91
Routine Maintenance . . . . . . . . . . . . . . . . . . 91
Running a Media Scan
. . . . . . . . . . . . . . . 91
Running a Consistency Check
Resetting a RAID Controller Module
Enabling RAID Controller Module Data Transfer
Resetting Battery Age
. . . . . . . . . . . . . . . . . . . . . . . 94
. . . . . . . . . . . . . . . 94
Removing Persistent Reservations
Synchronizing RAID Controller Module Clocks
Locating Physical Disks
Performance Tuning
Monitoring Performance
Changing RAID Levels
Changing Segment Size
. . . . . . . . . . . . . . . . . . . . . . . . 95
. . . . . . . . . . . . . . 95
. . . . . . . . . . . . . . . . . . . 95
. . . . . . . . . . . . . . 96
. . . . . . . . . . . . . . . 97
. . . . . . . . . . . . . . 97
Defragmenting a Disk Group
. . . . . . . . . . . 93
. . . . . . . . 94
. . . . . . . . . 94
. . . . . . . . . . . . 98
Troubleshooting and Diagnostics
Collecting Physical Disk Data
Diagnosing a RAID Controller Module
Recovery Operations
. . . . . . . . . . . . . . . . . . 100
Setting RAID Controller Module Operational Mode
. . . . . . . . . . . . . . . . . 100
Changing RAID Controller Module Ownership
Initializing a Physical Disk
. . . . . . . . . . . . . . . . . . . . . 101
. . . . . . . . . . . . . 101
Reconstructing a Physical Disk
Initializing a Virtual Disk
. . . . . . . . . . . . . . 102
Redistributing Virtual Disks
. . . . . . . . . . . . 98
. . . . . . . . . . . 98
. . . . . . . 99
. . . . . . . . . . 102
. . . . . . . . . . . . . 103
6 Contents
7 Script Commands . . . . . . . . . . . . . . . . . 105
Command Formatting Rules . . . . . . . . . . . . . . . 106
Commands Listed by Function
Disk Group Commands
Enclosure Commands
Host Topology Commands
iSCSI Commands
. . . . . . . . . . . . . . . . . . 109
Physical Disk Commands
. . . . . . . . . . . . . 108
. . . . . . . . . . . . . . . 108
. . . . . . . . . . . . . . . 108
. . . . . . . . . . . . . 109
. . . . . . . . . . . . . . 110
RAID Controller Module Commands
Session Command
Show String Command
Snapshot Commands
Storage Array Commands
Virtual Disk Commands
. . . . . . . . . . . . . . . . . 111
. . . . . . . . . . . . . . . 111
. . . . . . . . . . . . . . . . 111
. . . . . . . . . . . . . 111
. . . . . . . . . . . . . . 113
Virtual Disk Copy Commands
Commands Listed Alphabetically
Accept Storage Array Pending Topology
. . . . . . . . 111
. . . . . . . . . . . 113
. . . . . . . . . . . . 114
. . . . . 114
Activate Storage Array Firmware
Autoconfigure Storage Array
Autoconfigure Storage Array Hot Spares
Check Disk Consistency
. . . . . . . . . . . . . . 117
Clear Physical Disk Channel Statistics
Clear Storage Array Configuration
Clear Storage Array Event Log
. . . . . . . . . 114
. . . . . . . . . . . 114
. . . . . 116
. . . . . . . 118
. . . . . . . . . 118
. . . . . . . . . . . 118
Clear Storage Array Firmware Pending Area
Clear Virtual Disk Reservations
Create Host
Create Host Group
Create Host Port
Create iSCSI Initiator
. . . . . . . . . . . . . . . . . . . . . 120
. . . . . . . . . . . . . . . . . 121
. . . . . . . . . . . . . . . . . . 121
. . . . . . . . . . . . . . . . 122
. . . . . . . . . . 119
. . . 119
Contents 7
Create RAID Virtual Disk (Automatic Physical Disk Select)
. . . . . . . . . . . . . . . . . . . . . 123
Create RAID Virtual Disk (Free Capacity Base Select)
. . . . . . . . . . . . . . . . . . . . 126
Create RAID Virtual Disk (Manual Physical Disk Select)
. . . . . . . . . . . . . . . . . . . . . 128
Create Snapshot Virtual Disk
Create Virtual Disk Copy
Delete Disk Group
Delete Host
. . . . . . . . . . . . . . . . . . . . . 138
Delete Host Group
Delete Host Port
Delete iSCSI Initiator
Delete Virtual Disk
. . . . . . . . . . . . . . . . . 137
. . . . . . . . . . . . . . . . . 138
. . . . . . . . . . . . . . . . . . 139
. . . . . . . . . . . . . . . . 139
. . . . . . . . . . . . . . . . . 140
. . . . . . . . . . . . 131
. . . . . . . . . . . . . . 135
Diagnose RAID Controller Module
Disable Storage Array Feature
. . . . . . . . . . . 144
Download Enclosure Management Module Firmware
. . . . . . . . . . . . . . . . . . 144
Download Physical Disk Firmware
Download Storage Array Firmware/NVSRAM
. . . . . . . . . . . . . . . . . 146
Download Storage Array NVSRAM
. . . . . . . . . 141
. . . . . . . . . 145
. . . . . . . . 147
8 Contents
Download Storage Array Physical Disk Firmware
Enable RAID Controller Module
Enable Storage Array Feature Key
Recopy Virtual Disk Copy
Recover RAID Virtual Disk
Re-create Snapshot
Remove Virtual Disk Copy
Remove Virtual Disk LUN Mapping
Repair Virtual Disk Consistency
Reset RAID Controller Module
. . . . . . . . . . . . . . . . . . . . . . 148
. . . . . . . . . . 149
. . . . . . . . . 149
. . . . . . . . . . . . . . 150
. . . . . . . . . . . . . 151
. . . . . . . . . . . . . . . . 153
. . . . . . . . . . . . . 155
. . . . . . . . . 156
. . . . . . . . . . 157
. . . . . . . . . . . 157
Reset Storage Array Battery Install Date
Reset Storage Array iSCSI Baseline
. . . . . . . . 158
. . . . . 158
Reset Storage Array SAS PHY Baseline . . . . . . 159
Reset Storage Array Virtual Disk Distribution
Revive Disk Group
Revive Physical Disk
Save Enclosure Log Data
Save Physical Disk Log
Save RAID Controller Module NVSRAM
Save Storage Array Configuration
Save Storage Array Events
Save Storage Array iSCSI Statistics
. . . . . . . . . . . . . . . . . 160
. . . . . . . . . . . . . . . . 160
. . . . . . . . . . . . . 161
. . . . . . . . . . . . . . . 161
. . . . . . 162
. . . . . . . . . 162
. . . . . . . . . . . . 163
. . . . . . . . 164
Save Storage Array Performance Statistics
Save Storage Array SAS PHY Counts
Save Storage Array State Capture
Save Storage Array Support Data
Set Controller
Set Disk Group
Set Enclosure Attribute
. . . . . . . . . . . . . . . . . . . . 166
. . . . . . . . . . . . . . . . . . . 169
. . . . . . . . . . . . . . 170
. . . . . . . 165
. . . . . . . . . 166
. . . . . . . . . 166
. . . 159
. . . . 165
Set Enclosure Identification
Set Host
Set Host Group
Set Host Port
Set iSCSI Initiator
. . . . . . . . . . . . . . . . . . . . . . 171
. . . . . . . . . . . . . . . . . . . 173
. . . . . . . . . . . . . . . . . . . . 174
. . . . . . . . . . . . . . . . . 175
Set iSCSI Target Properties
Set Physical Disk Channel Status
Set Physical Disk Hot Spare
Set Physical Disk State
Set Session
. . . . . . . . . . . . . . . . . . . . . 179
Set Snapshot Virtual Disk
Set Storage Array
. . . . . . . . . . . . . . . . . 182
Set Storage Array Enclosure Positions
Set Storage Array ICMP Response
. . . . . . . . . . . . 171
. . . . . . . . . . . . 176
. . . . . . . . . 177
. . . . . . . . . . . . 178
. . . . . . . . . . . . . . . 178
. . . . . . . . . . . . . 180
. . . . . . 184
. . . . . . . . 184
Set Storage Array iSNS Server IPv4 Address
Set Storage Array iSNS Server IPv6 Address
. . . 185
. . . 186
Contents 9
Set Storage Array iSNS Server Listening
. . . . . . . . . . . . . . . . . . . . . . . . . 187
Port
Set Storage Array iSNS Server Refresh
Set Storage Array Time
Set Unnamed Discovery Session
Set Virtual Disk
. . . . . . . . . . . . . . . . . . . 189
Set Virtual Disk Copy
Show Current iSCSI Sessions
Show Disk Group
Show Host Ports
. . . . . . . . . . . . . . . . . . 196
Show Physical Disk
. . . . . . . . . . . . . . . 188
. . . . . . . . . 188
. . . . . . . . . . . . . . . . 194
. . . . . . . . . . . 194
. . . . . . . . . . . . . . . . . . 195
. . . . . . . . . . . . . . . . . 196
Show Physical Disk Channel Statistics
Show Physical Disk Download Progress
Show RAID Controller Module
. . . . . . . . . . . 200
Show RAID Controller Module NVSRAM
Show Storage Array
Show Storage Array Autoconfigure
Show Storage Array Host Topology
. . . . . . . . . . . . . . . . 202
. . . . . . . . 204
. . . . . . . . 206
. . . . . . 188
. . . . . . 198
. . . . . . 199
. . . . . 201
Show Storage Array LUN Mappings
. . . . . . . . 206
Show Storage Array Negotiation Defaults
Show Storage Array Pending Topology
. . . . . . 207
Show Storage Array Unreadable Sectors
Show String
Show Unconfigured iSCSI Initiators
Show Virtual Disk
Show Virtual Disk Action Progress
Show Virtual Disk Copy
. . . . . . . . . . . . . . . . . . . . . 208
. . . . . . . . 208
. . . . . . . . . . . . . . . . . . 209
. . . . . . . . . 210
. . . . . . . . . . . . . . . 211
Show Virtual Disk Copy Source Candidates
Show Virtual Disk Copy Target Candidates
Show Virtual Disk Performance Statistics
Show Virtual Disk Reservations
Start Disk Group Blink
. . . . . . . . . . . . . . . 214
Start Disk Group Defragment
. . . . . . . . . . 213
. . . . . . . . . . . . 214
. . . . . 206
. . . . . 207
. . . . 212
. . . . 212
. . . . . 212
10 Contents
Start Enclosure Blink . . . . . . . . . . . . . . . . 215
Start iSCSI DHCP Refresh
Start Physical Disk Blink
Start Physical Disk Initialize
Start Physical Disk Reconstruction
Start Storage Array Blink
Start Virtual Disk Initialization
Stop Disk Group Blink
Stop Enclosure Blink
Stop iSCSI Session
. . . . . . . . . . . . . . . . . 218
Stop Physical Disk Blink
Stop Snapshot
. . . . . . . . . . . . . . . . . . . 219
Stop Storage Array Blink
. . . . . . . . . . . . . 215
. . . . . . . . . . . . . . 216
. . . . . . . . . . . . 216
. . . . . . . . 217
. . . . . . . . . . . . . 217
. . . . . . . . . . . 217
. . . . . . . . . . . . . . . 218
. . . . . . . . . . . . . . . . 218
. . . . . . . . . . . . . . 219
. . . . . . . . . . . . . . 220
Stop Storage Array Physical Disk Firmware Download
Stop Virtual Disk Copy
. . . . . . . . . . . . . . . . . . . . . 220
. . . . . . . . . . . . . . . 220
A Sample Script Files . . . . . . . . . . . . . . . . 223
Configuration Script Example 1 . . . . . . . . . . . . . 223
Configuration Script Example 2
. . . . . . . . . . . . . 226
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Contents 11
12 Contents
About the Command Line Interface
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 multiple storage arrays. For additional information, see the hardware and software manuals that shipped with your system.
describes the
NOTE: Always check for updates on support.dell.com and read the updates first
because they often supersede information in other documents.
Storage Manager software that is used to create and manage
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 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.
®
Windows® command
About the Command Line Interface 13
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
Storage array identifier
Parameters
Script commands
SMcli
14 About the Command Line Interface
The following syntax is the general form of a CLI command:
SMcli
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
script-commands One or more script commands or the name of a script file
storageArray parameters script-commands;
command
containing script commands
The script commands are the storage array configuration commands. "About the Script Commands" on page 29 presents an overview of the script commands. "Script Commands" on page 105 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.
About the Command Line Interface 15
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.
Table 1-1. Command Name Conventions
Parameter Definition
a|b
italicized-words terminals
pipe symbol indicating alternative ("a" or "b")
[...] (square brackets) zero or one occurrence {...} (curly brackets) zero or more occurrences <...> (angle brackets) occurrence exceeds maximum limit of 30 characters (a|b|c)
bold terminals
SMcli
address
[-n [-o
SMcli [
host-name-or-IP-address
[-n [-o
host-name-or-IP-address [host-name-or-IP-
] [-c
"command; {command2 storage-array-name outputfile
host-name-or-IP-address
storage-array-name outputfile
choose only one of the alternatives
][-p
] [-p
| -w
password
] [-f
| -w
password
WWID
][-e][-S]
scriptfile
WWID
] [-e] [-S]
};"] ]
]
]
16 About the Command Line Interface
SMcli (-n [-c " [-o
command
outputfile
storage-array-name
; {
command2
][-p
password
};"]
][-e][-S]
| -w
WWID
)
SMcli (-n [-f [-o
SMcli (-n [-o
SMcli -a email: [ [ [-n
-r ( [-I
SMcli -x email: [ [ [-n
-r ( SMcli (-a | -x) trap:
scriptfile outputfile
outputfile
host-name-or-IP-address1 host-name-or-IP-address2
storage-array-name host_sa information-to-include
host-name-or-IP-address1 host-name-or-IP-address2
storage-array-name host_sa
storage-array-name
] ] [-p
password
storage-array-name
][-p
password
email-address
| -w
|
direct_sa
)]
email-address
| -w
|
direct_sa
)] [-S]
community,
host-name-or-IP-address
host-name-or-IP-address2
[ [-n
-r (
storage-array-name host_sa
|
direct_sa
| -w
)] [-S]
| -w
] [-e] [-S] | -w
][-e][-S]
]]
WWID
][-q
]]
WWID
[
host-name-or-IP-address1
]]
WWID
WWID
WWID
| -h
)
)
host-name
frequency
| -h
| -h
host-name
host-name
][-S]
|
|
|
SMcli -d [-w][-i][-s][-v][-S] SMcli -m
[-g SMcli -A [
[ SMcli -X (-n
-h SMcli -?
contactInfoFile
host-name-or-IP-address
host-name
host-name-or-IP-address
-F
][-S]
host-name-or-IP-address
]] [-S]
storage-array-name
)
About the Command Line Interface 17
| -w
email-address
WWID
|
Command Line Parameters
Table 1-2. Command Line Parameters
Parameter Definition
host-name-or-IP-address 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
-n
management), you must use the 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 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
host-name-or-IP-address
parameter if more
of 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
host
name for the trap and the 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,
email-address
the the alert message.
is the email address to which to send
is the IP address or
18 About the Command Line Interface
Table 1-2. Command Line Parameters (continued)
Parameter Definition
-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.
About the Command Line Interface 19
Table 1-2. Command Line Parameters (continued)
Parameter Definition
-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
email.
profile
• in the email.
supportBundle
information is included in the email.
— Only event information is included in the
— Event and array profile information is included
— Event and support bundle
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.
20 About the Command Line Interface
Table 1-2. Command Line Parameters (continued)
Parameter Definition
-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 -c or -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.
-c
• The storage array password is specified by using the parameter and the
set session password=
password
command.
About the Command Line Interface 21
Table 1-2. Command Line Parameters (continued)
Parameter Definition
-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 -I parameter to eventOnly, the only valid argument for -q is everyEvent. If you set the -I parameter to either profile or supportBundle, this information is included with the emails with the frequency specified by the -q parameter.
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 -r parameter enables you to set or change the alert notifications for all storage arrays under each management station.
22 About the Command Line Interface
Table 1-2. Command Line Parameters (continued)
Parameter Definition
-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 -d parameter 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.
About the Command Line Interface 23
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 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:
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:
®
operating system. The following explains the use of quotation
-c "set storageArray userLabel=\"Engineering\";"
-c "set storageArray userLabel= \"\"Finance\"Array\";"
-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
24 About the Command Line Interface
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.
About the Command Line Interface 25
Table 1-3. Exit Status (continued)
Status Value Meaning
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 -f value in the email alert notification was specified.
26 About the Command Line Interface
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 -c parameter.
NOTE: See "Script Commands" on page 105 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.
Windows:
SMcli -n "Payroll_Array" -c "set storageArray userLabel=\"Finance_Array\";"
Linux:
SMcli -n ‘Payroll_Array’ -c ‘set storageArray userLabel="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.
Windows:
SMcli finance1 finance2 -c "set session password= \"TestArray\"; delete virtualDisk [\"Stocks_<_ Bonds\"]; create virtualDisk physicalDiskCount[3] raidLevel=5 capacity=10 GB userLabel=\"Finance\"; show storageArray healthStatus;"
Linux:
SMcli finance1 finance2 -c ‘set session password= "TestArray"; delete virtualDisk ["Stocks_<_Bonds"]; create virtualDisk
About the Command Line Interface 27
physicalDiskCount[3] raidLevel=5 capacity=10 GB userLabel="Finance"; show storageArray healthStatus;’
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.
SMcli -d -i
28 About the Command Line Interface
About the Script Commands
You can use the script commands to configure and manage a storage array. The script commands are distinct from the command line interface (CLI) commands; however, you enter the script commands using the command line interface. You can enter individual script commands, or run a file of script commands. When entering an individual script command, include it as part of a CLI command. When running a file of script commands, include the file name as part of a CLI command. The script commands are processed by a script engine that performs the following functions:
Verifies command syntax
Interprets the commands
Converts the commands to the appropriate protocol-compliant commands, which is, in turn, run by the RAID controller module
Passes the commands to the storage array
At the storage array, the redundant array of independent disks (RAID) controller modules in the storage array runs the script commands.
The script engine and script commands support the storage array configuration and management operations listed in Table 2-1.
Table 2-1. Configuration and Management Operations
Operation Activities
Virtual disk, disk group configuration
Physical disk configuration Configuring the hot spare
RAID controller module configuration
Creating, deleting, and setting priority; labeling; setting physical disk composition when creating virtual disks; setting segment size; and setting media scan control
Defining virtual disk ownership, changing mode settings, defining network settings, and setting host port IDs
About the Script Commands 29
Table 2-1. Configuration and Management Operations (continued)
Operation Activities
General storage array configuration
NVSRAM configuration Downloading and modifying the user configuration
Product identification Retrieving the enclosure profile display data
Battery management Setting the battery installation date
Firmware management Downloading RAID controller module, enclosure
Resetting a configuration to defaults, labeling, checking the health status, setting the time of day, clearing the Major Event Log, and setting the media scan rate
region at the bit and byte level, displaying nonvolatile static random access memory (NVSRAM) values
management module (EMM), and physical disk firmware
Script Command Structure
All script commands have the following structure:
command operand-data {statement-data}
where command identifies the action to be performed, operand-data represents the storage array component to configure or manage (such as a RAID controller module, physical disk, or disk group), and
statement-data is what you want to do to the component (such as, specifying the RAID level or availability of a disk group).
The general form of the syntax for
(
object-type | allobject-types
(
object-type [identifier
[
identifier
]} |
object-types [identifier-list
operand-data
| [
] {
object-type
is as follows:
qualifier
]
]))
An operand-data object can be identified four ways:
The object types and object qualifiers
all
•The
parameter
30 About the Script Commands
Loading...
+ 206 hidden pages