SANtricity Storage Manager Command Line Interface And Script Commands

Transcription

SANtricity Storage ManagerCommand Line Interface andScript CommandsQuick Reference for Version 9.10ES1437-0-E1, First Edition

Proprietary Rights NoticeThis document contains proprietary information of Engenio Information Technologies,Inc. The information contained herein is not to be used by or disclosed to third partieswithout the express written permission of an officer of Engenio. Any product(s) describedherein is/are a licensed product of Engenio.Document DescriptionDocument ES1437-0-1, First Edition. July 2004This document provides a quick reference for the command line interface and scriptcommand software for SANtricity Storage Manager version 9.10, and will remain theofficial reference source for all revisions and releases of this product until rescinded by anupdate.DisclaimerIt is the policy of Engenio Information Technologies to improve products as newtechnology, components, software, and firmware become available. Engenio reserves theright to make changes to any products herein at any time without notice. All features,functions, and operations described herein may not be marketed by Engenio in all parts ofthe world. In some instances, photographs and figures are of equipment prototypes.Therefore, before using this document, consult your Engenio representative forinformation that is applicable and current. ENGENIO DOES NOT ASSUME ANYRESPONSIBILITY OR LIABILITY FOR THE USE OF ANY PRODUCT(S)DESCRIBED HEREIN EXCEPT AS EXPRESSLY AGREED TO IN WRITING BYENGENIO.License RestrictionThe purchase or use of an Engenio product does not convey a license under any patent,copyright, trademark, or other intellectual property right of Engenio or third parties.Copyright Notice 2004. Engenio Information Technologies, Inc. All rights reserved.Trademark AcknowledgmentsEngenio, the Engenio design, and HotScale are trademarks, and SANtricity StorageManager and SANshare are registered trademarks of Engenio Information Technologies,Inc. All other brand and product names may be trademarks of their respective companies.

ConventionsThe following conventions have been used throughout this book.Definitions of Safety NoticesDANGER indicates an imminently hazardous situation that will result in death or severe personalinjury.WARNING indicates a potentially hazardous situation that could result in death or severe personalinjury.CAUTION indicates a potentially hazardous situation that could result in moderate or minorpersonal injury.Definitions of Informational NoticesCAUTION indicates a potentially hazardous situation that could result in data loss (or otherinterruption) or equipment damage.IMPORTANT indicates information or criteria that is necessary to perform a procedure correctly.NOTE indicates a concept that will be clarified or a maintenance tip that will be presented.Revision RecordEdition or RevisionFirst EditionDateJuly 2004Affected Pages or RemarksNew Book.Part Number: ES1437-0-E1SANtricity Storage Manager CLI Quick Reference for Version 9.10i

iiSANtricity Storage Manager CLI Quick Reference for Version 9.10

ContentsCOMMAND LINE INTERFACE AND SCRIPT COMMANDS QUICK REFERENCEAbout the Command Line Interface . 2How to Use the Command Line Interface . 2Usage Notes . 3CLI Commands . 3Command Line Parameters . 5Exit Status . 8CLI Command Formatting . 9Usage Examples . 10About the Script Commands . 12Script Command Structure . 12Recurring Syntax Elements . 13Usage Guidelines . 16Adding Comments to a Script File . 17Script Command Formatting . 18Script Commands . 20Commands Listed by Function . 40Controller Commands . 40Host Topology Commands . 40Physical Disk (Drive) Commands . 41Remote Volume Mirror Commands . 41Session Command . 41Snapshot Commands . 42Storage Array Commands . 42Tray Commands . 43Uncategorized Command . 43Volume Commands . 43Volume Copy Commands . 44Volume Group Commands . 44SANtricity Storage Manager CLI Quick Reference for Version 9.10iii

ivSANtricity Storage Manager CLI Quick Reference for Version 9.10

List of TablesCOMMAND LINE INTERFACE AND SCRIPT COMMAND QUICK REFERENCETable 1. Command Name Conventions . 3Table 2. Command Line Parameters . 5Table 3. Object Types and Identifiers . 13Table 4. Recurring Syntax Elements . 13Table 5. Script Commands . 20SANtricity Storage Manager CLI Quick Reference for Version 9.10v

viSANtricity Storage Manager CLI Quick Reference for Version 9.10

About This BookThis book is a quick reference that lists the command line interface commands and thescript engine commands for SANtricity Storage Manager 9.10. It provides a briefoverview of the command line interface and script commands, lists the commands for thecommand line interface, lists the commands for the script engine, provides commandsyntax and briefly describes the purpose of each script command. This book assumes thatthe user has a knowledge of basic storage area network (SAN) hardware and installationskills. Read the SANtricity Storage Manager Product Release Notes for any updatedinformation regarding hardware, software, or firmware products that may not be coveredin this document.Intended ReadersThis book is intended for system operators, system administrators, and service personnelwho are responsible for operating, maintaining, troubleshooting, and servicing a storagearray. Users must be familiar with computer system operation, maintenance, and repair. Inaddition, they should understand disk array, RAID, network and Fibre Channeltechnologies. The reader must have a basic knowledge of SAN hardware functionality(controllers, drives, hosts) and SAN cabling techniques; and must understand disk array,Redundant Array of Independent Disks (RAID), network, and Fibre Channel technologiesRelated PublicationsCommand Line Interface and Script Commands Programming GuideWeb AddressFor web sites related to the products in this publication, please see the Product ReleaseNotes.SANtricity Storage Manager CLI Quick Reference for Version 9.10ix

xSANtricity Storage Manager CLI Quick Reference for Version 9.10

.Command Line Interface and ScriptCommands Quick ReferenceThe command line interface and script commands provide a tool set that enables users toconfigure and maintain a storage array directly from an operating system command line.This quick reference provides A brief description of the command line interface. A list of the commands and parameters for the command line interface (CLIcommands). An overview of the script commands. An explanation of the command formatting. A table that alphabetically lists the script commands and provides a description ofthe purpose of each command. A functional list of the commands, in which the commands are organized byoperational utility in the storage array.This quick reference is intended to help you rapidly find the correct syntax and parametersfor commands you are using. It is not intended to be a complete programming guide. Thisquick reference is for users who have read and understood the information in theCommand Line Interface and Script Commands Programming Guide. If you havequestions related to the commands or parameters listed in this quick reference, refer to theprogramming guide for additional information.SANtricity Storage Manager CLI Quick Reference for Version 9.101

Command Line Interface and Script Commands Quick Reference. . . . . . . . . . . . . . . . . . . . . . . . . .About the Command Line InterfaceThe command line interface is a software tool that enables storage array installers,developers, and engineers to configure and monitor storage arrays. Using the commandline interface, you can issue commands from an operating system prompt, such as theDOS C:\ prompt, a Linux path, or a Solaris path. Each command performs a specificaction for managing a storage array or returning information about the status of a storagearray. You can enter individual commands or you can run script files when you need toperform operations more than once (such as installing the same configuration on severalstorage arrays). The command line interface enables you to load a script file from a diskand run the script file. The command line interface provides a way to run storagemanagement commands on more than one network storage array. You can employ thecommand line interface in both installation sites and development environments.The command line interface gives you direct access to a script engine that is a utility in theSANtricity storage management software. The script engine runs commands that enableyou to configure and manage storage arrays. The script engine reads the commands, orruns a script file, from the command line and performs the operations instructed by thecommands.How to Use the Command Line InterfaceThe commands you run on the command line interface (CLI commands) provide access tothe script engine, specify the storage array to receive the script commands, and setoperation environment parameters.A CLI command consists of the following elements: The term SMcli Storage array identifier Parameters Script commandsThe general form of a CLI command is:SMcli host parameters script-commands;SMcli invokes the command line interface, storage array is the name or IP address of thestorage array, parameters are CLI parameters that define the environment and purposefor the command, and script command is one or more script commands or the name of ascript file containing script commands. (The script commands are the storage arrayconfiguration commands.)2SANtricity Storage Manager CLI Quick Reference for Version 9.10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the Command Line InterfaceUsage NotesIf you enter SMcli and a storage array name, but do not specify CLI parameters, scriptcommands, or a script file, the command line interface runs in interactive mode.Interactive mode enables you to run individual commands without prefixing thecommands with SMcli. In interactive mode you can enter a single command, see theresults, and enter the next command without typing the complete SMcli string. Interactivemode is useful for determining configuration errors and quickly testing configurationchanges.If you enter SMcli without any parameters or with an incorrect parameter, the scriptengine returns usage information.CLI CommandsThis section lists the CLI commands you can use to identify storage arrays, specifypasswords, add storage arrays to configuration files, specify communications parameters,enter individual script configuration commands, or specify a file containing scriptconfiguration commands. Table 1 lists the conventions used in the general form of the CLIcommand.Table 1Command Name ConventionsConventionDefinitiona balternative (“a” or “b”)italicized-wordsterminals[.] (square brackets)zero or one occurrence{.} (curly braces)zero or more occurrences(a b c)choose only one of the alternativesboldterminalsThe general forms of the CLI commands, showing the parameters and terminals used ineach command, are listed below. Table 2 on page 5 lists definitions for the parametersshown in the general form of the CLI commands.SMcli host-name-or-IP-address [host-name-or-IP-address][-c“command; {command2;}”][-n storage-array-name -w WWN][-ooutputfile][-p password][-e][-S]SMcli host-name-or-IP-address [host-name-or-IP-address][-fscriptfile][-n storage-array-name -w WWN][-ooutputfile][-p password][-e][-S]SMcli -n storage-array-name -w WWN [-c “command;SANtricity Storage Manager CLI Quick Reference for Version 9.103

Command Line Interface and Script Commands Quick Reference. . . . . . . . . . . . . . . . . . . . . . . . . .{command2;}”][-o outputfile][-p password][-e][-S]SMcli -n storage-array-name -w WWN [-f scriptfile][-ooutputfile][-p password][-e][-S]SMcli -n storage-array-name -w WWN [-o outputfile][-ppassword][-e][-S]SMcli (-a -x) email:email-address [-n storage-array-name -w WWN -h host-name -r (inband sa outofband sa)][-S]SMcli (-a -x) email:email-address n storage-array-name -w WWN -h host-name -r (inband sa outofband sa)][-S]SMcli (-a -x) trap:community,host-name-or-IP-address [-nstorage-array-name -w WWN -h host-name -r (inband sa outofband sa)][-S]SMcli (-a -x) trap:community,host-name-or-IP-address hostname-or-IP-address [host-name-or-IP-address][-n storagearray-name -w WWN -h host-name -r (inband sa outofband sa)][-S]SMcli -d [-w][-i][-s][-v][-S]SMcli -m host-name-IP-address -F email-address [-S]SMcli -A [host-name-or-IP-address [host-name-or-IP-address]][-S]SMcli -X (-n storage-array-name -w WWN -h host-name)SMcli -?4SANtricity Storage Manager CLI Quick Reference for Version 9.10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the Command Line InterfaceCommand Line ParametersTable 2 Command Line ParametersParameterDefinitionhostname or IP addressYou can specify either the host name or the IP address(xxx.xx.xx.xx) of an in-band managed storage array or an out-ofband managed storage array.1.2.3.4.If you are managing a storage array using a host through inband storage management, you must use the -n or -wparameter if more than one storage array is connected to thehost.If you are managing a storage array using out-of-band storagemanagement through the ethernet connection on eachcontroller, you must specify the host-name-or-IP-address ofthe controllers.If you have previously configured a storage array in theEMW, you can specify the storage array by its user-suppliedname using the -n parameter.If you have previously configured a storage array in theEMW, you can specify the storage array by its world widename using the -w parameter.-AUse this parameter to add a storage array to the configuration files.If you do not follow the -A parameter with a host-name-or-IPaddress, auto-discovery scans the local subnet for storage arrays.-aUse this parameter to add an SNMP trap destination or an emailaddress alert destination. -cWhen adding an SNMP trap destination, the SNMPcommunity is automatically defined as the community namefor the trap and the host is the IP address or DNS host nameof the system to which the trap should be sent.When adding an email address for an alert destination theemail-address is the email address where you want the alertmessage to be sent.Use this parameter to indicate you are entering one or more scriptcommands to run on the specified storage array. Each commandmust be terminated by a semicolon (;).You cannot place more than one -c parameter on the samecommand line. You can include more than one script commandafter the -c parameter.SANtricity Storage Manager CLI Quick Reference for Version 9.105

Command Line Interface and Script Commands Quick Reference. . . . . . . . . . . . . . . . . . . . . . . . . .ParameterDefinition-dUse this parameter to display the contents of the scriptconfiguration file. The format of the file contents is:storage-Array-name host-name1 host-name-2-eUse this parameter to run the commands without performing asyntax check first.-fUse this parameter to specify a file name containing scriptcommands you want to run on the specified storage array. (Thisparameter is similar to the -c parameter in that both are intendedfor running script commands. The -c parameter runs individualscript commands. The -f parameter runs a file of scriptcommands.)By default, any errors encountered when running the scriptcommands in a file are ignored, and the file continues to run. Tooverride this behavior use the set sessionerrorAction stop command in the script file.-FUse this parameter to specify the email address from which allalerts will be sent.-hUse this parameter to specify the host name that is running theSNMP agent to which the storage array is connected. Use thisparameter with the -a and -x parameters.-iUse this parameter to display the IP address of the known storagearrays. Use this parameter with the -d parameter. The format ofthe file content is:storage-Array-name IP-address-1 IPaddress-2-m6Use this parameter to specify the host name or IP address of theemail server from which email alert notifications will be sent.SANtricity Storage Manager CLI Quick Reference for Version 9.10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the Command Line InterfaceParameterDefinition-nUse this parameter to specify the name of the storage array onwhich you want to run the script commands. This name is optionalwhen you use a “host-name” or “IP address;” however, if you areusing the in-band method for managing the storage array, you mustuse the -n parameter if more than one storage array is connected tothe host at the specified address.The storage array name is required when the host-name or IPaddress is not used; however, the name of the storage arrayconfigured for use in the EMW (that is, listed in the configurationfile) must not be a duplicate name of any other configured storagearray.-oUse this parameter with the -c or -f parameters to specify a filename for all output text that is a result of running the scriptcommands. If you do not specify an output file, the output text willgo to stdout. All output from commands that are not scriptcommands is sent to stdout, regardless of whether this parameter isor is not set.-pUse this parameter to specify the password for the storage array onwhich you want to run commands. A password is not necessaryunder the following conditions:1.2.3.-rA password has not been set on the storage array.The password is specified in a script file you are running.You specify the password using the -c parameter and theset session password string-literalcommand.Use this parameter with the -a or -x parameters to specify thename of an organizer node. The name of an organizer node can beeither outofband sa (out-of-band storage array organizer node) orinband sa (in-band storage arrays organizer node). The -rparameter enables you to set or change the alert notifications for allstorage arrays under each organizer node.SANtricity Storage Manager CLI Quick Reference for Version 9.107

Command Line Interface and Script Commands Quick Reference. . . . . . . . . . . . . . . . . . . . . . . . . .ParameterDefinition-SUse this parameter to suppress informational messages describingcommand 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.-sUse this parameter with the -d parameter to display the alertsettings in the configuration file.-vUse this parameter with the -d parameter to display the currentglobal status of the known devices in a configuration file.-wUse this parameter to specify the world wide name (WWN) of thestorage array. This parameter is an alternate to the -n parameter.Use the -w parameter with the -d parameter of display the WWNsof the known storage arrays. The format of the file content is:storage-Array-name world-wide-name IPaddress-1 IP-address-2-XUse this parameter to delete a storage array from a configuration.-xUse this parameter to remove an SNMP trap destination or andemail address alert destination. The community is the SNMPcommunity name for the trap and the host is the IP address or DNShost name of the system to which you want the trap sent.-?Use this parameter to display usage information about the CLIcommands.Exit StatusAfter you run a CLI command or CLI and script command, status indicating the success ofthe operation defined by the command is displayed. The status are:0 - terminated without error.1 - terminated with error. Information about the error is also displayed.8SANtricity Storage Manager CLI Quick Reference for Version 9.10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CLI Command FormattingCLI Command FormattingA double quote symbol (“) used as part of a name or label requires special considerationwhen running CLI and script commands under a Windows operating system. Thefollowing bullet items explain how to use double quotes in names while running under aWindows operating system. When double quotes are part of a name or argument, you must insert a backslash (\)before each double quote character. For example:-c “set storageArray userLabel \”Engineering\”;”where Engineering is the storage array name. A second example is:-n “\”My”\” Array”where “My” Array is the name of the storage array. You cannot use the double quote character (“) as part of a character string (alsocalled string literal) within a script command. For example, you cannot enter thefollowing string to set the storage array name to “Finance” Array:-c “set storageArray userLabel \”\”Finance\”Array\”;”In a UNIX operating system the delimiter around names or labels are single quotes. TheUNIX versions of the previous examples are:-c ‘set storageArray userLabel ”Engineering”;’-n ‘”My” Array’Because the backslash character (\) is used with double quotes in a Windows operatingsystem, the backslash requires special consideration when used as part of a name or label. Use the backslash character (\) as typed, unless you want to use it immediatelybefore a double quote character (“). Use three backslashes before the double quotecharacter to have the backslash printed when you use the -n, -o, -f, or -pparameters. For example, to specify a storage array named Array\, enter:-n “Array\\\” To use a backslash character (\) as part of a string literal within a script command, thesame rules as in the previous bullet item apply except that you need to use fivebackslashes. For example, to change the name of a storage array to Array, enter thefollowing string:-c “set storageArray userLabel ”Array\\\\\”;”A Windows operating system requires that you insert a caret ( ) before each special scriptcharacter. Special characters are , &, , , SANtricity Storage Manager CLI Quick Reference for Version 9.109

Command Line Interface and Script Commands Quick Reference. . . . . . . . . . . . . . . . . . . . . . . . . . Insert a caret before each special script character when used with the -n, -o, -f,and -p parameters. For example, to specify storage array CLI&CLIENT enter thefollowing string:-n “CLI &CLIENT” Insert three carets ( ) before each special script character when used within ascript command string literal. For example, to change the name of a storage array toFINANCE&PAYROLL, enter the following string:-c “set storageArray userLabel \”FINANCE &PAYROLL\”;”Usage ExamplesThe following examples show how to enter CLI commands on a command line. Theexamples show the syntax, form, and, in some examples, script commands. Examples areshown for both Windows and UNIX systems. Note that the usage for the -c parametervaries depending on your operating system. On Windows operating systems, the scriptcommand following the -c must be enclosed in double quotation marks (“). On UNIXsystems, the script command following the-c must be enclosed in single quotation marks(‘).1.This example shows how to delete an existing volume and create a new volume on astorage array. The existing volume name is Stocks & Bonds. The new volume namewill be Finance. The controller host names are finance1 and finance2. The storagearray is protected, requiring the password TestArray.Windows operating system:SMcli finance1 finance2 -c “set sessionpassword \”TestArray\”; delete volume[\”Stock &Bonds\”]; create volume driveCount[3] RAIDLEVEL 3capacity 10GB userLabel \”Finance\”; show storageArrayhealthStatus;”UNIX operating system:SMcli finance1 finance2 -c ‘set sessionpassword ”TestArray”; delete volume[”Stock & Bonds”];create volume driveCount[3] RAIDLEVEL 3 capacity 10GBuserLabel ”Finance”; show storageArray healthStatus;’2.This example shows how to run commands in a script file named scriptfile.scr on astorage array named Example. In this example the storage array is protected by thepassword My Array. Output, as a result of commands in the script file, will go to fileoutput.txt.Windows operating system:SMcli -n Example -f scriptfile.scr -p “My Array” -o10SANtricity Storage Manager CLI Quick Reference for Version 9.10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CLI Command Formattingoutput.txtUNIX operating system:SMcli -n Example -f scriptfile.scr -p ‘My Array’ -ooutput.txtSANtricity Storage Manager CLI Quick Reference for Version 9.1011

Command Line Interface and Script Commands Quick Reference. . . . . . . . . . . . . . . . . . . . . . . . . .About the Script CommandsYou can use the script commands to configure and manage a storage array. The scriptcommands are distinct from the CLI commands; however, you enter the script commandsusing the command line interface. You can enter individual script commands or you canrun a file of script commands. When you enter an individual script command, you includeit as part of a CLI command. When you run a file of script commands, you include the filename as part of a CLI command. The script commands are processed by a script enginethat: Verifies command syntax Interprets the commands Converts the commands to the appropriate protocol-compliant commands Passes the commands to the storage arrayAt the storage array, the script commands are run by the storage array controllers.Script Command StructureAll script commands have the following structure:command operand-data { statement-data }where command identifies the action to be performed, operand-data represents the objectsassociated with a storage array you want to configure or manage, and statement-dataprovides the information needed to perform the command.The syntax for operand-data is:(object-type allobject-types [qualifier] (object-type[identifier] {object-type identifier]} object-types[identifier-list]))An object can be identified four ways: object type, all parameter, square brackets, or a listof identifiers. Use an object type when the command is not referencing a specific object.The all parameter means all objects of the specified type in the storage array (for example,allVolumes). To perform a command on a specific object, use square brackets toidentify the object (for example, volume[engineering]). Specify a subset of objects with alist of identifiers in square brackets (for example, volumes[sales engineering marketing]).A qualifier is

SANtricity Storage Manager CLI Quick Reference for Version 9.10 ix About This Book This book is a quick reference that lists the command line interface commands and the