HP StorageWorks Replication Solutions Manager Command Line User Interface reference Part number: T3687-96029 Third edition: August 2005
Legal and notice information Copyright © 2004-2005 Hewlett-Packard Development Company, L.P. Hewlett-Packard Company makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . About this guide . . . . . Intended audience . . . . Prerequisites . . . . . . Related documentation . . Document conventions . . HP technical support . . . HP-authorized reseller Helpful web sites . . Providing feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Synopsis . . . . . Description . . . . Switches . . . . . ADD SNAPCLONE . . . Synopsis . . . . . Description . . . . Switches . . . . . ADD SNAPSHOT . . . Synopsis . . . . . Description . . . . Switches . . . . . CAPTURE CONFIG_DATA Synopsis . . . . . Description . . . . CAPTURE SYSTEM_DATA Synopsis . . . . . Description . . . . DELETE CONTAINER . . Synopsis . . . . . Description . . . . DELETE DR_GROUP . . Synopsis . . . . . Description . . . . Switches . . . . . Example . . . . . DELETE HOST_AGENT .
SELECT SYSTEM . . . . . . Synopsis . . . . . . . Description . . . . . . Switches . . . . . . . Example . . . . . . . SET CLIENT . . . . . . . . Synopsis . . . . . . . Description . . . . . . Switches . . . . . . . Examples . . . . . . Block text format . CSV format . . . Result code format Table text format . XML format . . . SET DR_GROUP . . . . . . Synopsis . . . . . . . Description . . . . . . Switches . . . . . . . Example . . . . . . . SET HOST_AGENT . . . . . Synopsis . . . . . . . Description . . .
Description . . . . Switches . . . . . SHOW JOBS . . . . . Synopsis . . . . . Description . . . . Switches . . . . . SHOW MANAGED_SET Synopsis . . . . . Description . . . . Switches . . . . . SHOW SERVER . . . . Synopsis . . . . . Description . . . . Example . . . . . SHOW SNAPCLONE . Synopsis . . . . . Description . . . . Switches . . . . . SHOW SNAPSHOT . . Synopsis . . . . . Description . . . . Switches . . . . . SHOW SYSTEM . . . . Synopsis . . . . . Description . . . . Switches . . . . . SHOW VDISK . .
Figures 1 Remote client syntax overview . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tables 1 Document conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Comparable BC 2.x EVMCL and RSM 1_x commands . . . . . . . . . . . . . . . . 3 RSM Return code values for all commands . . . . . . . . . . . . . . . . . . . . .
Preface About this guide This guide describes the HP StorageWorks Replication Solutions Manager Command Line User Interface. Topics include: • • • • Installation Configuration Access Commands Intended audience This reference is intended for network and storage administrators and HP-authorized service providers who use the HP Replication Solutions Manager Command Line User Interface.
Document conventions Table 1 Document conventions Convention Element Blue text: Figure 1 Cross-reference links and e-mail addresses Blue, underlined text: http://www.hp.com Web site addresses Bold font GUI elements that are clicked or selected, such as menu and list items, buttons, and check boxes.
• Subscribing to this service provides you with e-mail updates on the latest product enhancements, newest versions of drivers, and firmware documentation updates as well as instant access to numerous other product resources. • After signing up, you can quickly locate your products by selecting Business support and then Storage under Product Category. HP-authorized reseller For the name of your nearest HP-authorized reseller: • In the United States, call 1-800-282-6672.
Preface
1 Overview HP StorageWorks Replication Solutions Manager (called the replication manager) is a single, centralized management tool that simplifies and automates local and remote replication on supported storage arrays. The HP Replication Solutions Manager Command Line User Interface (CLUI) is installed with the replication manager and allows you to perform local and remote replication using single commands and scripts. This chapter explains how to access the CLUI.
Overview
2 Remote client The remote client is software that allows you to use the HP Replication Solutions Manager Command Line User Interface (CLUI) from any computer where the remote client is installed. This chapter describes how to install and use the remote client. Figure 1 is an overview of the remote client syntax.
• The remote client can be installed on any computer with a LAN connection to the replication manager. • The computer must be running an operating system and JRE version that is supported by the replication manager. See the HP StorageWorks EVA software compatibility reference. If a JRE is not installed, the remote client will not run. • Simultaneous access to the replication manager and its connected resources can impact performance.
Logon On the remote computer, open a command line window. Enter the remote client command: clui –u admin –p nimda –h server16.corp.net:9001 The remote client copyright appears. The command prompt (>) indicates that the CLUI is running. C:\mydir> clui –u admin –p nimda –h server16:9001 Command Line User Interface (C) Copyright 2004-2005 Hewlett-Packard Development Company, L.P. > Display a list of storage arrays Display the list of storage arrays that are interacting with the replication manager.
C:\mydir> clui –u admin –p nimda –h server16:9001 “show system list” 0 Success ArrayA1 ArrayA2 ArrayA3 C:\mydir> Single command session example — batch file This example shows how to use the remote client to run a single-command session by running a batch file or script. The session displays the names of the storage arrays that the replication manager is interacting with.
C:\mydir> clui –u admin –p nimda –h server16:9001 -f report_rsm.txt 0 Success RSM_Version 1.2.157 User: admin@server16 on server16/22.999.44.9 CLUI Framework Version 1.2.2 0 Success ArrayA1 ArrayA2 ArrayA3 C:\mydir> Note that you can include the remote client file-driven command in a batch file or script, rather than typing it on a command line. Generating a security key A security key eliminates the need for a user to enter the -u user name, -p password, and -h host switches with each command.
Remote client switches -? help Displays CLUI-client help in the command line window. Cannot be used with other switches. During an interactive session, use the help command. -b block mode Specifies that responses be in block text. Block text is the default. -c CSV mode Specifies that responses be in comma-separated values. -f file name Specifies the full path and file name of the text file to be used for a file-driven session.
3 CLUI commands This chapter describes the commands in the HP Replication Solutions Manager Command Line User Interface. ADD CONTAINER Synopsis a[dd] cont[ainer] {{s[ize]={size(gb)}} |{disk_g[roup]|dg={disk group name}} |[vraid_level|vrl={raid0|raid1|raid5}]} |{{vd[isk]={vdisk name}} |[disk_g[roup]|dg=]} Description Use the ADD CONTAINER command to create an empty virtual disk container that cannot be presented to a host.
Description The ADD DR_GROUP command creates a data replication group. Switches dr_group name destination_system vdisk accessmode comment destination_disk_group destination_vdisk_name destination_vraid_level failsafe log_disk_group nofailsafe nosuspend suspend writemode Specifies the name of the DR group you are creating. Required. Specifies the array where the replicated destination virtual disks are created. There is no default value. Required.
ADD HOST_AGENT Synopsis a[dd] host_a[gent]|ha Description The ADD HOST_AGENT command adds a host agent. Switches host agent name Specifies the name of the new host agent. Example add host_agent newhost ADD MANAGED_SET Synopsis a[dd] managed[_set]|ms|mset {dr_group|drg |host_a[gent]|ha |host_v[olume]|hv |s[torage_system]|ss |vd[isk]} Description The ADD MANAGED_SET command creates a managed set.
[[diskg[roup]dg=] |[redundancy_level|rl={same|raid0|raid1|raid5}]] Description Use the ADD SNAPCLONE command to create a local replica of the specified virtual disk. Switches snapclone name vdisk nowait wait diskgroup redundancy_level Specifies the name of the snapclone. Specifies the name of the source virtual disk. Creates the snapclone without waiting for normalization to complete. Waits for the snapclone to normalize before returning to the prompt. This is the default.
CAPTURE CONFIG_DATA Synopsis c[apture] c[onfig_data]|cfg Description The CAPTURE CONFIG_DATA command captures configuration data from the selected array. The displayed information can be used to recreate the array in the event of a failure. Jobs are not included in the configuration data. A scripting language is needed in conjunction with the command to view the data.
delete Deletes the virtual disks in the destination DR group. If you do not include this switch, the virtual disks in the destination DR group are retained (detached). Example de drg 5tt444 delete DELETE HOST_AGENT Synopsis de[lete] host_a[gent]|ha Description The DELETE HOST_AGENT command deletes the host agent. Switches host agent name Specifies the name of the host agent you want to delete.
Description The DELETE MANAGED_SET command deletes the specified managed set. DELETE SNAPCLONE Synopsis del[ete] snapc[lone] Description The DELETE SNAPCLONE command deletes the specified snapclone. DELETE SNAPSHOT Synopsis del[ete] snaps[hot] Description The DELETE SNAPSHOT command deletes the specified snapshot. EXIT Synopsis exit Description The EXIT command ends and exits the command line interface.
Description The LOGIN command authenticates the user for the current management session. Switches username password Required. Specifies the user name to authenticate. Required. Specifies the password for the username. SELECT HOST_AGENT Synopsis sel[ect] host[_agent] Description The SELECT HOST_AGENT command selects the host agent. Switches host agent Specifies the name of the host agent you are selecting.
Description The SET CLIENT command specifies the result format for the CLUI client. The client can receive the results of a command as block text, CSV, result code, table text, or XML. Switches result_format Specifies the result format. The options include block_text, csv, result_code, table_text, and xml. Examples Block text format NY>show ms full 0 Success Name........:manset1 Type........:VirtualDisk Comment.....: Date Created 6/14/04 4:39 PM Member Count: 0 Name........:manset2 Type........
Name Type Date created Member Count manset1VirtualDisk 6/14/04 4:39 PM 0
manset2 Cnnection 6/14/04 4:39 PM 0
SET DR_GROUP Synopsis set dr[_group]|drg [acc[essmode]|am={none|noread|readonly}] [autos[uspend]] [com[ment]=
comment delete failover failsafe force_full_copy home max_log_disk_size name noautosuspend nofailsafe nosuspend refresh remove_vdisk suspend suspend_and_failover writemode destination_vdisk_name destination_vraid_level automatically creates the destination virtual disk in the destination storage array. When you add a virtual disk, you can specify two additional switches: destination_disk_group and destination_vdisk_name. Adds a comment to the DR group.
SET HOST_AGENT Synopsis set host_a[gent]|ha} [com[ment]]= [mount_v[olume]|mv=] [re[scan] [refresh] [ru[n]=] {mount_p[oint]|mp={mount point}} [unmount_v[olume]|uv=] Description The SET HOST_AGENT command modifies the properties of the host agent. Switches host agent name comment mount_volume rescan run mount_point unmount_volume Specifies the name of the host agent you want to modify. Adds a comment to the host agent.
abort continue description enable_schedule name pause run mode nowait wait Stops the job operation. Resumes the job instance. Changes the job's description. Enables the job schedule using the supplied scheduleid. Changes the name of the job. Pauses the job instance. Runs the job. Sets the run mode for the selected job. Use this switch with the run switch to set the run mode to normal, validate, or skip validation. The default value is normal. Launches the job without waiting for a job to complete.
suspend Suspends replication on all members in the managed set. SET SYSTEM Synopsis set sys[tem] {[refresh] |[refresh_all]} Description The SET SYSTEM command displays the properties of the storage array. Switches system name refresh refresh_all Specifies the name of the array. Refreshes the data for the array. If the name is omitted, the selected array will be refreshed. Refreshes all of the array data for the entire replication server.
instant_restore Provides a disk name to perform a synchronize operation. The disk provided in this set command will be synchronized with the disk named with the instant_restore switch. SET CONTAINER Synopsis set cont[ainer] [pre[allocated_snapclone_vdisk]|psvd=] [refresh] Description Use the SET CONTAINER command to modify the container's properties. Switches container name preallocated_snapclone_vdisk refresh Specifies the name of the container.
SHOW DR_GROUP Synopsis sho[w] dr[_group]|drg [f[ull]] [l[ist]] [m[embers]] [refresh] Description The SHOW DR_GROUP command displays the properties of the DR group. Switches dr_group name full list members refresh Specifies the name of the DR group. Use this switch instead of the DR group name to show the properties of all data replication groups in the array. Lists only the names of the DR groups displayed. The software does not display detailed information.
hbas Lists the host bus adapters on the host rather than the default volume information. Shows information for the specified host volume on the host. Shows host volumes for the specified host. Displays the names of the host agents without detailed information. Shows information for the specified mount point on the host. Shows the mount points on the host instead of the default volume information.
Switches job name events full instances list schedule tasks Specifies the job for which to display information. Displays the job instance event status information. Shows details about all of the jobs. If you use this switch, you do not have to specify the job name. Shows instance information for each job run. Displays only the names of the jobs without detailed information. Displays the job schedule information. Displays the complete listing of the job task steps.
User: admin@server16 on server16/22.999.44.9 CLUI Framework Version 1.2.2 > SHOW SNAPCLONE Synopsis sho[w] snapc[lone] [f[ull] [l[ist]] [man[aged_set_member]|ms_member|msm] [perf[ormance]] [pres[entation]] [refresh] [repl[ication]] Description Use the SHOW SNAPCLONE command to display information regarding the array's virtual disks. It returns results identical to that of the SHOW DISK switch.
Switches snapshot name full list managed_set_member performance presentation refresh replication Specifies the name of the snapshot. Shows the details of all snapshots. Shows the names of the snapshot without detailed information. If full or the snapshot name is excluded, list is the default. Displays the managed sets each snapshot is a member of. Displays the performance properties of the snapshot. Displays the presentation properties of the snapshot.
Description The SHOW VDISK command shows the selected array's properties. Switches vdisk name full list managed_set_member performance presentation refresh replication Specifies the virtual disk for which to display information. If you use full instead of the Vdisk name, the interface shows all of the virtual disks. Displays the names of the virtual disks without the detailed information. If full or the virtual disk name is excluded, list is the default.
CLUI commands
A XML command response format The XML command response object creates the XML response. The command response can contain multiple tables, rows, heading columns, and row columns. The heading columns are similar to tag/value pairs. For every column in the heading, you should include a column in each row. This will allow CSV and other output formats to properly format the data. Here is a sample:
XML command response format
B User-written client You can create a user-written client to access the CLUI. If you create a client, it must provide user authentication and issue valid commands. You can use Perl, Java, or other programming languages to create a client. You can use the standard telnet configured port (9000 by default) to connect with a standard socket connection, using the login command as the initial command. The SSL is accessed via an anonymous SSL socket using the same login method.
sub readResponse { my $resp = ""; $line = ""; while((index($line,">")<0) and (index($line,"Thank you for using")<0) ){ $line = $telnet->get; $resp = $resp . $line; } return $resp; } sub stripLine{ $telnet->getline; } sub usage { print "\n\n\*************************************************************************\n\n"; print "Use: clui_telnet_sample.
$sock->print($cmd .
$port = $ARGV[1]; $username = $ARGV[2]; $passwd = $ARGV[3]; $cmd = $ARGV[4]; if(!($sock = IO::Socket::SSL->new( PeerAddr => $hostname, PeerPort => $port, Proto => 'tcp', SSL_use_cert => 0, ))) { warn "unable to create socket: ", &IO::Socket::SSL::errstr, \n"; exit(1); } print $sock "LOGIN USERNAME=$username PASSWORD=$passwd\r\n"; #read login handshake and disgard readResponse(); print $sock "sel sys LA"; readResponse(); print $sock "sel man cueball"; readResponse(); #Send command passed in via arg $sock->
C BC 2.x EVMCL to RSM 1.x job-related commands BC 2.x EVMCL full syntax evmcl [/output=Filename.ext][/i] RSM 1.
Comparable BC 2.x EVMCL and RSM 1_x commands Table 2 Comparable BC 2.x EVMCL and RSM 1_x commands BC 2.x EVMCL commands RSM 1.x CLUI commands RSM 1.
Index A ADD CONTAINER, 21 ADD DR_GROUP, 21 ADD HOST_AGENT, 23 ADD MANAGED_SET, 23 ADD SNAPCLONE, 23 ADD SNAPSHOT, 24 audience, 9 authorized reseller HP, 11 C CAPTURE CONFIG_DATA, 25 CAPTURE SYSTEM_DATA, 25 conventions document, 10 text symbols, 10 D DELETE CONTAINER, 25 DELETE DR_GROUP, 25 DELETE HOST_AGENT, 26 DELETE JOB, 26 DELETE MANAGED_SET, 26 DELETE SNAPCLONE, 27 DELETE SNAPSHOT, 27 DELETE VDISK, 26 document conventions, 10 knowledge prerequisites, 9 E EXIT, 27 H HELP, 27 help obtaining, 10 H