HP P4000 Command-Line Interface User Guide This guide provides information for using the command-line interface provided with the P4000 software. Command syntax is included, and a link to sample scripts available from the HP website.
Contents Overview............................................................................................................................... 5 Global Parameters...................................................................................................................6 Syntax................................................................................................................................... 7 Return Codes...............................................................................
deleteSyslogNotifyPolicy.............................................................................................. 40 deleteVirtualManager.................................................................................................. 41 deleteVolume.............................................................................................................. 41 disconnectLocalVolume.................................................................................................42 discoverTcp..........
setDnsInfo...................................................................................................................70 setEmailServerInfo....................................................................................................... 71 setGossipList............................................................................................................... 71 setLicenseKey..............................................................................................................
Overview The SAN/iQ command-line interface (CLI) is built upon the SAN/iQ API released with version 8.x. Develop your own automation, scripting and management using the CLI. • For instructions about using the CLI, see the Syntax section, immediately following this introduction. • The section on Global Parameters describes functionality that applies to the entire CLI and includes commands to customize global operations.
Global Parameters prompt= Some potentially destructive commands prompt before proceeding. This default behavior can be turned off by specifying "prompt=false". output= In the default case, the CLI returns information to standard output, formatted in a way that's easy to read rather than easy to parse. The XML setting returns all output information as an XML document, allowing easier parsing of the result.
Syntax CLIQ is the command-line interface (CLI) for the HP P4000 Storage Solution. The CLI specifies parameters in the form parameter= (specification), rather than dictating a particular order (positional) notation. Parameter ordering Ordering of parameters is not specified. Any order will do. For example: cliq deleteVolume volumeName=theVolume userName=user passWord=secret login=10.1.2.3 is equivalent to cliq deleteVolume login=10.1.2.
• GB - gigabytes (2^30) • TB - terabytes (2^40) There is no default for size units - the units must be specified. These are defined as International System of Units (SI) for file storage (popular use). Some values may be specified as either a size or percentage, for example, reserveQuota. The units will determine how this is interpreted.
Key Meaning RIGHT Moves the cursor one space to the right. BACKSPACE Deletes the character under the cursor and moves the cursor to the left. DELETE Deletes the character under the cursor. UP Recalls the previous command entered. DOWN Recalls the first command entered. HOME Moves the cursor to the beginning of the line. END Moves the cursor to the end of the line. ESCAPE Clears the current command line. INSERT Toggles between insert mode (the default) and overwrite mode.
Return Codes All GAUChE commands return an XML response containing a 32-bit result code, and a description of the result. Example: Success results are nonnegative values, while negative values indicate an error. Many errors returned by SAN/iQ and Hydra unfortunately do not return ordinal values that can be conveniently mapped into an API and CLI return code.
Result Value OS Status Description ignored as it is not applicable. CliqUnexpected 0x80001001 128 An unexpected error has occurred. CliqXmlError 0x80001002 129 The XML given is not well-formed. CliqParameterFormat 0x80001003 130 The parameter is not specified correctly. CliqParameterRepeat 0x80001004 131 A parameter is repeated. CliqMissingMethod 0x80001005 132 The command method is missing. CliqMissingParameter 0x80001006 133 One or more expected parameters are missing.
Result Value OS Status Description CliqObjectNotFound 0x80001013 146 Object not found. CliqConnectionFailure 0x80001014 147 Failed to connect to the API server. CliqNotEnoughSpace 0x80001015 148 Not enough space to complete the command. CliqNoManager 0x80001016 149 Could not find a manager. CliqSocketError 0x80001017 150 Network socket error. CliqOperationTimedOut 0x80001018 151 Operation exceeded the specified timeout.
Result Value OS Status Description CliqFileError 0x80001022 161 General file error. CliqMissingInitiator 0x80001023 162 No iSCSI initiator found. CliqInitiatorStopped 0x80001024 163 The iSCSI initiator is not running. CliqSanIqTooOld 0x80001025 164 The version of SAN/iQ software must be upgraded. CliqDefaultAdmin 0x80001026 165 You cannot delete, modify permissions, or remove the last user from the default administration group.
Result Value OS Status Description managed snapshots, there must be only one application server associated with the volume. CliqNoVssCapabilities 0x8000102B 170 Cannot create an applicationmanaged snapshot because the server does not support this capability. CliqServerUnresponsive 0x8000102C 171 Cannot create an applicationmanaged snapshot because the system could not communicate to the necessary software component on the application server.
Result Value OS Status Description CliqServerInCluster 0x80001035 180 Server is in Cluster and cannot be changed via CliQ. CliqVolumeError 0x80001036 181 Volume error. CliqVolumeNoServer 0x80001037 182 Failed to contact Application Aware Snapshot Manager. CliqUnsupportedApplication0x80001038 183 This application is not supported. CliqServerVersionMismatch0x80001039 184 Server version is not compatible. CliqSnapshotNameExists 0x8000103A 185 The snapshot with this name already exists.
Commands addVirtualManager This command adds a virtual manager to a group. Availability: Windows, SAN/iQ Version: 8.
Example cliq assignVolume volumeName=TheVolume initiator=iqn.1991-05.com.microsoft:w-gregorio.corp.hp.com login=10.0.1.2 userName=admin passWord=secret cliq assignVolume volumeName=TheVolume initiator=iqn.1991-05.com.microsoft:w-gregorio.corp.hp.com assignVolumeChap This command assigns a volume to a server. This assignment sets the access to a volume, using CHAP authentication. Availability: Windows, SAN/iQ Version: 8.
login userName passWord keyFile Required Required Required Required volumeName serverName accessRights Required Required Optional The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The name of the volume The name of the server The access rights to the volume: r - read-only, x - no access, rw - read-write (def
Example cliq cancelRemoteSnapshot snapshotName=TheSnapshot login=10.0.1.2 userName=admin passWord=secret cliq cancelRemoteSnapshot snapshotName=TheSnapshot clearAlertsPolicy This command clears the Alerts and Events Policy information Availability: Windows, SAN/iQ Version: 9.
Request Syntax cliq clearDnsInfo login= userName= passWord= login userName passWord keyFile Required Required Required Required The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) Example cliq clearDnsInfo login=10.0.1.
Example cliq clearSnmpNotifyPolicy login=10.0.1.3 userName=admin passWord=secret cliq clearSnmpNotifyPolicy clearSnmpServiceInfo This command clears the SNMP Server Info. Availability: Windows, SAN/iQ Version: 9.
Version: 8.
cliq connectVolume volumeName= login= userName= passWord= login userName passWord keyFile Required Required Required Required volumeName Required The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The name of the volume Example cliq connectVolume volumeName=MyVolume login=10.1.2.
keyFile Required adminGroupName description adminUserName permissions Required Optional Optional Optional The encrypted key file (this is specified instead of the username and password parameters) The administrative group name Optional description Specifies the users that this group comprises Permissions for the group. This is a character sequence specifying the allowable permissions in the following order: Group,Network,Storage System,Report.
createCluster This command creates a cluster in a management group. Availability: Windows, SAN/iQ Version: 8.
alertOnInformation Optional alertOnWarning Optional alertOnCritical emailLocale Optional Optional 0 - the log does not includes informational events (default), 1 - the log includes informational events 0 - the log does not includes warning events (default), 1 - the log includes warning events 0 - the log does not includes critical events (default), 1 - the log includes critical events English (default), Chinese, Japanese, Korean Example cliq createEmailNotifyPolicy login=10.0.1.
Example cliq createKey login=10.0.1.2 userName=admin passWord=secret keyFile=c:\secret.key createRemoteAssociation This command creates a remote group-to-primary group association. This association is done automatically when a remote snapshot is created, so this command is not usually needed. Availability: Windows, SAN/iQ Version: 8.
login userName passWord keyFile Required Required Required Required remote remoteUserName remotePassWord remoteKeyFile Required Required Required Required primarySnapshot remoteCluster remoteVolume remoteSnapshot description primaryBandwidth Required Required Required Required Optional Optional remoteBandwidth Optional The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (t
chapName Optional targetSecret initiatorSecret Optional Optional The CHAP name for the volume. If this is not specified, the IQN of the local server is used (this parameter is required if run on a storage system). The CHAP target secret for the volume. The CHAP initiator secret for the volume. Example cliq createServer serverName=TheServer useChap=0 initiator=iqn.1991-05.com.microsoft:wgregorio.corp.lefthandnetworks.com login=10.0.1.
passWord keyFile Required Required volumeName snapshotName description inheritAccess Required Required Optional Optional managed Optional wait Optional The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The name of the volume The name of the remote snapshot Optional description 0 - the snapshot will not inherit the volume list, authentication group, ACL relationships of the original volume (default)1 - the snapshot will inhe
remotePassWord remoteKeyFile Optional Optional remoteCluster remoteVolume remoteretentioncount Optional Optional Optional remoteretentionseconds Optional managed Optional The password for the remote group The encrypted key file for the remote group (this is specified instead of the remoteusername and remotepassword parameters) The name of the remote cluster to host the remote volume The name of the remote volume to host the snapshot The number of remote snapshots to maintain.
createSnmpTrapTarget This command creates an SNMP Trap Target. The Community String must be the same for all Trap Targets. If no Trap Targets exists, the Community String is used, otherwise it is ignored and the Community String of existing Trap Targets is used. Availability: Windows, SAN/iQ Version: 9.
alertOnWarning Optional alertOnCritical Optional 0 - the log does not includes warning events (default), 1 - the log includes warning events 0 - the log does not includes critical events (default), 1 - the log includes critical events Example cliq createSyslogNotifyPolicy login=10.0.1.3 userName=admin passWord=secret ipAddress="10.0.10.25" alertOnCritical="1" cliq createSyslogNotifyPolicy ipAddress="10.0.10.
Example cliq createVolume volumeName=MyVolume clusterName=TheCluster size=100GB description="Exchange DB-1" login=10.0.1.2;10.0.1.3 username=admin password=secret cliq createVolume volumeName=MyVolume clusterName=TheCluster size=100GB description="Exchange DB-1" deleteAdminGroup This command deletes an administrative group. Availability: Windows, SAN/iQ Version: 8.
Example cliq deleteAdminUser login=10.0.1.3 userName=admin passWord=secret adminUserName=user cliq deleteAdminUser adminUserName=user deleteCluster This command deletes a cluster. All storage systems are removed. Availability: Windows, SAN/iQ Version: 8.
Example cliq deleteEmailNotifyPolicy emailAddress=myemail@myhost.com login=10.1.2.3 userName=admin passWord=secret cliq deleteEmailNotifyPolicy emailAddress=myemail@myhost.com deleteGroup This command deletes a management group. All storage systems are removed. Availability: Windows, SAN/iQ Version: 8.
Example cliq deleteRemoteAssociation login=10.0.1.2 userName=admin passWord=secret remote=10.0.1.3 remoteUserName=admin remotePassWord=secret cliq deleteRemoteAssociation remote=10.0.1.3 remoteUserName=admin remotePassWord=secret deleteServer This command deletes a Server. Availability: Windows, SAN/iQ Version: 9.
Example cliq deleteSite siteName=Headquarters login=10.1.2.3 userName=admin passWord=secret cliq deleteSite siteName=Headquarters deleteSnapshot This command deletes a snapshot. Availability: Windows, SAN/iQ Version: 8.
Example cliq deleteSnapshotSchedule scheduleName="Exchange Backup" login=10.1.2.3 userName=admin passWord=secret cliq deleteSnapshotSchedule scheduleName="Exchange Backup" deleteSnapshotTempSpace This command deletes the snapshot temporary space. Availability: Windows, SAN/iQ Version: 8.
Example cliq deleteSnmpCommunityString ipAddress=10.0.10.25 login=10.1.2.3 userName=admin passWord=secret cliq deleteSnmpCommunityString ipAddress=10.0.10.25 deleteSnmpTrapTarget This command deletes an SNMP Trap Target. Availability: Windows, SAN/iQ Version: 9.
Example cliq deleteSyslogNotifyPolicy ipAddress=10.10.10.25 login=10.1.2.3 userName=admin passWord=secret cliq deleteSyslogNotifyPolicy ipAddress=10.10.10.25 deleteVirtualManager This command deletes a virtual manager from a group. Availability: Windows, SAN/iQ Version: 8.
disconnectLocalVolume This command disconnects a SAN volume from the host. Availability: Windows Version: 8.0 Request Syntax cliq disconnectLocalVolume volumeName= volumeName Required The name of the volume Example cliq disconnectLocalVolume volumeName=z: discoverTcp This command discovers storage systems and management groups on the network, using TCP. Availability: Windows, SAN/iQ Version: 8.
groupOrder receivePort waitForData Optional Optional Optional Return storage systems ordered by group membership. This can be one of: 0 - default, 1 The TCP port to receive the discovery packets (defaults to an unused port if unspecified) The number of milliseconds to wait for the discovery packets (defaults to 3000 if unspecified) Example cliq discoverUdp ipMask=255.255.240.0 ipSubnet=10.0.0.0 login=10.0.1.2 userName=admin passWord=secret cliq discoverUdp ipMask=255.255.240.0 ipSubnet=10.0.0.
Example cliq getClusterInfo clusterName=Cluster0 login=10.1.2.3 userName=admin passWord=secret cliq getClusterInfo clusterName=Cluster0 getDnsInfo This command gets the DNS settings. Availability: Windows, SAN/iQ Version: 9.
system Optional source user Optional Optional System filter. This can be one or more of: System, Controller, Cache, Disk, Boot, Backplane, Fan, Temperature, Voltage, PowerSupply, RAID Source filter, source name The name of the administrative user Example cliq getEventLog login=10.1.2.
Example cliq getLocalVolumes getNotificationPolicy This command returns information about the Alerts and Events Policy, Email Notification Policy, Syslog Notification Policy, and Email Server Setting. Availability: Windows, SAN/iQ Version: 9.
getNsmLogs This command gathers all log files from a storage system and stores the archive locally. Availability: Windows Version: 8.
getRemoteSnapshotInfo This command returns information about remote snapshots. Availability: Windows, SAN/iQ Version: 8.
Version: 8.5 Request Syntax cliq getServerCapabilities login= userName= passWord= login userName passWord keyFile Required Required Required Required serverIp Optional The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The Windows server IP address. Example cliq getServerCapabilities login=10.0.1.
serverIp jobId Required Optional The Windows server IP address.
getServerVolumeInfo This command returns the features of a volume by interrogating a remote server. This will return VSS associated volumes. Availability: Windows, SAN/iQ Version: 8.
getSnapshotInfo This command returns information about a snapshot. Availability: Windows, SAN/iQ Version: 8.
getSnmpInfo This command returns information about the SNMP Service and Targets. Availability: Windows, SAN/iQ Version: 9.
Version: 8.0 Request Syntax cliq getSystemInfo Example cliq getSystemInfo cliq getSystemInfo getVolumeInfo This command returns information about a volume. Availability: Windows, SAN/iQ Version: 8.
Example cliq help command=getSystemInfo cliq help command=getSystemInfo makePrimary This command promotes a remote volume to a primary production volume. Availability: Windows, SAN/iQ Version: 8.
Example cliq makePrimary login=10.1.2.3 userName=admin passWord=secret volumeName="TheVolume" snapshotName="TheSnapshot" cliq makePrimary volumeName="TheVolume" snapshotName="TheSnapshot" modifyAdminGroup This command modifies an administrative group. Availability: Windows, SAN/iQ Version: 8.
userName passWord keyFile Required Required Required adminUserName description adminPassWord Required Optional Optional The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) Specifies the users that this group comprises Optional description The password for the administrative user Example cliq modifyAdminUser login=10.0.1.
modifyEmailNotifyPolicy This command modifies an Email Notification Policy. Availability: Windows, SAN/iQ Version: 9.
contactName postalAddress postalAddress2 cityName stateName countryName postalCode telephoneNumber emailAddress Optional Optional Optional Optional Optional Optional Optional Optional Optional Contact name Postal address line 1 Postal address line 2 Postal city Postal state Postal country Postal code Contact telephone number The notification email. Example cliq modifyGroup login=10.0.1.2 userName=admin passWord=secret node=10.0.1.2;10.0.1.3 cliq modifyGroup node=10.0.1.2;10.0.1.
modifyRemoteSnapshotSchedule This command modifies a previously created remote snapshot schedule. Availability: Windows, SAN/iQ Version: 9.
chapName Optional targetSecret initiatorSecret Optional Optional The CHAP name for the volume. If this is not specified, the IQN of the local server is used (this parameter is required if run on a storage system). The CHAP target secret for the volume. The CHAP initiator secret for the volume. Example cliq modifyServer serverName=TheServer useChap=0 initiator=iqn.1991-05.com.microsoft:wgregorio.corp.lefthandnetworks.com login=10.0.1.
userName passWord keyFile Required Required Required snapshotName description scratchQuota Required Optional Optional The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The name of the remote snapshot Optional description The scratch quota for the volume, as a percentage or size - this is the size guaranteed to be available for snapshots of this volume, regardless of space allo
Example cliq modifySnapshotSchedule scheduleName="TheSchedule" description="First snapshot schedule" login="10.0.1.2" userName="admin" passWord="secret" cliq modifySnapshotSchedule scheduleName="TheSchedule" description="First snapshot schedule" modifySnmpCommunityString This command modifies the Community String for all SNMP. Availability: Windows, SAN/iQ Version: 9.
Example cliq modifySnmpTrapTarget login=10.0.1.3 userName=admin passWord=secret ipAddress="10.0.10.25" versiony="2" cliq modifySnmpTrapTarget ipAddress="10.0.10.25" versiony="2" modifySyslogNotifyPolicy This command modifies a Syslog Notification Policy. Availability: Windows, SAN/iQ Version: 9.
keyFile Required volumeName description replication minReplication Required Optional Optional Optional parity Optional checkSum thinProvision Optional Optional initialQuota Optional reserveQuota Optional scratchQuota Optional stridePages autogrowSeconds Optional Optional clusterName size Optional Optional friendlyName Optional The encrypted key file (this is specified instead of the username and password parameters) The name of the volume Optional description The replication level for th
userName passWord keyFile Required Required Required clusterName volumeName size Required Required Required description replication minReplication Optional Optional Optional parity Optional checkSum thinProvision Optional Optional initialQuota Optional reserveQuota Optional scratchQuota Optional mountPoint Optional stridePages namePrefix Optional Optional vipLoadBalance Optional The authentication user name for the storage system The password for the storage system The encrypted key fi
passWord keyFile Required Required volumeName Required The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The name of the volume Example cliq rebalanceVip volumeName=MyVolume login=10.1.2.3 userName=admin passWord=secret cliq rebalanceVip volumeName=MyVolume recoverQuorum This command is used to rescue a management group after quorum has been irretrievably lost.
passWord keyFile Required Required snapshotName Required The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The name of the remote snapshot Example cliq removeSnapshot snapshotName=z: login=10.0.1.2 userName=admin passWord=secret removeVolume This command disconnects a SAN volume from the host, then deletes it. If the volume cannot be disconnected (because it's in use, or for any other reason), it will not be deleted.
Example cliq resetSession volumeName=MyVolume login=10.1.2.3 userName=admin passWord=secret cliq resetSession volumeName=MyVolume rollbackSnapshot This command rolls back a snapshot. WARNING: The rollbackSnapshot command will replace the original volume with a new one based on the contents of the snapshot and delete any snapshots created after the snapshot which is being rolled back. Availability: Windows, SAN/iQ Version: 8.
Example cliq runDiagnostic login=10.0.1.2 userName=admin passWord=secret diagnosticName=healthCheck cliq runDiagnostic diagnosticName=healthCheck setAlertsPolicy This command sets information for the Alerts and Events Policy. Availability: Windows, SAN/iQ Version: 9.
passWord keyFile Required Required ipAddress Required email domainname suffix server Required Optional Optional Optional The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) This is the address of a storage system to be configured, returned from a call to discoverOob The email address of the sender. The domain name. DNS suffixes. List of DNS servers, IP addresses. Example cliq setDnsInfo login=10.0.1.
Request Syntax cliq setGossipList login= userName= passWord= node= login userName passWord keyFile Required Required Required Required node Required The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The host names of the storage systems the cluster comprises Example cliq setGossipList login=10.0.1.
Request Syntax cliq setSnmpNotifyPolicy login= userName= passWord= verbosity= alertOnCritical= login userName passWord keyFile Required Required Required Required verbosity Optional severities alertOnInformation Optional Optional alertOnWarning Optional alertOnCritical Optional The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username
Version: 8.0 Request Syntax cliq shutdownGroup login= userName= passWord= login userName passWord keyFile Required Required Required Required The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) Example cliq shutdownGroup login=10.0.1.
userName passWord keyFile Required Required Required The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) Example cliq startManager login=10.0.1.2 userName=admin passWord=secret cliq startManager startSnmpService This command starts the SNMP Service. Availability: Windows, SAN/iQ Version: 9.
Example cliq startVirtualManager login=10.0.1.2 userName=admin passWord=secret cliq startVirtualManager stopManager This command stops the manager on a storage system. Availability: Windows, SAN/iQ Version: 8.
stopVirtualManager This command stops a virtual manager on a storage system. Availability: Windows, SAN/iQ Version: 8.
Request Syntax cliq unassignVolume volumeName= login= userName= passWord= login userName passWord keyFile Required Required Required Required volumeName Required The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The name of the volume Example cliq unassignVolume volumeName=TheVolume login=10.0.1.
login userName passWord keyFile Required Required Required Required run Optional The IP address or DNS-resolvable names of one or more storage systems The authentication user name for the storage system The password for the storage system The encrypted key file (this is specified instead of the username and password parameters) The utility and parameters to execute on the storage system - if this parameter is missing, a list of possible commands is returned Example cliq utility run=ping -c 10 10.3.2.
description Optional Optional description Example cliq vssSnapshot volumeName=y:;z: waitForEvent This command waits for an alert or event message. Availability: Windows, SAN/iQ Version: 9.