HP StorageWorks Replication Solutions Manager 4.0.1 job command reference

Page 1
HP StorageWorks Replication Solutions Manager 4.0.1
job command reference
Part number: T3680-96306
ourth edition: June 2008
F
Page 2
Legal and notice information
Condential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and
12.212, Commercial Computer Soft ware, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license.
The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
Microsoft, Windows, Windows XP, and Windows NT are U.S. registered trademarks of Microsoft Corporation.
Oracle is a registered US trademark of Oracle Corporation, Redwood City, California.
Linux is a U.S. registered trademark of Linus Torvalds.
UNIX is a registered trademark of The Open Group.
04.10.2008
Page 3
Contents
About this reference ......................... 9
Intendedaudience...................................... 9
Relateddocumentation.................................... 9
Documentconventionsandsymbols ............................. 10
HPtechnicalsupport.................................... 10
Subscriptionservice ..................................... 11
HPwebsites......................................... 11
Documentationfeedback ................................... 11
Productfeedback ...................................... 11
1Jobconcepts,templatesandcommands ............... 13
Jobconcepts ....................................... 13
Joblanguageoverview................................. 13
Jobs,templates,andcommands............................. 13
Jobinstances ..................................... 14
Abortedjobinstances ................................. 15
Arguments ...................................... 15
Argumentlists..................................... 15
Assignments(variables)................................. 15
Branches....................................... 16
Commands...................................... 16
Commandresultvalues................................. 17
Comments ...................................... 22
E-mailfromjobs.................................... 22
Exits......................................... 22
Implicitjobs...................................... 22
Implicitjobstartup................................... 22
Importedjobs..................................... 22
Jobcommandslist................................... 23
Jobtemplateslist ................................... 30
Labels ........................................ 31
Pauseandcontinue .................................. 31
ResourcenamesandUNCformats............................ 31
Simultaneousjobinstances ............................... 33
Statusandstates.................................... 34
Transactions ..................................... 34
Validation ...................................... 35
Wait/nowaitargument................................. 36
Jobtemplates....................................... 37
Emptytemplate .................................... 37
Fracturehostvolumes,mounttoahost(template)...................... 37
Instantrestorestoragevolumestootherstoragevolumes(template) .............. 39
Mountexistingstoragevolumes(template)......................... 41
Performcascadedreplication(template).......................... 42
Performplannedfailover(template)............................ 46
Performunplannedfailover(template)........................... 48
Replicate (via snapclone) a host volume multiple times, mount to a host (template) . . . . . . . . 49
Replicatehostdiskdevices,mounttoahost(template).................... 52
Replicatehostvolumegroup,mountcomponentstoahost(template) ............. 53
Replicatehostvolumegroup,mountentiregrouptoahost(template) ............. 56
Replicatehostvolumes(template)............................. 58
HP StorageWorks Replication Solutions Manager 4 .0.1
3
Page 4
Replicatehostvolumes,mounttoahost(template) ..................... 59
Replicatehostvolumes,mounttoahost,thentoadifferenthost(template) ........... 62
Replicate host volumes via preallocated replication, mount to a host (template) . . . . . . . . . 64
Replicatehostvolume,mountcomponentstoahost(template) ................ 66
Replicaterawstoragevolumesmount(raw)toahost(template)................ 68
Replicatestoragevolumes(template) ........................... 69
Replicatestoragevolumesviapreallocatedreplication(template)............... 71
ReplicateOracletablespaces(template).......................... 73
ReplicateOracletablespaces,mounttoahost(template) .................. 74
Replicate Oracle tablespaces via preallocatted replication, mount to a host (template) . . . . . . 76
RestoreOracletablespaces(template)........................... 79
SetupContinuousAccess(remotereplicationtemplate) ................... 80
ThrottlereplicationI/O(remotereplicationtemplate) .................... 82
Unmountanddeleteexistinghostvolumes(template) .................... 83
Unmountexistinghostvolumes(template) ......................... 84
Jobcommands ...................................... 85
//(comment)..................................... 85
AddAllOracleTablespacesToRepository .......................... 85
AddDrGroupMember ................................. 86
AddOracleArchiveLogFilesToRepository .......................... 87
AddOracleTablespacesToRepository ........................... 87
AddReplicaToReplicaRepository ............................. 88
AddReplicasToReplicaRepository............................. 88
CombineLists ..................................... 89
ConvertStorageVolumeIntoContainer ........................... 89
ConvertStorageVolumesInManagedSetIntoContainers .................... 90
ConvertStorageVolumesIntoContainers .......................... 90
ConvertStorageVolumesIntoContainersUsingRepository.................... 91
CreateContainer.................................... 91
CreateContainerForHostDiskDevice............................ 92
CreateContainersForHostVolume............................. 93
CreateContainersForHostVolumeGroup .......................... 93
CreateDiskDevice ................................... 94
CreateDrGroup .................................... 95
CreateDrGroupFromHostVolume............................. 96
CreateHostVolume................................... 98
CreateHostVolumeDiscrete ............................... 99
CreateHostVolumeFromDiskDevices............................ 100
CreateHostVolumeGroup ................................ 101
CreateHostVolumesUsingRepository ........................... 102
CreateOracleRepository ................................ 103
CreateRestoredHostVolumesUsingRepository........................ 103
CreateReplicaRepository ................................ 104
CreateStorageVolume ................................. 105
DeleteContainer.................................... 106
DeleteDrGroup .................................... 106
DeleteDrGroupMember................................. 107
DeleteHostVolume ................................... 107
DeleteHostVolumeGroup ................................ 108
DeleteHostVolumesUsingRepository............................ 109
DeleteOracleRepository................................. 110
DeleteReplicaRepository ................................ 110
DeleteStorageVolume.................................. 110
DeleteStorageVolumes ................................. 111
DeleteStorageVolumesInManagedSet........................... 111
DeleteStorageVolumesUsingRepository .......................... 112
DetachMirrorclones .................................. 112
DiscoverDiskDevice .................................. 113
DiscoverDiskDevices .................................. 113
DiscoverDiskDevicesForDrGroup............................. 114
4
Page 5
DiscoveryRefresh(obsolete) ............................... 115
Exit ......................................... 115
Export........................................ 116
FailoverDrGroup.................................... 116
FailoverDrGroups ................................... 117
FlushCache...................................... 117
ForceFullCopyDrGroup................................. 118
FractureHostDiskDeviceMirrorclone............................ 119
FractureHostVolumeGroupMirrorclones .......................... 119
FractureHostVolumeMirrorclones............................. 120
FractureMirrorclones .................................. 121
Import........................................ 121
InstantRestoreFromMirror ................................ 122
InstantRestoreFromSnapshot............................... 123
Launch........................................ 123
LaunchJob ...................................... 124
Log ......................................... 125
MirrorcloneHostDiskDeviceToContainer .......................... 125
MirrorcloneHostDiskDeviceToContainerInManagedSet.................... 126
MirrorcloneHostVolumeGroupToContainers ........................ 127
MirrorcloneHostVolumeGroupToContainersInManagedSet .................. 128
MirrorcloneHostVolumeToContainers ........................... 129
MirrorcloneHostVolumeToContainersInManagedSet..................... 130
MirrorcloneStorageVolumeToContainer .......................... 131
MountEntireVolumeGroup................................ 132
MountHostVolume................................... 133
MountHostVolumesUsingRepository............................ 133
MountVolumeGroupComponent ............................. 134
Pause ........................................ 135
PresentStorageVolume ................................. 135
PresentStorageVolumes................................. 136
RemoveDiskDevice................................... 137
ResyncMirrorclone................................... 137
ResyncMirrorclones................................... 138
RetainLatestRoundRobinReplicasForHostStorageVolume ................... 138
RetainLatestRoundRobinReplicasForHostVolume....................... 139
RetainLatestRoundRobinReplicasForHostVolumeGroup.................... 140
SendEmail ...................................... 141
SetDiskGroupForSnapclone ............................... 141
SetDrGroupAutoSuspend................................ 142
SetDrGroupComments ................................. 142
SetDrGroupDestinationAccess.............................. 143
SetDrGroupFailsafe .................................. 143
SetDrGroupFailsafeOnLinkDownPowerUp ......................... 144
SetDrGroupHome ................................... 144
SetDrGroupIoMode .................................. 145
SetDrGroupMaxLogSize ................................ 145
SetDrGroupName................................... 146
SetDrGroupSuspend.................................. 146
SetHostDiskDeviceWriteCacheMode ........................... 147
SetHostVolumeGroupWriteCacheMode.......................... 148
SetHostVolumeWriteCacheMode............................. 149
SetHostVolumesWriteCacheMode ............................ 151
SetListVariable..................................... 151
SetMountPointsPrexInRepository............................. 152
SetNoticationPolicy.................................. 153
SetOracleModeUsingRepository............................. 154
SetStorageVolumeName ................................ 154
SetStorageVolumeWriteCacheMode ........................... 155
SetStorageVolumesWriteCacheMode ........................... 155
HP StorageWorks Replication Solutions Manager 4 .0.1
5
Page 6
SetVariable...................................... 156
SetWriteCacheModesUsingRepository .......................... 156
SnapcloneDiskDevice.................................. 157
SnapcloneHostDiskDeviceToContainerInManagedSet .................... 158
SnapcloneHostVolume ................................. 159
SnapcloneHostVolumeGroup .............................. 160
SnapcloneHostVolumeGroupToContainersInManagedSet................... 161
SnapcloneHostVolumeToContainers............................ 162
SnapcloneHostVolumeToContainersInManagedSet ..................... 163
SnapcloneOracleToContainersUsingRepository....................... 164
SnapcloneOracleUsingRepository ............................ 165
SnapcloneStorageVolume................................ 166
SnapcloneStorageVolumeToContainer........................... 167
SnapcloneStorageVolumesToContainers.......................... 167
SnapshotDiskDevice .................................. 168
SnapshotHostDiskDeviceToContainerInManagedSet..................... 169
SnapshotHostVolume.................................. 170
SnapshotHostVolumeGroup............................... 171
SnapshotHostVolumeGroupToContainersInManagedSet ................... 172
SnapshotHostVolumeToContainers ............................ 173
SnapshotHostVolumeToContainersInManagedSet...................... 174
SnapshotOracleToContainersUsingRepository ....................... 175
SnapshotOracleUsingRepository............................. 176
SnapshotStorageVolume ................................ 177
SnapshotStorageVolumeToContainer ........................... 177
SnapshotStorageVolumesToContainers .......................... 178
SwitchOracleArchiveLogFilesUsingRepository........................ 179
TestJobState...................................... 179
UnmountEntireVolumeGroup............................... 180
UnmountHostVolume.................................. 181
UnmountHostVolumes ................................. 181
UnmountHostVolumesUsingRepository........................... 182
UnpresentStorageVolume ................................ 183
UnpresentStorageVolumes................................ 183
ValidateHost ..................................... 184
ValidateHostVolume .................................. 184
ValidateHostVolumeDoesNotExist ............................ 185
ValidateHostVolumeGroup ............................... 186
ValidateHostVolumeMirrorclones............................. 186
ValidateOracleDatabase ................................ 187
ValidateOracleTablespaces ............................... 188
ValidateSnapcloneHostVolume.............................. 188
ValidateSnapcloneHostVolumeGroup........................... 189
ValidateSnapcloneStorageVolume ............................ 190
ValidateSnapshotHostVolume .............................. 190
ValidateSnapshotHostVolumeGroup ........................... 191
ValidateSnapshotStorageVolume............................. 192
ValidateStorageSystem ................................. 192
ValidateStorageVolume................................. 193
ValidateStorageVolumes ................................ 193
Wait......................................... 194
WaitDrGroupNormalization............................... 194
WaitDrGroupSynchronizationTransition .......................... 195
WaitForHostDiskDeviceWriteCacheFlush.......................... 195
WaitForHostVolumeGroupWriteCacheFlush ........................ 196
WaitForHostVolumeWriteCacheFlush ........................... 196
WaitForHostVolumesWriteCacheFlush........................... 197
WaitForJob...................................... 198
WaitForStorageVolumeDiscovery............................. 199
WaitForStorageVolumesDiscovery ............................ 199
6
Page 7
WaitForStorageVolumeWriteCacheFlush.......................... 200
WaitForStorageVolumesWriteCacheFlush ......................... 200
WaitForWriteCacheFlushUsingRepository ......................... 201
WaitHostDiskDeviceNormalization............................ 201
WaitHostVolumeNormalization ............................. 202
WaitStorageVolumeNormalization ............................ 202
WaitStorageVolumesNormalization............................ 203
WaitUntil....................................... 203
WaitVolumeGroupNormalization............................. 204
Index .............................. 207
HP StorageWorks Replication Solutions Manager 4 .0.1
7
Page 8
Tables
1
Documentconventions.............................. 10
8
Page 9
About this reference
This document is a quick reference for job commands and job templates that are provided with HP StorageWorks Replication Solutions Manager (the replication manager). For additional information regarding replication manager concepts and troubleshooting, see the HP StorageWorks Replication Solutions Manager online help and HP StorageWorks Replication Solutions Manager user guide.
Intended audience
This reference is intended for HP StorageWorks Replication Solutions Manager operators and administrato
Related documentation
To nd the following documents, browse to the Manuals page of the HP Business Support Center web site:
ttp://www.hp.com/support/manuals. In the Storage section, click Storage soft ware and then select
h
the product.
rs.
Replication
HP StorageWorks Replication Solutions Manager online h elp
HP StorageW
HP StorageWorks Replication Solutions Manager job command reference
HP StorageWorks Replication Solutions Manager command line user interface reference
HP Storage
HP StorageWorks Replication Solutions Manager installation guide
Other
HP StorageWorks EVA replication software consolidated release notes
HP StorageWorks EVA software compatibility reference
HP StorageWorks Comma nd View EVA license key installation instructions
HP StorageWorks Business Copy EVA administrator guide
H P StorageWorks Continuous Access EVA administrator guide
Solutions Manager
orks Replication Solutions Manager user guide
Works Replication Solutions Manager administrator guide
HP StorageWorks Replication Solutions Manager 4 .0.1
9
Page 10
Document conven
Table 1 Document conventions
tions and symbols
Convention
Blue text: Table 1
Blue, underlined text: http://www.hp.com
Bold text
Italic text Text emphasis
Monospace text
Monospa
Monospace, bold text
ce, italic text
Element
Cross-reference links and e-mail addresses
website addresses
Keys th at are p
Text typed in
GUI elements
menu and lis
File and directory names
System output
Code
Commands, their arguments, and argument values
Code variables
Command variables
Emphasized monospace text
ressed
to a GUI element, such as a box
that are clicked or selected, such as
t items, buttons, tabs, and check boxes
CAUTION:
Indicates that failure to follow directions could result in damage to equipment or data.
IMPORTANT:
Provides clarifying information or specic instructions.
NOTE:
Provides additional information.
TIP:
Provides helpful hints and shortcuts.
HP technical support
For worldwide technical support information, see the HP support website:
ttp://www.hp.com/support
h
Before contacting HP, collect the following information:
Product model names and numbers
Technical support registration number (if applicable)
Product serial numbers
Error messages
Operating system t ype and revision level
10
About this reference
Page 11
Detailed questions
Subscription s
HP recommends t
h
ttp://www.hp
After register rmware updat
ervice
hat you register your product at the Subscriber’s Choice for Business website:
.com/go/e-updates
ing, you will receive e-mail notication of product enhancements, new driver versions,
es, and other product resources.
HP websites
For additional information, see the following HP websites:
•h
ttp://www.hp.com
•http://www.hp.com/go/storage
•http://www.hp.com/service_locator
•http://www.hp.com/support/manuals
•http://www.hp.com/support/downloads
Documentation feedback
HP welcomes
To make comments and suggestions about product documentation, please send a message to
storagedocsFeedback@hp.com. All submissions become the property of HP.
your feedback.
Product feedback
To make comments and suggestions about HP Replication Solutions Manager, HP Business Copy EVA, or HP Continuous Access EVA, please send a message to EVAReplication@hp.com.
HP StorageWorks Replication Solutions Manager 4 .0.1
11
Page 12
12
About this reference
Page 13
1 Job concepts, templates and commands
Job concepts
Job language overview
The job language provides a simple and structured way to automate replication and other storage related tasks. A typical job consists of commands, assignments (variables), branching instructions, labels, comments and exits. Jobs with launch commands often include transactions. See also imported jobs.
Click the lin
ks below for information.
Line
Task
comment >
1
// Replicate storage volumes.
2
//
command >
branch >
transaction start >
assignme
transaction end >
nt >
exit >
label >
3
ValidateStorageSystem (%array_name%)
...
Launch ( %source_host%, %suspend_command_line%, "", WAIT, "0" )
9
onerror pauseat E1:
10 DO {
$Rep1 = SnapshotStorageVolume ( %array_name_source_storvol_unc1%,
11
FULLY_ALLOCATED,SAME,%dest_storvol1%,NOWAIT)onerrorpauseatE1:
12
//
13 } A LW AYS {
14
// Resume the host ap plication.
15
Launch ( %source_host%, %resume_command_line%, "", WAIT, "0" )
}
16
...
27 Exit (SUCCESS)
28
//
29
// Failure exit - no rollback needed.
30
E1:Exit(FAILURE)
...
Jobs, templates, and commands
You can create, save, run, schedule, and manage jobs that automate replication tasks.
HP StorageWorks Replication Solutions Manager 4 .0.1
13
Page 14
Job editor
Use the repl
ication manager’s specialized job editor to create and edit jobs.
Job templates
Job templates allow you to quickly create typical jobs, for example, making local or remote copies of virtual disks. See job templates list.
Job commands
You ca
nalsocreatecustomjobsfromthesetofspecializedjobcommands.Seejob commands list.
Job instances
When a job is running or has been run, it is called a job instance. Job instances are displayed in the Jobs Run History tab.
The format of a job-instance name is the job name, plus a sequence number. For example, the job named daily_backup when run two times would have job instance names of daily_backup-1 and daily_backup-2.
14
Job concepts, templates and commands
Page 15
Aborted job instances
In some cases, a job instance may not stop when it is aborted. This can happen if the instance is hung while executing a command to a low level device.
When the replic
ation manager server is stopped and restarted, all aborted job instances are cancelled.
Arguments
Most job commands include arguments. When a command is initially entered in a job, default values may appear in command arguments. In some cases, there are no defaults and you must specify a value. Required arguments are denoted by % characters. In the following example,%stor_unc_name% indicates that a value must be entered for the UNC name of the storage volume.
SnapcloneStorageVolume ( %storvol_unc_name%,"",SAME,"",WAIT)
See resource names and UNC format.
Argument lists
In some commands an argument list can be specied.Anargumentlistconsistsofindividualresource names, sepa
For example, a list of storage volumes (virtual disks):
("\\Array2\Cats", "\\Array2\Dogs", "\\Array3\Cars")
rated by commas, and enclosed in parenthesis.
^ required argument
Assignments (variables)
The Editing Task window allows you to create assignments (variables) that refer to specic resources or that reference the results of a command.
In the following example, a lengthy UNC-formatted name is stored in a variable on line 5. When the job is run, a snapclone is created by the command on line 10, which refers to the variable.
Line
Task
...
5
$disk = SetVariable ("\\ArrayA2\Pets\Cats\Vdisk66")
...
10
SnapcloneStorageVolume ($disk, "", SAME, "", WAIT)
...
In the next example, the results of a command are saved in a variable when the job is run. On line 7, the UNC name of the snapshot is stored in the variable $Rep1. Then on line 13 the variable is referenced to delete the snapshot.
Line
Task
...
$Rep1 = SnapshotHostVolume ("\\ source_host\path\source_hostvol1", FULLY_ALLOCATED, SAME)
7
ONERROR PAUSEAT E1:
...
//
13
E2: DeleteStorageVolumes ( $Rep1 ) ONERROR PAUSEATE2:
...
HP StorageWorks Replication Solutions Manager 4 .0.1
15
Page 16
Usage
Assignments are:
Local to each job and cannot be referenced across jobs.
Notcasesensitive.
Format
The rst two characters must be a dollar sign ($) followed by an alpha character. No special
Upper and lower c ase, alpha and numeric are allowed.
Underscores
Branches
Branches and labels are typically used to hand le errors and to create jobs that can be looped repeatedly. In line 9 of the following example, the command branches to label E1 on line 30 if there is an error when the command is executed.
characters are allowed after the rst character.
are allowed; spaces are not allowed.
Line
Task
...
9
Launch ( %source_host%, %suspend_command_line%, "", WAIT, "0" ) onerror pauseat E1:
...
30 E1:Exit(FAILURE)
Branchin
gtypes
Default. If the command fails, abort the job at this task (line).
None.Us
Onerror Goto. If the command fails, go to the label. Execute the command at the label.
Onerror Pauseat. If the command fails, go to the label and pause the job. When the job is
Onsucc
Commands
When you include a command in a job, the command’s arguments and default values are displayed in the job editor window. Argument names that appear with red % markers indicate that specicvalues arerequired. Seejobarguments. For example:
Snapc
You must edit the command and select or enter values for any required arguments. After editing, the command displays the argument value as normal text, in quotes.
SnapcloneStorageVolume ( "\\Array2\Cats", "", SAME, "", WAIT )
You can also edit a command to change its default values. In the example below, the defaults for disk group name and snapclone name have been changed.
ethedefaultbehavior.
continued from the GUI or CLUI, resume the job by executing the command at the label.
ess Goto. If the command is successful, go to the label. Execute the command at the label.
loneStorageVolume ( %storvol_unc_name%, "", SAME, "", WAIT )
^ command ^ arguments ... ^^ ^ ^
SnapcloneStorageVolume ( "\\Array2\Cats", "DskGrp3", SAME, "CatsCopy", WAIT )
You can also edit a command to add job ow controls and assignments. See job labels, branches and assignments.
16
Job concepts, templates and commands
Page 17
R1: $ Rep1 = SnapcloneStorageVolume ( "\\Array2\Cats", "", SAME, "", WAIT ) onerror pauseat E1:
label ^ ^ assignm
Command result values
Some commands return a result that can be assigned to a variable. The variable can then be referenced inasucceedingstepinthejob. Seealsojobassignments.
The following table lists command result values and formats. See also resource names and UNC formats.
Job command
//
AddAllOracleTablespacesToRepository
AddDrGroupMember
AddOracleAr
AddOracleTablespacesToRepository
AddReplicaToReplicaRepository
AddReplicasToReplicaRepository
CombineLists
ConvertStorageVolumeIntoContainer Combined list of resources (UNC)
ConvertStorageVolumesInManagedSetIntoContainers
chiveLogFilesToRepository
ent branch ^
Command result value (format)
-
-
-
-
-
-
-
Combined list of resources (UNC)
List of container names (UNC)
ConvertStorageVolumesIntoContainers
ConvertStorageVolumesIntoContainersUsingRepository List of container names (UNC)
CreateContainer
CreateContainerForHostDiskDevice
CreateContainersForHostVolume
CreateContainersForHostVolumeGroup
CreateDiskDevice
CreateDrGroup
CreateDrGroupFromHostVolume
CreateHostVolume Host volume name (UNC)
CreateHostVolumeDiscrete Host volume name (UNC)
CreateH
CreateHostVolumeGroup Host volume group name (UNC)
CreateHostVolumesUsingRepository List of host volume names (UNC)
CreateO
ostVolumeFromDiskDevices
racleRepository
List of container names (UNC)
Container name (UNC)
Managed set name of virtual disk containers (simple)
Managed set name of virtual disk containers (simple)
Managed set name of virtual disk containers (simple)
-
DR group name (UNC)
DR group name (UNC)
Host vol
Oracle r
ume name (UNC)
epository name (UNC)
CreateReplicaRepository Replica repository name (simple)
CreateRestoredHostVolumesUsingRepository List of host volume names (UNC)
StorageVolume
Create
evolumename(UNC)
Storag
HP StorageWorks Replication Solutions Manager 4 .0.1
17
Page 18
Job command
DeleteContaine
DeleteDrGroup
DeleteDrGroupMember
DeleteHostVolume
DeleteHostVolumeGroup
DeleteHostVolumesUsingRepository
DeleteOracl
DeleteReplicaRepository
DeleteStorageVolume
DeleteStorageVolumes
DeleteStorageVolumesInManagedSet
DeleteStorageVolumesUsingRepository
DetachMirr
DiscoverDiskDevice
DiscoverDiskDevices
DiscoverDiskDevicesForDrGroup
DiscoveryRefresh (obsolete)
Exit
Export
FailoverDrGroup
FailoverDrGroups
FlushCac
ForceFullCopyDrGroup
r
eRepository
orclones
he
Command result value (format)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
FractureHostDiskDeviceMirrorclone Name of the fractured mirrorclone (UNC)
FractureHostVolumeGroupMirrorclones
FractureHostVolumeMirrorclones
FractureMirrorclones
Import
InstantRestoreFromMirror
InstantRestoreFromSnapshot
Launch
LaunchJob
Log
MirrorcloneHostDiskDeviceToContainer
MirrorcloneHostDiskDeviceToContainerInManagedSet
MirrorcloneHostVolumeGroupToContainers
cloneHostVolumeGroupToContainersInManagedSet
Mirror
18
Job concepts, templates and commands
List of fractured mirrorclone names (UNC)
List of fractured mirrorclone names (UNC)
-
-
-
-
rom enabled host
Result f
-
-
-
-
-
-
Page 19
Job command
MirrorcloneHos
MirrorcloneHostVolumeToContainersInManagedSet
MirrorcloneStorageVolumeToContainer
tVolumeToContainers
Command result value (format)
-
-
-
MountVolumeGroupComponent
Pause
PresentStorageVolume
PresentStora
RemoveDiskDevice
ResyncMirrorclone
ResyncMirrorclones
RetainLatestRoundRobinReplicasForHostStorageVolume
RetainLatestRoundRobinReplicasForHostVolume
RetainLate
SendEmail
SetDiskGroupForSnapclone
SetDrGroupAutoSuspend
SetDrGroupComments
SetDrGroupDestinationAccess
SetDrGrou
SetDrGroupFailsafeOnLinkDownPowerUp
SetDrGroupHome
SetDrGro
SetDrGroupMaxLogSize
SetDrGroupName
SetDrGroupSuspend
SetHostDiskDeviceWriteCacheMode
SetHostVolumeGroupWriteCacheMode
SetHost
SetHostVolumesWriteCacheMode
geVolumes
stRoundRobinReplicasForHostVolumeGroup
pFailsafe
upIoMode
VolumeWriteCacheMode
Mount point name (UNC)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
SetListVariable
ntPointsPrexInRepository
SetMou
SetNoticationPolicy
SetOracleModeUsingRepository
SetStorageVolumeName
SetStorageVolumeWriteCacheMode
SetStorageVolumesWriteCacheMode
The resources listed in the argument (UNC)
-
-
-
Newnameforthestoragevolume(UNC)
-
-
HP StorageWorks Replication Solutions Manager 4 .0.1
19
Page 20
Job command
Command result value (format)
SetVariable The resource in t
SetWriteCacheModesUsingRepository
SnapcloneDiskDevice Snapclone storage volume name (UN C)
SnapcloneHostDiskDeviceToContainerInManagedSet Snapclone storage volume name (UN C)
SnapcloneHostVolume
SnapcloneHostVolumeGroup
SnapcloneHostVolumeGroupToContainersInManagedSet
SnapcloneHostVolumeToContainers
SnapcloneHostVolumeToContainersInManagedSet
SnapcloneO
SnapcloneOracleUsingRepository
SnapcloneStorageVolume Snapclone storage volume name (UN C)
SnapcloneStorageVolumeToContainer Snapclone storage volume name (UN C)
SnapcloneStorageVolumesToContainers
racleToContainersUsingRepository
-
List of snapclone storage volume names (UNC)
List of snapclone storage volume names (UNC)
List of snapclone storage volume names (UNC)
List of snapclone storage volume names (UNC)
List of snapclone storage volume names (UNC)
-
-
List of snapclone storage volume names (UNC
he argument (UNC)
SnapshotDiskDevice Snapshotstoragevolumename(UNC)
SnapshotHostDiskDeviceToContainerInManagedSet Snapshot name (UNC)
SnapshotHostVolume
SnapshotHostVolumeGroup
SnapshotHostVolumeGroupToContainersInManagedSet
SnapshotHostVolumeToContainers
SnapshotHostVolumeToContainersInManagedSet
SnapshotOracleToContainersUsingRepository
SnapshotOracleUsingRepository
SnapshotStorageVolume Snapshotstoragevolumename(UNC)
SnapshotStorageVolumeToContainer Snapshotstoragevolumename(UNC)
SnapshotStorageVolumesToContainers
TestJobState Boolean true-false
ntEntireVolumeGroup
Unmou
UnmountHostVolume
List of snapshot storage volume names (UNC)
List of snapshot storage volume names (UNC)
List of snapshot storage volume names (UNC)
List of snapshot storage volume names (UNC)
List of snapshot storage volume names (UNC)
List of snapshot storage volume names (UNC)
List of snapshot storage volume names (UNC)
List of snapshot storage volume names (UNC)
-
-
20
Job concepts, templates and commands
Page 21
Job command
UnmountHostVol
UnmountHostVolumesUsingRepository
UnpresentStorageVolume
UnpresentStorageVolumes
ValidateHost
ValidateHostVolume
ValidateHos
ValidateHostVolumeGroup
ValidateHostVolumeMirrorclones
ValidateOracleTablespaces
ValidateSnapcloneHostVolume
ValidateSnapcloneHostVolumeGroup
ValidateSn
ValidateSnapshotHostVolume
ValidateSnapshotHostVolumeGroup
ValidateSnapshotStorageVolume
ValidateStorageSystem
ValidateStorageVolume
Validate
Wait
WaitDrGroupSynchronizationTransition
WaitFor
WaitForHostVolumeGroupWriteCacheFlush
WaitForHostVolumeWriteCacheFlush
WaitForHostVolumesWriteCacheFlush
WaitForJob
WaitForStorageVolumeDiscovery
WaitF
WaitForStorageVolumeWriteCacheFlush
WaitForStorageVolumesWriteCacheFlush
WaitForWriteCacheFlushUsingRepository
WaitHostDiskDeviceNormalization
WaitHostVolumeNormalization
Wait
WaitStorageVolumesNormalization
WaitUntil
WaitVolumeGroupNormalization
StorageVolumes
HostDiskDeviceWriteCacheFlush
orStorageVolumesDiscovery
StorageVolumeNormalization
umes
tVolumeDoesNotExist
apcloneStorageVolume
Command result value (format)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
HP StorageWorks Replication Solutions Manager 4 .0.1
21
Page 22
Comments
The comment command can be used to add comments to a job. You can also comment-out other commands. See also job comment command.
E-mail from jobs
A job (each job instance) can send e-mail messages.
Job instances can send e-mail messages that you write and they can also send predened job status notication messages. See SendEmail and SetNoticationPolicy, respectively.
Exits
Exit command failure. HP recommends the following best practices for using exit commands:
Include at least one successful exit command in a job.
Include a su
termination.
If you create branches in a job to handle failures, conclude each with a failure exit command.
See job exit
Implicit jobs
When responding to certain requests, the replication manager may create and immediately run a job. Such jobs are called implicit jobs. Implicit jobs are not saved and cannot be edited.
s identify termination points in a job and can help provide conrmation of success or
ccessful exit command for each branch of the job that can result in successful
command.
When an implicit job runs, it appears in the Monitor Job window and the Events pane. See also job
implicit job startup.
Implicit
job startup
When clicking OK or Finish to perform an action on a resource, the window or wizard immediately closes and the Monitor Job window appears. This is normal operation. To p erform your requested action, the replicat
It is not n continues to run.
Imported jobs
Replication manager jobs that have been imported from legacy HP Business Copy 2.X jobs include special comments to help resolve potential command conversion issues. For example:
ion manager creates and starts an implicit job.
ecessary to leave the Monitor Job window open. If you close the window, the implicit job
22
Job concepts, templates and commands
Page 23
import note >
legacy job start >
Line
Task
1
// This job was im
2
// which included the following operations:
// [line 1] SNAP UNIT Array2 Cats\ACTIVE $BCV1 SNAPCLONE_HSV
3
SAME_AS_SOURCE
...
portedtoRSMfromanexistingBCjob,
legacy job end >
template applied >
commands start >
required argument >
commands end >
12
//[line5]"we’redone"
13
14
// Replicate storage volumes.
15
16
ValidateStorageSystem ( "Array2" )
17
ValidateStorageVolume ( "\\Array2\Cats\ACTIVE" )
18
ValidateSnapshotStorageVolume ( "\\Array2\Cats\ACTIVE" )
19
//
//$BCV1 = SnapshotStorageVolume ( "\\Array2\Cats\ACTIVE",
20
FULLY_ALLOCATED, SAME, %dest_storvol1%,WAIT)onerrorpauseatE1:
...
33 E1 : Exit ( FAILURE )
In the example:
Lines 1 and 2
indicate the job was created by importing a legacy job.
Line 3 shows (as a comment) the rst legacy job command that was encountered. All legacy
commands are displayed in this manner.
Line 12 ind
icates that all legacy job commands have been listed.
Line 15 indicates the start of the replication manager template that has been applied to create an
equivalent job.
Line 20 ind
icatesarequiredargument. Seejob arguments.
Job commands list
The following commands can be included in jobs. The replication type indicates if the command is specically for use with the local or remote replication features of a storage system. Storage family indicates the storage system family that the command supports. Some commands cannot be used unless a host agent is running on the target host.
Job command Command
// general
AddAllO
AddDrGroupMember >
AddOracleArchiveLogFilesToRepository Oracle
AddOracleTablespacesToRepository Oracle
AddReplicaToReplicaRepository host volume local
AddReplicasToReplicaRepository host volume local
Combi
racleTablespacesToRepository
neLists
Replication
category
Oracle
DR group
al
gener
HP StorageWorks Replication Solutions Manager 4 .0.1
type
~~
~yes
remote
~yes
~yes
~~
Requires
host agent
~
yes
yes
23
Page 24
Job command Command
category
ConvertStorageVolumeIntoContainer
ConvertStorageVolumesInManagedSetIntoContainers
ConvertStorageVolumesIntoContainers
ConvertStorageVolumesIntoContainersUsingRepository Oracle
CreateContainer
storage volume
storage volume
storage volume
storage volume
Replication
type
local,
container
local,
container
local,
container
~yes
local,
container
Requires
host agent
~
~
~
~
CreateCont
CreateContainersForHostVolume host volume
CreateContainersForHostVolumeGroup
CreateDiskDevice
CreateDrGroup
CreateDrGroupFromHostVolume
CreateHostVolume host volume
CreateHostVolumeDiscrete host volume
CreateHostVolumeFromDiskDevices host volume
CreateHostVolumeGroup
CreateHostVolumesUsingRepository Oracle
CreateOracleRepository Oracle
CreateReplicaRepository host volume local
CreateRestoredHostVolumesUsingRepository Oracle
CreateStorageVolume
Dele
DeleteDrGroup
DeleteDrGroupMember
eteHostVolume
Del
ainerForHostDiskDevice
teContainer
host disk
device
host volume
group
host disk
device
DR group
DR group
lume
host vo
group
storage volume
storage volume
DR group
DR group
tvolume
hos
local,
container
local,
container
local,
container
~yes
remote
remote
~yes
~yes
~yes
~yes
~yes
~yes
~yes
~~
local,
container
remote
remote
~yes
yes
yes
yes
~
~
yes
~
~
~
DeleteHostVolumeGroup
DeleteHostVolumesUsingRepository Oracle
DeleteOracleRepository Oracle
DeleteReplicaRepository host volume local
DeleteStorageVolume
24
Job concepts, templates and commands
host volume
group
storage volume
~yes
~yes
~yes
yes
~~
Page 25
Job command Command
category
DeleteStorageVolumes
DeleteStorageVolumesInManagedSet
DeleteStorag
DetachMirrorclones
eVolumesUsingRepository
storage
volume
storage
volume
Oracle
storage
volume
Replication
type
~~
~~
~yes
local,
mirrorclone
Requires
host agent
~
DiscoverDiskDevice
DiscoverDi
DiscoverDiskDevicesForDrGroup
DiscoveryRefresh< (obsolete)
Exit
Export
FailoverDrGroup
FailoverDrGroups
FlushCache host volume
ForceFullCopyDrGroup
FractureHostDiskDeviceMirrorclone
FractureHostVolumeGroupMirrorclones
FractureHostVolumeMirrorclones host volume
Fract
Import
InstantRestoreFromMirror
InstantRestoreFromSnapshot
Launch host
LaunchJob script ow
Log
skDevices
ureMirrorclones
host disk
device
host disk
device
host disk
device
general
script ow
general
DR group
DR group
DR group
device
group
storage
volume
general
storage
volume
storage
volume
eral
gen
k
host dis
host volume
~yes
~yes
remote
~~
~~
~~
remote
remote
~yes
remote
local,
lone
mirrorc
local,
mirrorclone
local,
mirrorclone
local,
mirrorclon
~~
local,
mirrorclone
l,
loca
shot
snap
~yes
~~
~~
yes
~
~
~
yes
yes
yes
~
~
~
MirrorcloneHostDiskDeviceToContainer
MirrorcloneHostDiskDeviceToContainerInManagedSet
rrorcloneHostVolumeGroupToContainers
Mi
host disk
device
host disk
device
host volume
group
HP StorageWorks Replication Solutions Manager 4 .0.1
local,
mirrorclone
local,
mirrorclone
local,
mirrorclone
yes
yes
yes
25
Page 26
Job command Command
category
Replication
type
Requires
host agent
MirrorcloneHostVolumeGroupToContainersInManagedSet
MirrorcloneHostVolumeToContainers host volume
MirrorcloneHostVolumeToContainersInManagedSet host volume
MirrorcloneStorageVolume
MountEntireVolumeGroup
MountHostVolume host volume
MountHostVolumesUsingRepository Oracle
MountVolumeGroupComponent
Pause
PresentStor ageVolume
PresentStor ageVolumes
RemoveDiskDevice
ResyncMirrorclone
ResyncMirrorclones
host volume
group
storage volume
host volume
group
host volume
group
script ow
storage volume
storage volume
host dis
k
device
storage volume
storage volume
local,
mirrorclone
local,
mirrorclone
local,
mirrorclone
local,
mirrorclone
~yes
~yes
~yes
~yes
~~
~~
~~
~yes
local,
mirrorclone
local,
mirrorclone
yes
yes
yes
~
~
~
nLatestRoundRobinReplicasForHostStorageVolume
Retai
RetainLatestRoundRobinReplicasForHostVolume host volume local
RetainLatestRoundRobinReplicasForHostVolumeGroup
Email
Send
SetDiskGroupForSnapclone host volume
SetDrGroupAutoSuspend
SetDrGroupComments
SetDrGroupDestinationAccess
SetDrGroupFailsafe
SetDrGroupFailsafeOnLinkDownPowerUp
SetDrGroupHome
SetDrGroupIoMode
SetDrGroupMaxLogSize
SetDrGroupName
host disk
device
host volume
group
ral
gene
DR group
roup
DR g
DR group
DR group
DR group
DR group
DR group
DR group
DR group
local
local
~~
local,
snapclone
remote
remote
remote
remote
ote
rem
remote
remote
remote
remote
yes
yes
yes
~
~
~
~
~
~
~
~
~
~
26
Job concepts, templates and commands
Page 27
Job command Command
category
SetDrGroupSuspend
DR group
Replication
type
remote
Requires
host agent
~
SetHostDiskDeviceWriteCacheMode
SetHostVolumeGroupWriteCacheMode
SetHostVolumeWriteCacheMode host volume
SetHostVolumesWriteCacheMode host volume
SetListVariable general
SetMountPointsPrexInRepository
SetNoticationPolicy general
SetOracleM
SetStorageVolumeName
SetStorageVolumeWriteCacheMode
SetStorageVolumesWriteCacheMode
SetVariable general
SetWriteCacheModesUsingRepository Oracle
Snapclon
odeUsingRepository
eDiskDevice
host disk
device
host volume
group
Oracle
Oracle
storage
volume
storage
volume
storage
volume
host disk
device
~yes
~yes
~yes
~yes
~~
~yes
~~
~yes
~~
~~
~~
~~
~yes
local,
snapclone
yes
SnapcloneHostDiskDeviceToContainerInManagedSet
SnapcloneHostVolume host volume
SnapcloneHostVolumeGroup
SnapcloneHostVolumeGroupToContainersInManagedSet
SnapcloneHostVolumeToContainers host volume
cloneHostVolumeToContainersInManagedSet
Snap
SnapcloneOracleToContainersUsingRepository Oracle
SnapcloneOracleUsingRepository Oracle
SnapcloneStorageVolume
SnapcloneStorageVolumeToContainer
SnapcloneStorageVolumesToContainers
host disk
device
lume
host vo
group
host volume
group
volume
host
storage
volume
storage
volume
storage
volume
local,
snapclone
local,
snapclone
local,
one
snapcl
local,
snapclone
local,
snapclone
local,
snapclone
local,
snapclone
local,
snapclone
al,
loc
apclone
sn
local,
snapclone
local,
snapclone
yes
yes
yes
yes
yes
yes
yes
yes
~
~
~
HP StorageWorks Replication Solutions Manager 4 .0.1
27
Page 28
Job command Command
category
Replication
type
Requires
host agent
SnapshotDiskDevice
SnapshotHostDiskDeviceToContainerInManagedSet
SnapshotHostVolume host volume
SnapshotHostVolumeGroup
SnapshotHostVolumeGroupToContainersInManagedSet
SnapshotHo
SnapshotHostVolumeToContainersInManagedSet host volume
SnapshotOracleToContainersUsingRepository Oracle
SnapshotOracleUsingRepository Oracle
SnapshotStorageVolume
SnapshotStorageVolumeToContainer
Snapsh
SwitchOracleArchiveLogFilesUsingRepository Oracle
TestJobState
stVolumeToContainers
otStorageVolumesToContainers
host disk
device
host disk
device
host volume
group
host volume
group
host volume
storage volume
storage volume
storage volume
script ow
local,
snapshot
local,
snapshot
local,
snapshot
local,
snapshot
local,
snapshot
local,
snapshot
local,
snapshot
local,
snapshot
local,
snapsho
snapshot
snapshot
snapshot
t
local,
local,
local,
~yes
~~
yes
yes
yes
yes
yes
yes
yes
yes
yes
~
~
~
ntEntireVolumeGroup
Unmou
UnmountHostVolume host volume
UnmountHostVolumes host volume
untHostVolumesUsingRepository
Unmo
UnpresentStorageVolume
UnpresentStorageVolumes
ValidateHost validation
ValidateHostVolume validation
ValidateHostVolumeDoesNotExist validation
lidateHostVolumeGroup
Va
ValidateHostVolumeMirrorclones validation
ValidateOracleDatabase Oracle
ValidateOracleTablespaces Oracle
host volume
group
le
Orac
storage volume
storage volume
lidation
va
~yes
~yes
~yes
~yes
~~
~~
~yes
~yes
~yes
~yes
local,
mirrorclone
~yes
~yes
yes
28
Job concepts, templates and commands
Page 29
Job command Command
category
Replication
type
Requires
host agent
ValidateSnapcloneHostVolume validation
ValidateSnapcloneHostVolumeGroup validation
ValidateSnapcloneStorageVolume validation
ValidateSnapshotHostVolume validation
ValidateSnapshotHostVolumeGroup validation
ValidateSn
ValidateStorageSystem validation
ValidateStorageVolume validation
Validate
Wait
WaitDrGroupNormalization
WaitDrGr
WaitForHostDiskDeviceWriteCacheFlush
apshotStorageVolume
StorageVolumes
oupSynchronizationTransition
validation
on
validati
script ow
DR group
DR group
host disk
device
local,
snapclone
local,
snapclone
local,
snapclone
local,
snapshot
local,
snapshot
local,
snapshot
~~
~~
~~
~~
remote
remote
~yes
yes
yes
~
yes
yes
~
~
~
WaitForHostVolumeGroupWriteCacheFlush
WaitForHostVolumeWriteCacheFlush host volume
WaitForHostVolumesWriteCacheFlush host volume
WaitForJob
WaitForStorageVolumeDiscovery
WaitForStorageVolumesDiscovery
WaitForStorageVolumeWriteCacheFlush
WaitForStorageVolumesWriteCacheFlush
WaitForWriteCacheFlushUsingRepository Oracle
WaitHostDiskDeviceNormalization
WaitHostVolumeNormalization host volume
WaitStorageVolumeNormalization
WaitStorageVolumesNormalization
WaitUntil
host volume
group
script ow
e
storag
e
volum
storage
volume
storage
volume
age
stor
me
volu
host disk
device
storage
volume
storage
volume
script ow
~yes
~yes
~yes
~~
~~
~~
~~
~~
~yes
~yes
~yes
~~
~~
~~
WaitVolumeGroupNormalization
host volume
group
HP StorageWorks Replication Solutions Manager 4 .0.1
~yes
29
Page 30
Job templates l
Job templates provide frameworks and guidelines for creating typical jobs.
ist
Template name (alphabetical order) Replication
Remarks
type
Empty template
Fracture host
Instant restore storage volumes to other storage volumes local
Mount existing storage volumes
Perform cascaded replication
Perform planned failover
Perform unplanned failover
Replicate (
Replicate host disk devices, mount to a host local requires host agent
Replicate host volume group, mount components to a host local requires host agent
Replicate host volume group, mount entire group to a host local requires host agent
Replicate host volumes local requires host agent
Replicate host volumes via pre-allocated replication, mount to a host local requires host agent
Replicat
Replicate host volume, mount components to a host local requires host agent
volumes, mount to a host
via snapclone) a host volume multiple times, mount to a host
e host volumes, mount to a h ost
-
local requires host
-
remote and
local
remote
remote
local requires ho
local requires
requires host agent
requires host agent
requires host agent
agent
st agent
host agent
Replicate host volumes, mount to a host, then to a different host local requires host agent
Replicat
Replicate storage volumes local
Replicate storage volumes via pre-allocated replication local
Replica
Replicate tablespaces via pre-allocated replication, mount to a host local
Replicate tablespaces, mount to a host local
Restore Oracle tablespaces local
Setup Continuous Access
Throttle replication I/O
Unmount and delete existing host volumes
Unmount existing host volumes
* Template can be modied for use without a host agent.
e raw storage volumes, mount (raw) to a host
te tablespaces
local requires
local
remote
remote
-
-
requires host agent, Oracle
requires host agent, Oracle
requires host agent, Oracle
requi agent
requires host agent
requires host agent
host agent
res host
,Oracle
30
Job concepts, templates and commands
Page 31
Labels
Labels are used in conjunction with branches. See job branches.
Usage
Labels are:
Local to each job and cannot be referenced across jobs.
N ot case sensitive.
Format
Must be at least two characters and end with a colon.
Upper and lowe
Underscores are allowed; spaces are not allowed.
Pause and continue
Pause
A pause actio state.
You can use a GUI action, a pause command within the job, or a CLUI command.
When using a
When using the GUI or CLUI, the job instance t ypically completes the current step, then halts before
starting the next step. However, if the step is an interrupt-enabled wait command, the job instance immediately halts. Interrupt-enabled wait commands include: Wait, WaitForJob and WaitUntil.
n or command halts execution of a running job instance and places the job in a paused
r case, alpha and numeric are allowed.
pause command within a job, execution is halted on the pause step.
Continue
A continue action or command resumes execution of a job instance that is paused,orwaiting.See
job status and states.
You can use a GUI action or CLUI command.
When used for a waiting job instance, the wait is ended and execution continues at the next step.
When used for a paused job instance, execution typically continues at the next step.
However, if the job instance was paused on an interrupt-enabled wait command, the wait condition is checked before continuing. If the wait condition has been detected, then the next step is executed. Otherwise, the job instance waits for the condition to be detected before starting the next step. For example, i f a job command speciesa10-minutewaitandthecontinueoccursafter20 minutes, the next step would be immediately executed. If the continue occurs after 5 minutes, the job instance would wait 5 minutes before starting the next step.
Resource names and UNC formats
Resources in a SAN are identied in several ways, including UNC format. UNC (Universal or Uniform Naming Convention) identies a resource in terms of its hierarchical location in a network.
See the following for name and UNC formats: DR groups, enabled hosts, host volumes, Oracle,
esystems,andvirtual disks (storage volumes)
storag
Resource names in job commands
When you initially enter a command in a job, the command’s resource arguments are displayed as %variable% names, for example:
HP StorageWorks Replication Solutions Manager 4 .0.1
31
Page 32
CreateDiskDevice ( %stor vol_unc_name%, %host_name%,0,READ_WRITE)
When selecting UNC format, or keyboard, you must use the appropriate format.
IMPORTANT:
UNC names in job commands are case sensitive.
After selection or entr y of arguments, the command is displayed with resource names in quotes, for example:
CreateDiskDevice ( "\\ArrayA2\Cats", "HostA6", 12, READ_WRITE )
Name formats and examples for resource types follow.
DR groups
Name format (UNC)
\\array name\path\DR group name
Enabled hosts
The job editor and command validation accept these formats.
aspecific resource from an Editing Task menu, the resource names are presented in a other format, as appropriate for the resource. If you enter a resource name from the
Example
\\ArrayA2\DrGrpPets Identies the DR group named DrGrpPets on the storage
array named ArrayA2
Name format (other)
Computer network name
Fully qualied network name
IP address
Host volumes
Applies to standard host volumes, volume groups, logical volumes, and host volume components such as partitions and slices.
Name format (UNC) OS specicexample
\\host name\path\host volume name
Example
HostA6
HostA6.SiteA.corp
88.15.42.
Each example identies an enabled host using an accepted format
AIX
HP-UX
Linux
OpenVMS
Solaris
Tru64 UNIX
Windows \\HostA2\E:\pets\cats
101
\\HostA2\/home/cats
\\HostA2\/users/cats
\\HostA2\/var/cats
\\HostA2\CATS
\\HostA2\/usr/cats
\\HostA2\/users/cats
32
Job concepts, templates and commands
For each OS, identies the path and le named Cats on the enabled host named HostA2
Page 33
Oracle
Name format (UNC)
\\enabled host\database name
\\enabled host\repository name
Storage systems
Name format (other)
storage name
Virtual disks (storage volumes)
Applies to s disks, and storage containers.
Name format (UNC)
\\array name\path\storage volume name
tandard storage volumes (virtual disks), snapclones (standard virtual disks) , snapshot virtual
Example
\\HostA2\Cats_db IdentiestheOracledatabasenamedCats_db on the
enabled host named HostA2
\\HostA2\Catalog 20051218.024153 Identies the repository named Catalog
20051218.024153 on the enabled host named HostA2.
Example
ArrayA2 Identies the storage array named ArrayA2
Example
\\ArrayA2\Cats Identies the storage volume named Cats on the storage
array named ArrayA2.
Simultaneous job instances
There are limits for the number of job instances that can be running simultaneously. Job instances that are paused or waiting are counted as running instances. See job status and states.
Maximum running job instances
Total
Per specic enabled host
AIX
HP-UX
Linux 1
OpenVMS
Solaris
Tru64 U
Windows
NIX 8
Any number of job instances can be started. Additional instances
8
are queued and run as others are completed.
8
The replication manager does not actively limit the number of job
8
instances per specic enabled host. However, HP does not support more than the maximums shown.
1
8
4
HP StorageWorks Replication Solutions Manager 4 .0.1
33
Page 34
Status and stat
Job status
The collection of all jobs may have one of the following status conditions. These status conditions appear in the resources pane.
es
Job instance states
Ajobinstance
Icon
Job task states
An individual job task (command) within a job instance my have one of the following states. These states appear in the Monitor Job window.
Icon
Status
When last checked, new information on jobs was not available.
When last checked, new information on jobs was available.
may have one of the following states. These states appear in the Run History tab.
Job instance state Job instance description
Aborted Aborted by a user while the job was running.
Completed Completed an
Executing Running
Failed Finished but the exit status was failed.
Paused Running, bu
Paused/Error
Stalled Running, but is halted due to an unexpected condition.
Waiting
Running, but is paused due to an error condition.
Running, bu
dtheexitstatuswassuccess.
t is paused by a job command or user action.
t is executing a planned wait.
Icon
none
Transactions
A transaction is a special block of lines that is executed as an entity. It consists of two parts: Do and Always. Transactions are typically used with jobs that launch external activities.
In the following example, a launch command on line 9 suspends host I/O to a storage volume (virtual disk). The transaction begins at line 10 and ends on line 16. The Do consists of lines 10 through 12, and the Always consists of lines 13 through 16.
34
Task state Task de scription
Not executed The task (command) has not been executed or is a comment.
Completed
Failed
Paused Thejobinstancewaspausedonthistask.
Paused/Error The job instance was paused with an error on this task.
Stalled The job in
Job concepts, templates and commands
The task (command) was completed successfully.
The task (
command) failed.
stance is in an unknown state.
Page 35
transaction start >
transaction
end >
Line
Task
...
Launch ( %source_host%, %suspend_command_line%, "", WAIT, "0" )
9
onerror pauseat E1:
10 DO {
$Rep1 = SnapshotStorageVolume ( %array_name_source_storvol_unc1%,
11
FULLY_ALLOCATED,SAME,%dest_storvol1%,NOWAIT)onerrorpauseatE1:
12
//
13 }ALWAYS{
14
15
16
...
In this example, if the snapshot command in the Do portion of the transaction fails, for whatever reason, the launch transact
command in the Always portion is executed to resume host I/O to the storage volume. This
ion helps ensure that host I/O is not suspended indenitely.
Validation
Validation refers to the use of resource validation commands in a job and subsequently performing a validation of the job. Job validation, especially at run time, helps ensure that a job instance runs successfully.
The values that you enter for arguments within job commands are checked in the job editor only for compliance with basic syntax rules. See job command arguments.
Resource validation commands
There ar or the status of the resource.
For example, ValidateStorageVolume checks for the availability of a specic virtual disk on a specific storage and if i
e several types of resource validation commands. Each t ype validates a different type of resource
system, while ValidateSnapcloneStorageVolume checks whether the storage volume is available
t can be copied using snapclone replication.
// Resume the
Launch ( %source_host%, %resume_command_line%, "", WAIT, "0" )
}
host application.
IMPORTANT:
HP recommends placing resource validation commands together, in the rst lines of a job. They can be preceded by comments, but not by other types of commands.
Resource validation processing
Jobs can be run and validated for resources from the GUI or the CLUI. When done from the GUI, a new job instance is displayed in the Monitor Job window. Validation processing generally occurs as follows.
Normal. If the line is a validation command, it is executed. If successful, the next line is executed.
If not successful, the job is stopped with a failure status.
Validate-only. If the line is a comment, SetVariable command or validation command, it is
executed. If successful, the next line is checked. If not successful, the job is stopped with a failure status. When the rst command is encountered that is not a SetVariable or validation command, the job is stopped with a success status.
HP StorageWorks Replication Solutions Manager 4 .0.1
35
Page 36
Skip validation. If the line is a validation command it is ignored.
In the validate-only and skip validation cases, job transactions and branches within validation commands are ignored.
Resource validation processing in transactions
Special cases exist for validation commands in a transaction block:
Validate-only
. The validation command in the transaction block is not executed.
Skip validation. The validation command in the transaction block is executed.
See also job transactions.
Wait/nowait argument
Some job commands include a wait/nowait argument. Values are:
Wait. When the job is run, issue the command, then wait until the command has been completed
before going to the next task in the job.
Nowait. When the job is run, issue the command, then immediately go to the next task in the job.
In general, use wait when you need to ensure that all aspects of a command have been performed by the command before any other task in the job is p erformed. Use nowait, when other tasks in the job do not depend its c ompletion.
Wait/nowait for discovery
When you include a local replication command in a job, the wait/nowait for discovery argument requires that you specify whether or not to wait until the new replica is discovered before executing the next step. Choices are wait and nowait. For example, in the job below, the replication ma nag er waits at line 7 until the new replica is discovered, before executing line 8.
Line
Task
...
$Rep1 = SnapshotHostVolume ( "%\\source_host\source_hostvol1%", FULLY_ALLOCATED, SAME,
7
WAIT )onerrorpauseatE1:
8
//
...
With both choices, the replica is instantly created on the storage system. With the nowait choice, the replication manager immediately executes the next job step, whether or not its database of resources has been updated with the new replica i nformation. With the wait choice, the replication manager does not execute the next step until its database of resources has been updated with the new replica information.
al use of nowait with wait-for-discovery commands
Typic
wait for discovery option is typically used in conjunction with the WaitForStorageVolumeDiscovery
The no and Wa
itForStorageVolumesDiscovery commands to minimize the amount of time that a database is
suspended while being locally replicated.
For example, the general structure of a job to replicate a database might be:
1. A launch command suspends the database I/O.
2. A local replication command instantaneously creates a replica. The command uses the nowait
ion so that the next step (resuming I/O) is immediately executed.
opt
3. A la
unch command resumes the database I/O.
4. With I/O resumed, a WaitForStorageVolumeDiscovery command causes the job to wait until the
replica is detected by a forced discovery of storage volumes. The helps ensure that subsequent steps that involve the new replica, for example a mount step, will b e valid.
36
Job concepts, templates and commands
Page 37
Job templates
Empty template
Template summary
Provides a series of comments that outline the basic structure of a job. After generating this template you must add individual job commands to accomplish specictasks.
Template options
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Example
This template was generated to create the basic structure of a job. No template option was selected.
Line
Task
1
// This is an empty job template.
2
//
3
//
4
//Waitforusertoinitiaterollback.
5
Pause ()
6
//
7
// Rollback.
8Exit(SUCCESS)
9
//
10
// Failure exit - no rollback needed.
11
E1: Exit (FAILURE)
Fracture host volumes, mount to a host (template)
Template summary
A. Fractures the mirrorclones of storage volumes that underlie a host volume on an enabled host. B. Presents the fractured mirrorclones to a second enabled host (creates a new host volume). C. Mounts the new host volume on the second enabled host. D. Pauses the job. E. After continuing, unmounts and d eletes the new host volume from the second enabled host;
unpresents the mirrorclones; then resynchronizes the mirrorclones with their sources.
Template options
Number
Sus pend source before replication . Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
of volumes to replicate. Adds commands for each host volume
HP StorageWorks Replication Solutions Manager 4 .0.1
37
Page 38
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Considerations
Tru64 UNIX.Whe
source before
Example
This template was generated to fracture and mount one host volume on an enabled host. No other template options were selected.
Line
1
2
n replicating AdvFS volumes that have he avy I/O, select the option Suspend
replication.
Task
// Fracture host volume and mounting it to a host.
//
3
// Assign som
4
$source_hostvol_unc1 = SetVariable(%source_hostvol_unc1%)
5
$source_host = SetVariable(%source_host%)
6
$mount_host = SetVariable(%mount_host%)
7
//
8
//Validatethatresourcesareasexpected.
9
ValidateHo
10
ValidateHost ($mount_host)
11
ValidateHostVolumeMirrorclones ($source_hostvol_unc1)
12
//
13
WaitHostVolumeNormalization($source_hostvol_unc1)
14
//
15
//
16 D O {
// The return value from FractureHostVolumeMirrorclones is a list of m irrorclones of under line storage
17
volumes of a host volume.
18
$Rep1 = Fr
19
//
20
}ALWAYS{
}
21
e variables that will be used in this job.
st ($source_host)
actureHostVolumeMirrorclones ($source_hostvol_unc1)
22
//
23
// Mount the replicated volume(s) on a host.
24
25
26
27
28
38
StorageVolumes ($Rep1, $mount_host) onerror pauseat E2:
Present
DiscoverDiskDevices ($mount_host, $Rep1) onerror continue
$HV1 = CreateHostVolumeFromDiskDevices ($source_hostvol_unc1, $Rep1, $mount_host) onerror pauseat E3:
$MP1 = MountHostVolume ($HV1, %mount_point1%) onerror pauseat E4:
//
Job concepts, templates and commands
Page 39
29
//Waitforusertoinitiaterollback.
30 Pause ()
31
//
32
// Rollback.
33
E5: UnmountHostVolume ($MP1) onerror pauseat E5:
34
E4: DeleteHostVolume ($HV1) onerror pauseat E4:
35
//
36
E3: UnpresentStorageVolumes ($Rep1, $mount_host) onerror pauseat E3:
37
//
38
E2: ResyncMirrorclones ($Rep1) onerror pauseat E2:
39
//
// Uncomment the following line if you want the job to wait for the mirrors to resynchronize before
40
completing
41
//WaitHostVolumeNormalization($source_hostvol_unc1)
42
//
43
//
Exit (SUCCESS)
44
45
//
46
// Failure exit - no rollback n eeded.
47 E1: Exit (FAILURE)
Instant restore storage volumes to other storage volumes (template)
Template su
Template options
mmary
A. Disables (ushes)thewritecacheofthestoragevolume(virtualdisk)torestorefrom. B. Converts the storage volume to restore to into a container. C. Copies (restores) from the storage volume (by snapclone) to the container. D. Re-enables the write cache of the source storage volume.
NOTE:
This temp
Number of volumes. Adds commands for each storage volume to restore from.
Sus pend source before replication . Adds launch commands for interacting with an enabled host,
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
late cannot be used with some older versions of controller software.
for example to suspend and resume host application I/O.
See SetNoticationPolicy.
Comments
This template cannot be used with some older versions of controller software.
HP recommends that you perform restores of host volumes using the GUI.
HP StorageWorks Replication Solutions Manager 4 .0.1
39
Page 40
Example
This template was generated to copy (restore) one storage volume. No other template options were selected.
Line
Task
1
// Synchronize storage volume(s) to other storage volume(s)
2
//
3
// Assign some variables that will be used in this job.
4
$source_storvol_unc1 = SetVariable(%source_storvol_unc1%)
5
$dest_storvo
6
//
7
//Validatethatresourcesareasexpected.
8
ValidateStorageVolume ($dest_storvol_unc1)
9
//
10
// Begin ushing the c ache on the storage volume(s).
11
DO {
12
SetStorageVolumeWriteCacheMode ($source_storvol_unc1, WRITE_CACHE_DISABLED, NOWAIT)
13
//
14
// Wait for the cache ush to complete.
15
WaitForStorageVolumeWriteCacheFlush ($source_storvol_unc1)
16
//
17
// Convert t
18
$CT1 = ConvertStorageVolumeIntoContainer ($dest_storvol_unc1)
19
//
20
SnapcloneS
21
//
22
}ALWAYS{
l_unc1 = SetVariable(%dest_storvol_unc1%)
he destination storage volume(s) into container(s).
torageVolumeToContainer ($source_storvol_unc1, $CT1, NOWAIT)
23
// Restore t
SetStorageVolumeWriteCacheMode ($source_storvol_unc1, WRITE_CACHE_ENABLED, NOWAIT)
24
onerror continue
25
//
}
26
27
//
28 Exit (SUCCESS
29
//
40
Job concepts, templates and commands
he writeback cache on the storage volume(s).
Page 41
Mount existing s
Template summary
A. Creates a host volume by presenting an existing* storage volume to an enabled host. B. Mounts the host volume. C. Pauses the job until continued by a user. D. After continuing, unmounts and deletes the host volume.
*Astoragevolumethatiscreatedbymeansotherthanthisjob. Thevolumemustexistandbeinthe replication manager database when this job is run.
torage volumes (template)
Template opt
Number of volumes to replicate. Adds commands for each volume.
Launch back
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
Comments
This template cannot be used with HP-UX host volumes.
When used with Tru64 UNIX hosts, this template supports only UFS le systems.
Example
This template was generated to mount one existing storage volume on a host. No other template options
ions
up after replication. Adds a launch command for interacting with an enabled host,
for example
See SetNoticationPolicy.
were selected.
,tostartatapebackup.
HP StorageWorks Replication Solutions Manager 4 .0.1
41
Page 42
Line
Task
1
// Mount existin
2
//
3
// Assign some variables that will be used in this job.
4
$storvol_unc1 = SetVariable(%storvol_unc1%)
5
$mount_host = SetVariable(%mount_host%)
6
//
7
// Validate tha
8
ValidateHost ($mount_host)
9
ValidateStorageVolume ($storvol_unc1)
10
//
11
// Mount the volume(s) on a host.
12
$HV1 = CreateHostVolumeDiscrete (%component%, $storvol_unc1, $mount_host) onerror pauseat E1:
13
$MP1 = MountH
14
//
15
//Waitforusertoinitiaterollback.
16 Pa u se ( )
17
//
gstoragevolume(s).
tresourcesareasexpected.
ostVolume ($HV1, %mount_point1%) onerror pauseat E2:
18
// Rollback.
19
E3: Un mountH
20
E2: DeleteHostVolume ($HV1) onerror pauseat E2:
21
//
22 Exit (SUCCE
23
//
24
// Failure exit - no rollback needed.
25
E1: Exit (FA
ostVolume ($MP1) onerror pauseat E3:
SS)
ILURE)
Perform cascaded replication (template)
Template summary
Performs a three-site cascaded replication. Sites 1 and 2 have an existing remote replication relationship. Remote replication between sites 2 a nd 3 is temporarily added and point in-time snapclone copies of the storage v
A. Congure
B. Halts the job (waits) to ensure that data on the destination disks is identical to the source disks
C. When rea
D. Returns the existing DR group pair to its prior operational settings.
olumes at site 1 are remotely replicated to site 3.
s an existing DR group pair for synchronous replication with failsafe on unavailable
member data protection.
(DR grou
p normalization).
dy, continues the job and makes point-in-time snapclone copies of the storage volumes
at site 2 (which are identical to those at site1).
42
Job concepts, templates and commands
Page 43
E. Presents the snapclones to a host at site 2. (This is required by some controller software versions
before the snapclones can be members of a DR group.
F. Creates a new DR group pair that contains the snapclone copies at site 2. G. Halts the job (waits) to ensure that the snapclones are remotely replicated to new storage
volumesatsite3.
H. Deletes the newly created DR group pair for sites 2 and 3, but retains the new storage volumes
at site 3.
When the job is completed, point-in-time copies of the storage volumes at site 1 exist at site 3.
Guidelines apply.
Template Options
Num b er of virtual disks in DR group. Adds commands for each virtual disk.
Suspend source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Include e-m
See SetNoticationPolicy.
Comments
Guidelines apply.
Example
ail notication. Adds a command for e -ma il notication of the job instance status.
This template was generated to perform one iteration of the cascaded replication involving one virtual disk. No ot
Line
1
2
3
4
5
6
7
8
9
10
11
12
13
14
her template options were selected.
Task
// Perform cascaded replication.
//
// This template assumes that you have three storage systems located at three different sites:
// Site 1: Contains a source DR group.
// Site 2: Contains a destination DR group.
// Site 3: After the script completes, it will contain a snapclone of the virtual disk.
//
// Assign some variables that will be used in this job.
$site_1_array = SetVariable(%site_1_array%)
$site_1_array_DR_Group_name_unc = SetVariable(%site_1_array_DR_Group_name_unc%)
$source_storvol_unc1 = SetVariable(%source_storvol_unc1%)
$dest_storvol1 = SetVariable(%dest_storvol1%)
$DiskGr
$site_2_array = SetVariable(%site_2_array%)
oup_name = SetVariable(%DiskGroup_name%)
15
$host_name = SetVariable(%host_name%
16
$site_3_array = SetVariable(%site_3_array%)
17
$DR_group_name = SetVariable(%DR_group_name%)
18
$DR_source_storvol_unc1 = SetVariable(%DR_source_storvol_unc1%)
HP StorageWorks Replication Solutions Manager 4 .0.1
43
Page 44
19
//
20
// Validate some resources needed by this job:
21
// - The arrays at Sites 1, 2 and 3.
22
//-ThesourceDRgroupatSite1andit’svirtualdiskmember(s).
23
// - The storage system at Site 2 with the destination DR group and it’s virtual disk member(s).
24
// - The host name at Site 2.
25
// - The source host used for suspend/resume application at Site 1 (if applicable).
26
//
27
//Validatethatresourcesareasexpected.
28
ValidateHost ($host_name)
29
ValidateStorageSystem ($site_1_array)
30
ValidateStorageSystem ($site_2_array)
31
ValidateStorageSystem ($site_3_array)
32
ValidateStor
33
ValidateStorageVolume (%site_2_array_source_storvol_unc1%)
34
//
35
// The setting of the following 2 steps may be dependent on the conguration
36
// of the DR g roup. Please consult the documentation for the appropriate set ting options.
37
// Set the DR group to synchronous.
38
// [Use ’onerror continue’ in case the mode is already set.]
39
SetDrGroupIoMode ($site_1_array_DR_Group_name_unc, SYNCHRONOUS) onerror continue
40
//
41
// Set the DR g
42
// [Use ’onerror continue’ in case the mode is already set.]
43
SetDrGroupFailsafe ($site_1_array_DR_Group_name_unc, ENABLED) onerror continue
44
//
45
// If the DR group from Site 1 to Site 2 is not normalized, wait.
46
WaitDrGroupNormalization ($site_1_array_DR_Group_name_unc)
47
//
48
// Create a snapclone at Site 2.
ageVolume (%site_1_array_source_storvol_unc1%)
roup to failsafe enabled.
$Rep1 = SnapcloneStorageVolume ($source_storvol_unc1, $DiskGroup_name, SAME, $dest_storvol1,
49
WAIT) on error pauseat E1 :
50
//
51
// Wait for the snapclone(s) to nish.
52
WaitStor ageVolumeNormalization ($Rep1) onerror pauseat E2:
53
//
54
//SettheDRgroupatSite1backtofailsafedisabled.
55
SetDrGroupFailsafe ($site_1_array_DR_Group_name_unc, DISABLED) onerror continue
44
Job concepts, templates and commands
Page 45
56
//
57
//SettheDRgroupatSite1backtoasynchronous.
58
SetDrGroupIoMode ($site_1_array_DR_Group_name_unc,ASYNCHRONOUS)onerrorcontinue
59
//
60
// Present the s
61
// NOTE: This is required only for VCS 3.x. For later versions, you may remove this step.
62
// Typically you will NOT want to present to an Enabled Host Agent, but instead
63
// use the nam e o
64
PresentStorageVolume($Rep1,$host_name,%LUN1%,READ_WRITE)onerrorpauseatE2:
65
//
66
//MakeaDRgroupwiththeSite3storagesystem.
$DRG1 = CreateDrGroup ($DR_group_name, $DR_source_storvol_unc1, $site_3_array, "", "", SAME,
67
"", "", 0, FALSE) onerror pauseat E3:
68
//
69
// Check the st
70
WaitDrGroupNormalization ($DRG1)
71
//
72
//DeletetheDRgroupfromSite2toSite3,butkeepthecopyatSite3.
73
// Keep trying until the destination is nished allocating.
74
//Thetimerequireddependsonvirtualdisksize,workload,etc.
75
ddgwt: Wait (
napclone at Site 2 to a host.
f a ’dummy’ EVA host that you have set up in Command View.
ateoftheDRgroupbeforewecontinue.
"0:0:3"
76
DeleteDrGroup ($DR_group_name, DETACH) onerror goto ddgwt:
77
//
78
// Delete the presentation.
79
// This is required only for VCS 3.x. For later versions, you may remove this step.
80
E3: UnpresentStorageVolume ($Rep1, $host_name) onerror pauseat E3:
81
//
82
// Delete the snapclone(s) at Site 2 that the DR group was using.
83
E2: DeleteStorageVolume ($Rep1) onerror pauseat E2:
84
//
85 Exit (SUCCESS)
86
//
87
// Failure e
88
E1: Exit (FAILURE)
xit - no rollback needed.
HP StorageWorks Replication Solutions Manager 4 .0.1
45
Page 46
Perform planned
Template summary
Performs a failover of two sites in the case where the source site resources and link remain available.he DR group pair contains one storage volume (virtual disk) at the source and destination sites.
A. Stops an application on the enabled host at site 1 (if necessary). B. Unmountsthehostvolumeontheenabledhostatsite1. C. Performs a failover from site 1 to site 2. D. Discovers the host volume at site 2 E. Mounts host volume on the enabled host at site 2. F. Starts applications on enabled host at site 2.
Guidelines apply.
Template options
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Comments
Guidelines apply.
Example
failover (template)
This templ contains one virtual disk. No template option was selected.
ate was generated to per form one iteration of a planned failover of a DR group pair that
46
Job concepts, templates and commands
Page 47
Line
Task
1
// Perform a plan
2
//
3
// Assign some variables that will be used in this job.
4
$site_2_array = SetVariable(%site_2_array%)
5
$site_1_host = SetVariable(%site_1_host%
6
$site_2_host = SetVariable(%site_2_host%)
7
$site_1_host
8
//
9
// Validate that resources are as expected.
10
ValidateHost ($site_1_host)
11
ValidateHost ($site_2_host)
12
ValidateStorageSystem ($site_2_array)
13
//
14
// Execute any necessary commands on the host to get the volumes ready to dismount,
15
// such as export volumegroups, stop the local application running on the volume(s), etc.
ned failover of a CA conguration.
_hostvol_unc = SetVariable(%site_1_host_hostvol_unc%)
16 Pa u se ()
17
//
18
// Unmount the local volume(s).
19
UnmountHostVolume ($site_1_host_hostvol_unc)
20
// Failover all DR groups to the remote site.
21
FailoverDrGroups ( %DR_group_name_list%, FALSE )
22
//
23
// Do a bus scan for the new volumes, make sure that new devices are seen by multipath driver.
24
// Repeat the Discover for each DR group.
25
DiscoverDiskDevicesForDrGroup($site_2_host, %DR_group_name%)
26
//
27
// Execute any necessary commands on the remote host to get the volumes ready to mount,
28
// such as import volumegroups, fsck volumes, etc.
29
// Mount devices on the remote host.
30
// Start the application on the remote host.
31 P a us e( )
32
//
33 Exit (SUCCESS
34
//
HP StorageWorks Replication Solutions Manager 4 .0.1
47
Page 48
Perform unplann
Template summary
Performs an unplanned failover of two sites in the case where the source site resources or link is no longer available. The DR group pair contains one storage volume (virtual disk) at the source and destination sites.
A. Performs a failover from site 1 to site 2. B. Discoversthehostvolumeonanenabledhostatsite2. C. Pauses the job prior to mounting the host volume on the enabled host at site 2.
Template options
Inc lude e-ma
See SetNoticationPolicy.
Comments
Guidelines apply.
IMPORTANT:
During actual emergencies, HP recommends that you manually perform a failover by using the Failover action in the GUI.
ed failover (template)
il notication. Adds a command for e-mail notication of the job instance status.
Example
This template was generated to perform one iteration of an unplanned failover of a DR group pair containing one virtual disk.
48
Job concepts, templates and commands
Page 49
Line
Task
1
// Perform an unp
2
// Since it is ’unplanned’, we do not quiesce or unmount the source volumes.
3
//
4
// Assign some v
5
$site_2_array = SetVariable(%site_2_array%
6
$site_2_host = SetVariable(%site_2_host%)
7
//
8
// Validate that resources are as expected.
9
ValidateHost ($site_2_host)
10
ValidateStor
11
//
12
// Failover all DR groups to the remote site.
13
FailoverDrGroups ( %DR_group_name_list%, FALSE )
14
//
15
// Do a bus scan for the new volumes, make sure that new devices are seen by multipath driver.
16
// Repeat the Discover for each DR group.
17
// This assumes that the devices are presented on the site 2 host
lanned failover of a CA conguration.
ariables that will be used in this job.
ageSystem ($site_2_array)
18
DiscoverDiskDevicesForDrGroup($site_2_host, %DR_group_name%)
19
//
20
// Execute any necessary commands on the remote host to get the volumes ready to mount,
21
// such as import volumegroups, fsck volumes, etc.
22
// Mount devi
23
// Start the application on the remote host.
Pause()
24
25
//
26 Exit (SUCCESS)
27
//
Replicate (
via snapclone) a host volume multiple times, mount to a host (template)
Template summary
A. Replicate the same host volume more than once, via snapclone. B. Between each snapclone, wait for the previous one to normalize. C. Mount the replicas on a host. D. Pause. E. Delete the mounted host volumes. F. Delete the storage volumes.
ces on the remote host.
HP StorageWorks Replication Solutions Manager 4 .0.1
49
Page 50
Template options
Number of times to snapclone. Adds commands for each snapclone.
Su s p end source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Considerati
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
Example
This template was generated to replicate a host volume one time No other template options were selected.
ons
source before replication.
50
Job concepts, templates and commands
Page 51
Line
Task
1
// Make multiple
2
// This requires normalization between each snapclone.
3
//
4
// Assign some v
5
$source_hostvol_unc1 = SetVariable(%source_hostvol_unc1%)
6
$mount_host1 = SetVariable(%mount_host1%)
7
//
8
// Validate that resources are as expected.
9
ValidateHost ($mount_host1)
10
ValidateSnap
11
//
12
$Rep1 = SnapcloneHostVolume ($source_hostvol_unc1, SAME, WAIT) onerror pauseat E1:
13
//
14
// Mount the replicated volume(s) on a host.
15
PresentStorageVolumes ($Rep1, $mount_host1) onerror pauseat E2:
16
DiscoverDiskDevices
$HV1 = CreateHostVolumeFromDiskDevices ($source_hostvol_unc1, $Rep1, $mount_host1) onerror
17
pauseat E2
snapclones of the same Host Volume, and mount to a host.
ariables that will be used in this job.
cloneHostVolume ($source_hostvol_unc1)
18
$MP1 = MountHostVolume ($HV1, %mount_point1%) onerror pauseat E3:
19
//
20
//Waitforusertoinitiaterollback.
21 P a u se ()
22
//
23
// Rollback.
24
E4: UnmountHostVolume ($MP1) onerror pauseat E4:
25
E3: Delete
26
//
27
E2: DeleteStorageVolumes ($Rep1) onerror pauseat E2:
28
//
HostVolume ($HV1) onerror pauseat E3:
29 Exit (SUCCESS)
30
//
31
// Failure
32
E1: Exit (FAILURE)
exit - no rollback needed.
HP StorageWorks Replication Solutions Manager 4 .0.1
51
Page 52
Replicate host
disk devices, mount to a host (template)
Template summary
A. Locally replicates (copies) the storage volumes that underlie a raw host volume on an enabled
host.
B. Presents the underlying storage volume copies to a second enabled host (creates a new raw
host volume).
C. Pauses the job. D. After continuing, removes the raw host volume from the second enabled host. E. Unpresents and deletes the storage volume copies from the storage system
Template options
N um ber of volumes to replicate. Adds commands for each volume.
Su s p end source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Use snapc
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Example
This template was generated to replicate one raw host volume and duplicate it on another enabled host. No other template options were selected.
lone instead of snapshot. Generates a template that uses snapclone replication.
52
Job concepts, templates and commands
Page 53
Line
Task
1
// Replicate hos
2
//
3
// Assign some variables that will be used in this job.
4
$source_host = SetVariable(%source_host%)
5
$source_disk_device_unc1 = SetVariable(%source_disk_device_unc1%)
6
$dest_storvol1 = SetVariable(%dest_storvol1%)
7
$mount_host =
8
//
9
// Validate that resources are as expected.
10
ValidateHost ($source_host)
11
ValidateHost ($mount_host)
12
//
$Rep1 = SnapshotDiskDevice ($source_disk_device_unc1, FULLY_ALLOCATED, SAME, $dest_storvol1,
13
WAIT) onerror pauseat E1:
14
//
15
// Create disk device(s) on a host.
16
CreateDisk
t disk device(s), and mount to a host.
SetVariable(%mount_host%)
Device ($Rep1, $mount_host, %LUN%, READ_WRITE) onerror pauseat E2:
17
//
18
//Waitforusertoinitiaterollback.
19 P a u se ()
20
//
21
// Rollback.
22
E3: RemoveD
23
//
24
E2: DeleteStorageVolume ($Rep1) onerror pauseat E2:
25
//
26 Exit (SUCCESS)
27
//
28
// Failure
29
E1: Exit (FAILURE)
iskDevice ($Rep1, $mount_host) onerror pauseat E2:
exit - no rollback needed.
Replicate host volume group, mount components to a host (template)
Template summary
A. Locally
host.
B. Presents the underlying storage volume copies to a second enabled host (creates a new host
volume g
replicates (copies) the storage volumes that underlie a host volume group on an enabled
roup).
HP StorageWorks Replication Solutions Manager 4 .0.1
53
Page 54
C. By default, mounts the components (logical volumes) in the new host volume group on the
second enabled host. Optionally, use raw disk I/O (do not mount the replicated components).
D. Pauses the job. E. After continuing, unmounts the new volume group components from the second enabled host,
unpresents and deletes the storage volume copies from the storage system.
Template options
Number of comp
for each component. To use raw disk I/O, instead of mounting, enter zero (0). No mount or unmount commands are added.
Su s p end source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
Use s napc lo
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Comments
Tru64 UNIX. Replication is not supported when an AdvFS domain spans partitions.
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
source before replication.
onents to mount. Enter 1 or more. Adds mount and unmount commands
ne instead of snapshot. Generates a template that uses snapclone replication.
Example
This template was generated to locally replicate one host volume group and mount one of its components (logical volume). No other template options were selected.
54
Job concepts, templates and commands
Page 55
Line
Task
1
// Replicate a ho
2
//
3
// Assign some variables that will be used in this job.
4
$source_VolumeGroup_unc1 = SetVariable(%source_VolumeGroup_unc1%
5
$source_host = SetVariable(%source_host%)
6
$mount_host = SetVariable(%mount_host%
7
$source_VG_c
8
//
9
// Validate that resources are as expected.
10
ValidateHost ($source_host)
11
ValidateHost ($mount_host)
12
ValidateSnapshotHostVolumeGroup ($source_VolumeGroup_unc1)
13
//
$Rep1 = SnapshotHostVolumeGroup ($source_VolumeGroup_unc1, FULLY_ALLOCATED, SAME, WAIT)
14
onerror pauseat E1:
15
//
16
// Mount the
st volume group, and mount component(s) to a host.
omponent_unc1 = SetVariable(%source_VG_component_unc1%
replicated volume(s) on a host.
$HV1 = CreateHostVolumeGroup ($source_VolumeGroup_unc1, $Rep1, $mount_host) onerror pauseat
17
E2:
$MP1 = MountVolumeGroupComponent ($HV1, $source_VolumeGroup_unc1, $source_VG_compo-
18
nent_unc1, %mount_point1%) onerror pauseat E3:
19
//
20
//Waitforusertoinitiaterollback.
21 P a u se ()
22
//
23
// Rollback.
24
E4: UnmountHostVolume ($MP1) onerror pauseat E4:
25
E3: DeleteHostVolumeGroup ($HV1) onerror pauseat E3:
26
//
27
E2: DeleteStorageVolumes ($Rep1) onerror pauseat E2
28
//
29 Exit (SUCCESS)
30
//
31
// Failure exit - no rollback n eeded.
32
E1: Exit (FAILURE)
HP StorageWorks Replication Solutions Manager 4 .0.1
55
Page 56
Replicate host
volume group, mount entire group to a host (template)
Template summary
A. Locally replicates (copies) the storage volumes tha t underlie a host volume group on an enabled
host.
B. Presents the underlying storage volume copies to a second enabled host (creates a new host
volume group).
C. Mounts all of the components (logical volumes) in the new host volume group on the second
enabled host.
D. Pauses the job. E. After continuing, unmounts the new volume group components from the second enabled host,
unpresents and deletes the storage volume copies from the storage system.
Template options
Number of v
Su s p end source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
Use snap
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
olume groups to replicate. Adds commands for each component.
clone instead of snapshot. Generates a template that uses snapclone replication.
Comments
Tru64 UNIX. Replication is not supported when an AdvFS domain spans partitions.
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
Example
This template was generated to locally replicate one host volume group and mount all of its components (logical volumes). No other template options were selected.
source before replication.
56
Job concepts, templates and commands
Page 57
Line
Task
1
// Replicate hos
2
//
3
// Assign some variables that will be used in this job.
4
$source_VolumeGroup_unc1 = SetVariable(%source_VolumeGroup_unc1%)
5
$source_host = SetVariable(%source_host%)
6
$mount_host = SetVariable(%mount_host%)
7
//
8
// Validate that resources are as expected.
9
ValidateHost ($source_host)
10
ValidateHost ($mount_host)
11
ValidateSnapshotHostVolumeGroup ($source_VolumeGroup_unc1)
12
//
$Rep1 = SnapshotHostVolumeGroup ($source_VolumeGroup_unc1, FULLY_ALLOCATED, SAME, WAIT)
13
onerror pauseat E1:
14
//
15
// Mount the replicated volume(s) on a host.
$HV1 = Creat
16
E2:
tvolumegroup(s),andmounttoahost.
eHostVolumeGroup ($source_VolumeGroup_unc1, $Rep1, $mount_host) onerror pauseat
$VG1 = MountEntireVolumeGroup ($HV1, $source_VolumeGroup_unc1, %VGcopyPrex%) onerror
17
pauseat E3:
18
//
19
// Wait for u
ser to initiate rollback.
20 Pause ()
21
//
22
// Rollback.
23
E4: UnmountEntireVolumeGroup ($VG1) onerror pauseat E3:
24
E3: DeleteHostVolumeGroup ($HV1) onerror pauseat E3:
25
//
26
E2: DeleteStorageVolumes ($Rep1) onerror pauseat E2:
27
//
28 Exit (SUCCESS)
29
//
30
// Failure exit - no rollback n eeded.
31
E1: Exit (FAILURE)
HP StorageWorks Replication Solutions Manager 4 .0.1
57
Page 58
Replicate host v
Template summary
A. Locally replicates (copies) the storage volumes that underlie a host volume on an enabled host. B. Pauses the job. C. After continuing, deletes the storage volume copies from the storage system.
Template Options
N um ber of volumes to replicate. Adds commands for each volume.
Su s p end source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Use s napc lo
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Considerations
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
source before replication.
Example
This template was generated to replicate one host volume. No other template options were selected.
olumes (template)
ne instead of snapshot. Generates a template that uses snapclone replication.
58
Job concepts, templates and commands
Page 59
Line
Task
1
// Replicate hos
2
//
3
// Assign some variables that will be used in this job.
4
$source_hostvol_unc1 = SetVariable(%source_hostvol_unc1%)
5
$source_host = SetVariable(%source_host%)
6
//
7
// Validate tha
8
ValidateHostVolume ($source_hostvol_unc1)
9
ValidateSnapshotHostVolume ($source_hostvol_unc1)
10
//
$Rep1 = SnapshotHostVolume ($source_hostvol_unc1, FULLY_ALLOCATED, SAME, WAIT) onerror
11
pauseat E1:
12
//
13
//Waitforusertoinitiaterollback.
Pause ()
14
15
//
16
// Rollback.
17
E2: DeleteStorageVolumes ($Rep1) onerror pauseat E2:
tvolume(s).
t resources are as expected.
18
//
19 E xi t ( S U CCESS)
20
//
21
// Failure exit - no rollback n eeded.
22
E1: Exit (FAILURE)
Replicate host volumes, mount to a host (template)
Template summary
A. Locally replicates (copies) the storage volumes that underlie a host volume on an enabled host. B. Presents the underlying storage volume copies to a second enabled host (creates a new host
volume).
C. Mounts the new host volume on the second enabled host. D. Pauses the job. E. After continuing, unmounts the new host volume from the second enabled host, unpresents and
deletes the storage volume copies from the storage system.
Templa
te options
Number of volumes to replicate. Adds commands for each volume.
Sus pen
for exa
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
d source b efore replication. Adds launch commands for interacting with an enabled host, mple to suspend and resume host application I/O.
HP StorageWorks Replication Solutions Manager 4 .0.1
59
Page 60
Use s napc lon e instead of snapshot. Generates a template that uses snapclone replication.
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Considerations
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
source before replication.
Example
This template was generated to replicate one host volume and mount it on an enabled host. No other template options were selected.
60
Job concepts, templates and commands
Page 61
Line
Task
1
// Replicate hos
2
//
3
// Assign some variables that will be used in this job.
4
$source_hostvol_unc1 = SetVariable(%source_hostvol_unc1%)
5
$source_host = SetVariable(%source_host%)
6
$mount_host = SetVariable(%mount_host%)
7
//
8
// Validate that resources are as expected.
9
ValidateHost ($mount_host)
10
ValidateHostVolume ($source_hostvol_unc1)
11
ValidateSnapshotHostVolume ($source_hostvol_unc1)
12
//
$Rep1 = SnapshotHostVolume ($source_hostvol_unc1, FULLY_ALLOCATED, SAME, WAIT) onerror
13
pauseat E1:
14
//
15
// Mount the replicated volume(s) on a host.
16
PresentSto
tvolume(s),andmounttoahost.
rageVolumes ($Rep1, $mount_host) onerror pauseat E2:
17
DiscoverDiskDevices ($mount_host, $Rep1) onerror continue
$HV1 = CreateHostVolumeFromDiskDevices ($source_hostvol_unc1, $Rep1, $mount_host) onerror
18
pauseat E2:
19
$MP1 = MountHostVolume ($HV1, %mount_point1%) onerror pauseat E3:
20
//
21
//Waitforusertoinitiaterollback.
22 Pause ()
23
//
24
// Rollback.
25
E4: UnmountHostVolume ($MP1) onerror pauseat E4:
26
E3: DeleteHostVolume ($HV1) onerror pauseat E3:
27
//
28
E2: DeleteStorageVolumes ($Rep1) onerror pauseat E2:
29
//
30 Exit (SUCCESS)
31
//
32
// Failure exit - no rollback n eeded.
33
E1: Exit (FAILURE)
HP StorageWorks Replication Solutions Manager 4 .0.1
61
Page 62
Replicate host v
Template summary
Involves ve enabled hosts, EH1 through EH5*.
A. Locally replicates (copies) the storage volumes that underlie a host volume on an EH1. B. Presents the underlying storage volume copies to EH2 (creates a new host volume). C. MountsthenewhostvolumeonEH2,launchesabackupprocessonEH3,andwaitsforthe
process to complete. After completion, unmounts and deletes the new host volume from EH2.
D. Mounts the new host volume on EH4, launches a backup process on EH5, and waits for the
process to complete. After completion, unmounts and deletes the new host volume from EH4.
E. Unpresents and deletes the storage volume copies from the storage system.
* EH1 though EH5 are labels in the summar y only. They are not variables in the template.
olumes, mount to a host, then to a different host (template)
Template op
Number of volumes to replicate. Adds commands for each volume.
Suspend sou
Use snapclone instead of snapshot. Generates a template that uses snapclone replication.
Include e-mail notication. Adds a comma nd for e-ma il notication of the job instance status.
Comments
Linux. Do not use this template with Linux volume groups.
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
Example
This template was generated to replicate one host volume and mount it on two d ifferent enabled hosts. No other
Line
1
2
3
tions
rce before replication. Adds launch commands for interacting with an enabled host,
for exampl
See SetNot
source before replication.
Task
// Replicate host volume(s), mount to a host, then to a different host.
//
// Assign some variables that will be used in this job.
e to suspend and resume host application I/O.
icationPolicy.
template options were selected.
4
5
6
7
8
9
10
11
12
62
e_hostvol_unc1 = SetVariable(%source_hostvol_unc1%)
$sourc
$source_host = SetVariable(%source_host%)
$mount_host1 = SetVariable(%mount_host1%)
$launch_host_name = SetVariable(%launch_host_name%)
$mount_host2 = SetVariable(%mount_host2%)
//
idatethatresourcesareasexpected.
// Val
ValidateHost ($launch_host_name)
ValidateHost ($mount_host2)
Job concepts, templates and commands
Page 63
13
ValidateHost ($mount_host1)
14
ValidateHostVolume ($source_hostvol_unc1)
15
ValidateSnapshotHostVolume ($source_hostvol_unc1
16
//
$Rep1 = SnapshotHostVolume ($source_hostvol_unc1, FULLY_ALLOCATED, SAME, WAIT) onerror
17
pauseat E1:
18
//
19
// Mount the replicated volume(s) on a host.
20
PresentStora
21
DiscoverDiskDevices ($mount_host1, $Rep1) onerror continue
$HV1 = CreateHostVolumeFromDiskDevices ($source_hostvol_unc1, $Rep1, $mount_host1) onerror
22
pauseat E2:
23
$MP1 = MountHostVolume ($HV1, %mount_point1%) onerror pauseat E5:
24
//
25
//Launchabackupprocessonahost.
26
Launch ($la
27
//
28
// Unmount the volume(s).
29
E6: UnmountHostVolume ($MP1) onerror pauseat E6:
30
E5: DeleteHostVolume ($HV1) onerror pauseat E5:
31
//
32
//
33
PresentStorageVolumes ($Rep1, $mount_host2) onerror pauseat E2:
34
DiscoverDiskDevices ($mount_host2, $Rep1) onerror continue
$HV2 = CreateHostVolumeFromDiskDevices ($source_hostvol_unc1, $Rep1, $mount_host2) onerror
35
pauseat E2:
geVolumes ($Rep1, $mount_host1) onerror pauseat E2:
unch_host_name,%command_line%,"",WAIT,"0")onerrorpauseatE6:
36
$MP2 = MountHostVolume ($HV2, %mount_point2%) onerror pauseat E3:
37
//
38
// Launch
39
Launch($launch_host_name,%command_line%,"",WAIT,"0")onerrorpauseatE4:
40
//
41
//Waitforusertoinitiaterollback.
Pause (
42
43
//
44
// Rollback.
45
E4: UnmountHostVolume ($MP2) onerror pauseat E4:
46
E3: DeleteHostVolume ($HV2) onerror pauseat E3:
47
E2: Dele
48
//
abackupprocessonahost.
teStorageVolumes ($Rep1) onerror pauseat E2:
HP StorageWorks Replication Solutions Manager 4 .0.1
63
Page 64
49 Exit (SUCCESS
50
//
51
// Failure exit - no rollback needed.
52 E 1: E xit (FAI LURE
Replicatehostvolumesviapreallocatedreplication, mount to a host (template)
Template summary
A. Disables (ushes)thewritecacheofthestoragevolumesthatunderlieahostvolumeonan
enabled host.
B. Locally replicates (copies) the storage volumes that underlie the host volume to containers. C. Re-enablesthewritecacheofthesourcestoragevolumesthatunderliethehostvolume. D. Waits for the container copies to become storage volume copies and be discovered. E. Presents the underlying storage volume copies to a second enabled host (creates a new host
volume group).
F. Mounts the new host volume on the second enabled host. G. Pauses the job. H. After continuing, unmounts the new host volume from the second enabled host, unpresents and
deletes the storage volume copies from the storage system.
I. Converts the storage volume copies back into containers.
NOTE:
This template cannot be used with some older versions of controller software.
Template options
Number of volumes to replicate. Adds commands for each volume.
S uspend source before replication. Adds launch com mands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
Use snapclone instead of snapshot. Generates a template that uses preallocated snapclone
replication.
Include e-mail notication. Adds a comma nd for e-ma il notication of the job instance status.
See SetNoticationPolicy.
Comments
This template cannot be used with some older versions of controller software.
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
source before replication.
Example
This template was generated to replicate one host volume. No other template options were selected.
Line
Task
1
// Replicate host volume(s) via pre-allocated replication, and mount to a host.
2
//
64
Job concepts, templates and commands
Page 65
3
// Assign some variables that will be used in this job.
4
$source_hostvo
5
$source_host = SetVariable(%source_host%
6
$mount_host = SetVariable(%mount_host%)
7
//
8
// Validate that resources are as expected.
9
ValidateHost ($source_host)
10
ValidateHost
11
ValidateHostVolume ($source_hostvol_unc1
12
//
13
// Begin ushing the cache on the host volume(s).
SetHostVolumeWriteCacheMode ($source_hostvol_unc1, WRITE_CACHE_DISABLED, NOWAIT) onerror
14
pauseat E1:
15
//
16
// Wait for th
17
WaitForHostVolumeWriteCacheFlush ($source_hostvol_unc1) onerror pauseat E1:
18
//
l_unc1 = SetVariable(%source_hostvol_unc1%)
($mount_host)
ecacheush to complete.
19 D O {
$Rep1 = SnapshotHostVolumeToContainersInManagedSet ($source_hostvol_unc1,
20
%dest_container_set1%, FULLY_ALLOCATED, NOWAIT) onerror pauseat E1:
21
//
22
}ALWAYS{
23
// Restore the writeback cache on the host volume(s).
SetHostVolumeWriteCacheMode ($source_hostvol_unc1, WRITE_CACHE_ENABLED, NOWAIT) onerror
24
continue
25
//
}
26
27
//
28
// Wait for replicated storage to appear.
29
WaitForStorageVolumesDiscovery ($Rep1 ) onerror pauseat E2:
30
//
31
// Mount th
32
PresentStorageVolumes ($Rep1, $mount_host) onerror pauseat E2:
33
DiscoverDiskDevices ($mount_host, $Rep1) onerror continue
$HV1 = CreateHostVolumeFromDiskDevices ($source_hostvol_unc1, $Rep1, $mount_host) onerror
34
pauseat E2:
35
$MP1 = MountHostVolume ($HV1, %mount_point1%) onerror pauseat E3:
36
//
e replicated volume(s) on a host.
37
// Wait f
or user to initiate rollback.
38 Pause ()
HP StorageWorks Replication Solutions Manager 4 .0.1
65
Page 66
39
//
40
// Rollback.
41
E4: UnmountHostVolume ($MP1) onerror pauseat E4:
42
E3: DeleteHostVolume ($HV1) onerror pauseat E3:
43
//
44
E2: DeleteStorageVolumesInManagedSet (%dest_container_set1%) onerror pauseat E2:
45
//
Exit (SUCCESS)
46
47
//
48
// Failure exit - no rollback needed.
49 E1 : Exit (FAIL
URE)
Replicate host volume, mount components to a host (template)
Template summary
A. Locally rep B. Presents the underlying storage volume copies to a second enabled host (creates a new host
volume).
C. Mounts a co D. Pauses the job. E. After continuing, unmounts the component from the second enabled host, unpresents and deletes
the storage volume copies from the storage system.
Template options
Number of components to mount. Adds comm ands for each component.
Su s p end source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
Use s napc lon e instead of snapshot. Generates a template that uses snapclone replication.
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Considerations
Tru64 UNIX. When replicating AdvFS volumes that have heavy I/O, select the option Suspend
source before replication.
licates (copies) the storage volumes that underlie a host volume on an enabled host.
mponent in the new host volume on the second enabled host.
Example
This template was generated to locally replicate and mount one host volume. No other template options were selected.
66
Job concepts, templates and commands
Page 67
Line
Task
1
// Replicate a ho
2
//
3
// Assign some variables that will be used in this job.
4
$mount_host = SetVariable(%mount_host%)
5
$source_host = SetVariable(%source_host%)
6
$source_hostvol_unc1 = SetVariable(%source_hostvol_unc1%)
7
//
8
// Validate that resources are as expected.
9
ValidateHost ($mount_host)
10
ValidateHostVolume ($source_hostvol_unc1)
11
ValidateSnapshotHostVolume ($source_hostvol_unc1)
12
//
$Rep1 = SnapshotHostVolume ($source_hostvol_unc1, FULLY_ALLOCATED, SAME, WAIT) onerror
13
pauseat E1:
14
//
15
// Mount the replicated volume(s) on a host.
16
PresentSto
st volume, and mount slices/partitions/LVs to a host.
rageVolumes ($Rep1, $mount_host) onerror pauseat E2:
17
DiscoverDiskDevices ($mount_host, $Rep1) onerror continue
$HV1 = CreateHostVolumeFromDiskDevices ($source_hostvol_unc1, $Rep1, $mount_host) onerror
18
pauseat E2:
19
$MP1 = MountHostVolume ($HV1, %mount_point1%) onerror pauseat E3:
20
//
21
//Waitforusertoinitiaterollback.
22 Pause ()
23
//
24
// Rollback.
25
E4: UnmountHostVolume ($MP1) onerror pauseat E4:
26
E3: DeleteHostVolume ($HV1) onerror pauseat E3:
27
//
28
E2: DeleteStorageVolumes ($Rep1) onerror pauseat E2:
29
//
30 Exit (SUCCESS)
31
//
32
// Failure exit - no rollback n eeded.
33
E1: Exit (FAILURE)
HP StorageWorks Replication Solutions Manager 4 .0.1
67
Page 68
Replicate raw st
Template summary
A. Locally replicates (copies) raw storage volumes. B. Presents the storage volume copies to an enabled host (creates a raw host volume). C. Pauses the job. D. After continuing, removes the raw host volume from the enabled host. E. Unpresents and deletes the storage volume copy from the storage system.
Template options
Number of vo
Use s napc lon e instead of snapshot. Generates a template that uses snapclone replication.
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNot
Example
This template was generated to locally replicate one storage volume. No other template options were selected.
orage volumes mount (raw) to a host (template)
lumes to replicate. Adds commands for each volume.
icationPolicy.
68
Job concepts, templates and commands
Page 69
Line
Task
1
// Replicate raw
2
//
3
// Assign some variables that will be used in this job.
4
$source_storvol_unc1 = SetVariable(%source_storvol_unc1%)
5
$dest_storvol1 = SetVariable(%dest_storvol1%)
6
$mount_host = SetVariable(%mount_host%)
7
//
8
// Validate that resources are as expected.
9
ValidateHost ($mount_host)
10
ValidateStorageVolume ($source_storvol_unc1)
11
ValidateSnapshotStorageVolume ($source_storvol_unc1)
12
//
$Rep1 = SnapshotStorageVolume ($source_storvol_unc1, FULLY_ALLOCATED, SAME, $dest_storvol1,
13
WAIT) onerror pauseat E1:
14
//
15
// Create disk device(s) on a host.
16
CreateDisk
storage volume(s), and mount to a host.
Device ($Rep1, $mount_host, %LUN%, READ_WRITE) onerror pauseat E2:
17
//
18
//Waitforusertoinitiaterollback.
19 P a u se ()
20
//
21
// Rollback.
22
E3: RemoveD
23
//
24
E2: DeleteStorageVolume ($Rep1) onerror pauseat E2:
25
//
26 Exit (SUCCESS)
27
//
28
// Failure
29
E1: Exit (FAILURE)
iskDevice ($Rep1, $mount_host) onerror pauseat E2:
exit - no rollback needed.
Replicate storage volumes ( template)
Template summary
A. Locally B. Pauses the job. C. After continuing, deletes the storage volume copies from the storage system.
replicates (copies) storage volumes.
HP StorageWorks Replication Solutions Manager 4 .0.1
69
Page 70
Template options
N um ber of volumes to replicate. Adds commands for each volume.
Su s p end source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Use s napc lon e instead of snapshot. Generates a template that uses snapclone replication.
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Considerati
Tru64 UNIX. When replicating virtual disks with AdvFS volumes that have heavy I/O, select
Example
This template was generated to replicate one storage volume. No other template options were selected.
Line
ons
the option Suspend source before replication.
Task
1
// Replicate storage volume(s).
2
//
3
// Assign some variables that will be used in this job.
4
$source_storvol_unc1 = SetVariable(%source_storvol_unc1%)
5
$dest_sto
6
//
7
//Validatethatresourcesareasexpected.
8
ValidateStorageVolume ($source_storvol_unc1
9
ValidateSnapshotStorageVolume ($source_storvol_unc1
10
//
$Rep1 = SnapshotStorageVolume ($source_storvol_unc1, FULLY_ALLOCATED, SAME, $dest_storvol1,
11
WAIT) on error pauseat E1 :
rvol1 = SetVariable(%dest_storvol1%)
12
//
13
//Waitforusertoinitiaterollback.
Pause ()
14
15
//
16
// Rollback.
17
E2: Dele
18
//
19 E xi t ( S U CCESS
20
//
21
// Failure exit - no rollback needed.
22 E1: Exit (FAILURE)
70
Job concepts, templates and commands
teStorageVolume ($Rep1) onerror pauseat E2:
Page 71
Replicate stor
age volumes via preallocated replication (template)
Template summary
A. Disables (ushes)thewritecacheofastoragevolume. B. Locally replicates (copies) the storage volume to a container. C. Re-enablesthewritecacheofthestoragevolume.
NOTE:
This template cannot be used with some older versions of controller software.
Template options
Number of volumes to replicate. Adds commands for each volume.
Suspend source before replication. Adds launch commands for interacting with an enabled host,
for example to suspend and resume host application I/O.
Use snapclone instead of snapshot. Generates a template that uses preallocated snapclone
replication.
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Considerations
Tru64 UNIX. When replicating virtual disks with AdvFS volumes that have heavy I/O, select
the option Suspend source before replication.
Example
This template was generated to replicate one storage volume. No other template options were selected.
HP StorageWorks Replication Solutions Manager 4 .0.1
71
Page 72
Line
Task
1
// Replicate sto
2
//
3
// Assign some variables that will be used in this job.
4
$source_storvol_list = SetListVariable(%source_storvol_list%)
5
$dest_container_list = SetListVariable(%dest_container_list%)
6
//
7
// Validate tha
8
ValidateStorageVolumes ($source_storvol_list)
9
//
10
// Begin ushing the c ache on the storage volume(s).
SetStorageVolumesWriteCacheMode ($source_storvol_list, WRITE_CACHE_DISABLED, NOWAIT)
11
onerror pauseat E1:
12
//
13
// Wait for the
14
WaitForStorageVolumesWriteCacheFlush ($source_storvol_list) onerror pauseat E1:
15
//
rage volume(s) via pre-allocated replication.
tresourcesareasexpected.
cache ush to complete.
16 D O {
$Rep1 = SnapshotStorageVolumesToContainers ($source_storvol_list, $dest_container_list,
17
FULLY_ALLOCATED, NOWAIT) onerror pauseat E2:
18
//
19
}ALWAYS{
20
// Restore the writeback cache on the storage volume(s).
SetStorageVolumesWriteCacheMode ($source_storvol_list, WRITE_CACHE_ENABLED, NOWAIT)
21
onerror continue
22
//
}
23
24
//
25
//Waitforusertoinitiaterollback.
26 Pause ()
27
//
28
E2: DeleteStorageVolumes ( $Rep1 ) onerror pauseat E2:
29
//
30 Exit (SUCCESS)
31
//
32
// Failure exit - no rollback needed.
33
E1: Exit (FAILURE
72
Job concepts, templates and commands
Page 73
Replicate O racl
Template summary
A. Create a repository that contains the desired database components. B. Quiesce the Oracle database by putting it in ‘hot backup’ mode. C. Replicate the tablespace(s). D. Put the database back into normal operating mode. E. Pause. F. Delete the storage volume(s). G. Delete the repository.
e tablespaces (template)
Template op
Use s napclone instead of snapshot. Generates a template that uses s napclone replication.
Include e-m
Keep replicas. Generates a template that does not include a pause and rollback section for
Example
This template was generated to replicate Oracle tablespaces, with no template options selected.
Line
1
2
3
4
5
6
7
8
9
tions
ail notication. Adds a command for e -ma il notication of the job instance status.
See SetNoticationPolicy.
deleting t
he replicas.
Task
// Replicate Oracle tablespace(s).
//
// Assign
$source_database_unc = SetVariable(%source_database_unc%)
//
// Create a repository of the desired components.
$repository = CreateOracleRepository ($source_database_unc) onerror pauseat E1:
// Add the desired tablespaces.
AddOracleTablespacesToRepository($repository, %unc_tablespace_names%) onerror pauseat E2:
some variables that will be used in this job.
10
//
11
// Put the database in ’hot backup’ mode.
12
SetOrac
13
//
DO {
14
15
// Repli
SnapshotOracleUsingRepository ($repository, FULLY_ALLOCATED, SAME, ORACLE_TABLESPACE,
16
NOWAIT) onerror pauseat E2:
17
//
18
}ALWAYS{
19
// Put the database back into normal mode.
leModeUsingRepository ($repository, TSBACKUP) onerror pauseat E2:
cate the items in the repository.
HP StorageWorks Replication Solutions Manager 4 .0.1
73
Page 74
20
SetOracleModeUsingRepository ($repository, TSONLINE)
}
21
22
//
//NOTE:PleaseremovethearchivelogleSwitch,Add,andSnapcommandsbelowifthisjobisnot
23
backing up archive log les
24
//
25
// Force a log switch to get the most current archive logs.
26
SwitchOracleArchiveLogFilesUsingRepository ( $repository ) onerror pauseat E3:
27
// OPTION: Add the a rchive logs
28
AddOracleArchiveLogFilesToRepository($repository) onerror pauseat E3:
29
// Replicate the items in the repository.
SnapshotOracleUsingRepository ($repository, FULLY_ALLOCATED, SAME, ORA-
30
CLE_ARCHIVE_LOG_FILE, NOWAIT) onerror pauseat E3:
31
//
32
//Waitforusertoinitiaterollback.
33 Pause ()
34
//
35
// Rollback.
36
E3: DeleteStorageVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E3:
37
//
38
// Delete the repository.
39
E2: DeleteO
40
//
Exit (SUCCESS)
41
42
//
43
// Failure exit - no rollback needed.
44 E1: Exit (FAILURE)
racleRepository ($repository) onerror pauseat E2:
Replicate Oracle tablespaces, mount to a host (template)
Template s
ummary
A. Create a repository that contains the desired database components. B. Quiesce t C. Replicate the tablespace(s). D. Put the database back into normal operating mode. E. Mount th F. Pause. G. Delete the mounted host volume(s). H. Delete t I. Delete the repository.
he Oracle database by putting it in ‘hot backup’ mode.
e host volume(s) on a host.
he storage volume(s).
74
Job concepts, templates and commands
Page 75
Template options
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
Use s napclone instead of snapshot. Generates a template that uses s napclone replication.
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Keep replicas. Generates a template that does not include a pause and rollback section for
deleting the replicas.
Example
This template was generated to replicate Oracle tablespaces, with no template options selected.
Line
Task
1
// Replicate Oracle tablespace(s), and mount the volumes to a host.
2
//
3
// Assign some variables that will be used in this job.
4
$source_database_unc = SetVariable(%source_database_unc%)
5
$mount_host = SetVariable(%mount_host%)
6
//
7
// Create a repository of the desired components.
8
$repository = CreateOracleRepository ($source_database_unc) onerror pauseat E1:
9
// Add the d
10
AddOracleTablespacesToRepository($repository, %unc_tablespace_names%) onerror pauseat E2:
11
//
12
// Put the database in ’hot backup’ mode.
13
SetOracleModeUsingRepository ($repository, TSBACKUP) onerror pauseat E2:
14
//
15
DO {
16
// Replicate the items in the repository.
SnapshotOracleUsingRepository ($repository, FULLY_ALLOCATED, SAME, ORACLE_TABLESPACE,
17
NOWAIT) onerror pauseat E2:
18
//
19
}ALWAYS{
20
// Put the database back into normal mode.
21
SetOracleModeUsingRepository ($repository, TSONLINE)
}
22
23
//
// NOTE:
24
backing up archive log les.
esired tablespaces.
Please remove the archive log leSwitch,Add,andSnapcommandsbelowifthisjobisnot
25
//
26
// Force a log switch to get the most current archive logs.
27
SwitchO
racleArchiveLogFilesUsingRepository ( $repository ) onerror pauseat E3:
HP StorageWorks Replication Solutions Manager 4 .0.1
75
Page 76
28
// OPTION: Add the a rchive logs
29
AddOracleArchi
30
// Replicate the items in the repository.
SnapshotOracleUsingRepository ($repository, FULLY_ALLOCATED, SAME, ORA-
31
CLE_ARCHIVE_LOG_FILE, NOWAIT) onerror pauseat E3:
32
//
33
// Mount the replicated volume(s) on a host.
34
CreateHostVolumesUsingRepository ($repository, $mount_host) onerror pauseat E3:
35
SetMountPoin
36
$MountedHVs = MountHostVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E4:
37
//
38
//Waitforusertoinitiaterollback.
39 Pause ()
40
//
41
// Rollback.
42
E5: UnmountHostVolumesUsingRepository ($repository, REPLICATED)
43
E4: DeleteHostVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E4:
44
E3: DeleteStorageVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E3:
45
//
veLogFilesToRepository($repository) onerror pauseat E3:
tsPrexInRepository ($repository, %prex%) onerror pauseat E4:
46
// Delete the repository.
47
E2: DeleteO
48
//
Exit (SUCCESS)
49
50
//
51
// Failure exit - no rollback needed.
52
E1: Exit (FAILURE)
racleRepository ($repository) onerror pauseat E2:
Replicate Oracle tablespaces via preallocatted replication, mount to a host (template)
Template summary
A. Create a r B. Quiesce the Oracle database by putting it in ‘hot backup’ mode. C. Flush the cache on the storage volumes used by the host volumes. D. Replica E. Restore the writeback cache on the storage volumes. F. Put the database back into normal operating mode. G. Mount t H. Pause. I. Delete the mounted host volume(s). J. Conver
epository that contains the desired database components.
te the tablespace(s) into containers.
he host volume(s) on a host.
t the storage volumes ba ck into empty containers.
76
Job concepts, templates and commands
Page 77
K. Delete the repository.
NOTE:
This template cannot be used with some older versions of controller software.
Template options
Launch backup after replication. Adds a launch command for interacting with an enabled host,
for example, to start a tape backup.
Use s napclone instead of snapshot. Generates a template that uses s napclone replication.
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Keep replicas. Generates a template that does not include a pause and rollback section for
deleting the replicas.
Comments
This template cannot be used with some older versions of controller software.
Example
This template was generated to replicate Oracle tablespaces, with no template options selected.
Line
Task
1
// Replicate Oracle tablespace(s) via pre-allocated replication, and mount the volumes to a host.
2
//
3
// Assign some variables that will be used in this job.
4
$source_database_unc = SetVariable(%source_database_unc%)
5
$mount_host = SetVariable(%mount_host%)
6
//
7
// Create a repository of the desired components.
8
$repository = CreateOracleRepository ($source_database_unc) onerror pauseat E1:
9
// Add the desired tablespaces.
10
AddOracleTablespacesToRepository($repository, %unc_tablespace_names%) onerror pauseat E2:
11
//
12
// Put the database in ’hot backup’ mode.
13
SetOracleModeUsingRepository ($repository, TSBACKUP) onerror pauseat E2:
14
//
15
// Begin ushing the cache on the host volume(s).
SetWriteCacheModesUsingRepository ($repository, ORIG INAL, OR ACLE_TABLESPACE,
16
WRITE_CACHE_DISABLED) onerror pauseat E2:
17
//
18 D O {
SnapshotOracleToContainersUsingRepository ($repository, %managed_set_of_containers%,
19
FULLY_ALLOCATED, ORACLE_TABLESPACE, NOWAIT) onerror pauseat E2:
20
//
HP StorageWorks Replication Solutions Manager 4 .0.1
77
Page 78
21 } ALWAYS {
22
// Put the database back into normal mode.
23
SetOracleModeUsingRepository ($repository, TSONLINE)
24
// Restore the writeback cache on the host volume(s).
SetWriteCacheModesUsingRepository ($repository, ORIGINAL, ORACLE_TABLESPACE,
25
WRITE_CACHE_ENABLED)
}
26
27
//
// NOTE: Pleas
28
backing up archive log les.
29
//
30
// Force a log switch to get the most current archive logs.
31
SwitchOracl
32
// OPTION: Add the a rchive logs
33
AddOracleArchiveLogFilesToRepository($repository) onerror pauseat E3:
34
// Begin ushing the cache on the host volume(s).
SetWriteCacheModesUsingRepository ($repository, ORIGINAL, ORACLE_ARCHIVE_LOG_FILE,
35
WRITE_CACHE_DISABLED) onerror pauseat E3
36
//
eremovethearchivelogleSwitch,Add,andSnapcommandsbelowifthisjobisnot
eArchiveLogFilesUsingRepository ( $repository ) onerror pauseat E3:
37 DO {
SnapshotOracleToContainersUsingRepository ($repository, %managed_set_of_containers%,
38
FULLY_ALLOCATED, ORACLE_ARCHIVE_LOG_FILE, NOWAIT) onerror pauseat E3
39
//
40 } ALWAYS {
41
// Restore the writeback cache on the host volume(s).
SetWriteCacheModesUsingRepository ($repository, ORIGINAL, ORACLE_ARCHIVE_LOG_FILE,
42
WRITE_CACHE_ENABLED)
}
43
44
//
45
// Mount the replicated volume(s) on a host.
46
CreateHostVolumesUsingRepository ($repository, $mount_host) onerror pauseat E3:
47
SetMountPointsPrexInRepository ($repository, %prex%) onerror pauseat E4:
48
$MountedHVs = MountHostVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E4:
49
//
59
//Waitforusertoinitiaterollback.
51
Pause (
52
//
53
// Rollback.
54
E5: UnmountHostVolumesUsingRepository ($repository, REPLICATED)
55
E4: DeleteHostVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E4:
78
Job concepts, templates and commands
Page 79
56
E3: DeleteStorageVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E3:
57
//
58
// Delete the repository.
59
E2: DeleteOracleRepository ($repository) onerror pauseat E2:
60
//
61 E xi t ( SU CC E S S
62
//
63
// Failure exit
64 E1: Exit (FAILURE)
- no rollback needed.
RestoreOracletablespaces(template)
Template Sum
Template options
Example
mary
Restores Oracle tablespaces to an enabled host.
A. Use existing repository from previous backup. B. Present the C. Mount the ne
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
This template was generated to restore tablespaces to a different server than the original. No template options w
replicated storage to an enabled host to create new host volumes.
whostvolumesusingaprefix.
ere selected.
HP StorageWorks Replication Solutions Manager 4 .0.1
79
Page 80
Line
Task
1
// Restore Oracl
2
//
3
// Assign some variables that will be used in this job.
4
$repository = SetVariable(%repository_name%)
5
$mount_host = SetVariable(%mount_host%)
6
//
7
// Mount the rep
8
CreateHostVolumesUsingRepository ($repository, $mount_host) onerror pauseat E1:
9
SetMountPointsPrexInRepository ($repository, %prex%) onerror pauseat E2:
10
$MountedHVs =
11
//
12
// Keep the items created by this job. Exit with a Success status.
13 E xi t ( SU CC E S S)
14
//
15
// In case of a failure while running the job, roll back the changes.
16
E2: DeleteHo
17
Exit (SUCCESS)
e tablespace(s) using repository.
licated volume(s) on a host.
MountHostVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E2:
stVolumesUsingRepository ($repository, REPLICATED) onerror pauseat E2:
18
//
19
// Failure exit - no rollback needed.
20
E1: Exit (FAILURE)
Setup Conti
nuousAccess(remotereplicationtemplate)
Template summary
Establishes and congures a D R group pair and initiates remote replication b et ween two sites. The DR group pair contains one storage volume (virtual disk) at the source and destination sites.
A. Creates a DR group pair that contains the source storage volume that is to be remotely
replicated. The source DR group is at site 1. The destination DR group is at site 2.
B. Congures the remote replication with failsafe on unavailable member data protection, I/O
mode, and the destination host I/O access mode.
C. Initiates (resumes) remote replication between the sites. D. Presents the destination storage volume to an enabled host at site 2.
Guidelines apply.
Template options
Inc lude
See SetNoticationPolicy.
e-mail notication. Adds a command for e-mail notication of the job instance status.
Comments
Guidelines apply.
80
Job concepts, templates and commands
Page 81
Example
This template was generated to create one DR group pair.
Line
Task
1
// Setup Contin
2
//
3
// Assign some variables that will be used in this job.
4
$DR_source_array = SetVariable(%DR_source_array%)
5
$DR_dest_array = SetVariable(%DR_dest_array%)
6
$DR_group_name = SetVariable(%DR_group_name%)
7
$DR_source_
8
$dest_host_name = SetVariable(%dest_host_name%)
9
//
10
// Validate that resources are as expected.
11
ValidateHost ($dest_host_name)
12
ValidateStorageSystem ($DR_source_array)
13
ValidateSt
14
ValidateStorageVolume ($DR_source_storvol_unc1)
15
//
$DRG1=Cre
16
SAME, "", "
17
//
uous Access.
storvol_unc1 = SetVariable(%DR_source_storvol_unc1%)
orageSystem ($DR_dest_array)
ateDrGroup ($DR_group_name, $DR_source_storvol_unc1, $DR_dest_array, "", "",
", 0, FALSE) onerror pauseat E1:
18
SetDrGroupFailsafe($DRG1 , %failsafe_mode%) onerror continue
19
SetDrGroupIoMode($DRG1, %io_mode%) onerror continue
20
SetDrGroupDestinationAccess($DRG1, NONE) onerror continue
21
SetDrGroupSuspend($DRG1, RESUMED) onerror continue
22
//
23
// Present destination vdisk to a destination host.
24
WaitDrGroupNormalization ($DRG1
25
// The des
26
// so enter the name of the storage volume manually.
27
//Defaultnameisthesameasthesourcestoragevolume.
28
PresentStorageVolume (%dest_storvol%, $dest_host_name, %lun_number%, READ_WRITE)
29
//
30 Exit (SUCCESS)
31
//
32
// Failure exit - no rollback n eeded.
33
E1: Exit (FAILURE)
t_storvol will be created AFTER the job,
HP StorageWorks Replication Solutions Manager 4 .0.1
81
Page 82
Throttle repli
cation I/O (remote replication template)
IMPORTANT:
Jobs generated by this template are intended to be run only in conjunction with a log merge or full-copy events on a single storage system.
Template summary
Suspends remote replication in non-critical DR group pairs until critical DR group pairs have normalized across the two sites. The DR groups must be source groups on a single storage system.
The terms critical and non-critical used in the template do not refer to the critical operational status. For the purpose of us ing the template, you can consider any DR group to be critical or non-critical.
A. Suspends the remote replication of the non-critical DR group pairs. B. Halts the job (waits) until the critical DR group pairs have normalized across the two sites. C. After normalization is completed, resumes the remote replication in the non-critical D R group
pairs.
Template options
Number of non-c ritical DR groups in the CA conguration. Adds commands for the non-critical
DR groups.
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Example
This template was generated to perform one iteration of throttling I/O for source DR groups on one storage system.
82
Job concepts, templates and commands
Page 83
Line
Task
1
// Throttle repl
2
// so that critical DR groups will have the best performance.
3
//
4
// Assign some v
5
$DR_Group_name_unc1 = SetVariable(%DR_Group_name_unc1%)
6
//
7
// Suspend the non-critical DR group(s).
8
SetDrGroupSuspend ($DR_Group_name_unc1, SUSPENDED) onerror pauseat E1:
9
//
10
// Wait for the c
11
WaitDrGroupNormalization (%critical_DR_Group_name_unc%)
12
//
13
// Resume the non-critical DR group(s).
14
E2: SetDrGroupSuspend ($DR_Group_name_unc1, RESUMED) onerror pauseat E2:
15
//
16 E x it ( S U CC E S S )
17
//
ication I/O on non-critical DR groups,
ariables that will be used in this job.
ritical DR group(s) to normalize.
18
// Failure exit - no rollback n eeded.
19
E1: Exit (FAILURE)
Unmount and delete existing host volumes (template)
Template summary
Unmounts and deletes host volumes.
Template options
Number of v
Include e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Example
This template was generated to unmount and delete one host volume. No other template options were selected.
olumes to unmount and delete. Adds commands for each volume.
HP StorageWorks Replication Solutions Manager 4 .0.1
83
Page 84
Line
Task
1
// Unmount and de
2
//
3
// Assign some variables that will be used in this job.
4
$hostvol_unc1 = SetVariable(%hostvol_unc1%)
5
$host_name = SetVariable(%host_name%)
6
//
7
// Validate tha
8
ValidateHost ($host_name)
9
ValidateHostVolume ($hostvol_unc1)
10
//
11
E1: UnmountHostVolume ($hostvol_unc1)
12
E2: DeleteHostVolume ($hostvol_unc1)
13
//
Exit (SUCCESS)
14
15
//
lete the host volume(s).
tresourcesareasexpected.
Unmount existing host volumes (template)
Template summary
A. Un mounts an existing*hostvolumeonanenabledhost. Existing referstoahostvolumethatis
created by database when this job is run.
B. The underlying storage volume remains presented to the host.
Template options
N um ber of volumes to unmount. Adds commands for each volume.
Inc lude e-mail notication. Adds a command for e-mail notication of the job instance status.
See SetNoticationPolicy.
Example
This tem options were selected.
plate was generated to unmount one host volume on an enabled host. No other template
means other than this job. The volume must exist and be in the replication manager
84
Job concepts, templates and commands
Page 85
Line
Task
1
// Unmount exist
2
//
3
// Assign some variables that will be used in this job.
4
$hostvol_unc1 = SetVariable(%hostvol_unc1%)
5
$host_name = SetVariable(%host_name%)
6
//
7
// Validate tha
8
ValidateHost ($host_name)
9
ValidateHostVolume ($hostvol_unc1)
10
//
11
// Unmount the volume(s).
12
E1: UnmountHostVolume ($hostvol_unc1)
13 E xi t ( SU CC E S S
14
//
Job commands
ing host volume(s) .
t resources are as expected.
)
// (comment)
Adds and identies a comment line in a job. The double slash indicates a comment line.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
//
Comment. Enter your comment text.
Examples
// This job creates daily tape backups
// The next c ommand replicates the sales database
Comments
Associated validation com ma nds.None
Ag ent and license prerequisites.None
Com ma nd result value. None. For a complete list, see command result values.
OS specics.None
Tip. Use blank comment lines visually separate sections of a job.
AddAllO
racleTablespacesToRepository
Adds all applicable tablespaces in a database to a specic repository. The appropriate tablespaces are automat
ically ad ded by reference to the enabled host and database specied by the repository.
HP StorageWorks Replication Solutions Manager 4 .0.1
85
Page 86
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
AddAllOracleT
UNC Oracle repository Name (%oraclerepository_unc_name%). Select or enter the UNC name of the repository to w
ablespacesToRepository ( %oraclerepository_unc_name% )
hich the Oracle tablespaces are to be added.
Examples
AddAllOracleTablespacesToRepository ( "\\HostA2\Catalog 20051214.021405" )
Comments
Associated v
Ag ent and license prerequisites. Requires a host agent. Requires an Oracle-integration license.
C om mand result value. None. For a complete list, see command result values.
OS specics
Therepositorymustalreadyexistorbecreatedbyapreviousstepinthesamejob.
See resource names and UNC formats.
alidation commands. ValidateOracleTablespaces
.None.
AddDrGroupMember
Adds a storage volume to a source DR group and a corresponding storage volume (a remote copy) to a destination DR group.
In other words, this command establishes a remote copy relationship between storage volumes on the source and destination storage arrays.
Syntax an
When init
UNC DR G roup Name (%drgroup_unc_name%). Select or enter the UNC name of the source DR group to which the storage volume is to be added.
UNC Storage Volume Name (%storvol_unc_name%). Select or enter the UNC name of the source storage volume to be added to the source DR group.
Destination Disk Group. Select or enter the UN C name of the disk group on the destination storage system in which the destination storage volume (remote copy) is to be added. If omitted, a default is applied when the job is run.
Destination Storage Volume Name. Enter the name for the destination storage volume (remote c opy). If omitted, the replication manager applies a default when the job is run.
Destination RAID LeveI. Select the redundancy level (Vraid) for the remote copy. Choices are RAID0, RAID1, RAID5, and same. The default value is same.
Exampl
es
Comments
Associated validation command s. ValidateStorageSystem, ValidateStorageVolume
darguments
ially inserted into a job, the command syntax and default arguments are:
AddDrGroupMember ( %drgroup_unc_name%, %storvol_unc_name%, "", "", SAME )
AddDrGroupMember ( "\\ArrayA2\DrGrpPets", "\\ArrayA2\Cats", "\\ArrayB7\DskGrp3", "Cats", SAME )
86
Job concepts, templates and commands
Page 87
Ag ent and license prerequisites. Requires remote replication licenses on the source and
destination storage systems.
Com ma nd result value. None. For a complete list, see command result values.
OS specics.None
The maximum number of virtual disks per DR group is controller software dependent.
See resource names and UNC formats.
AddOracleArchiveLogFilesToRepository
Adds applicable Oracle archived log les to a specic repository. The appropriate les are automatically added by reference to the enabled host and database specied by the repository.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
AddOracleA
UNC Oracle Repository Name (%oraclerepository_unc_name% ). Select or enter the UNC name of the repository
rchiveLogFilesToRepository ( %oraclerepository_unc_name% )
to which the archive log les are to be added.
Examples
AddOracleArchiveLogFilesToRepository ( "\\HostA2\Catalog 20051214.021405" )
Comments
Associat
Ag ent a nd license prerequisites. Requires a host agent. Requires an Oracle-integration license.
Command result value. None. For a complete list of c om m ands and values, see
command r
OS specics.None
The repository must already exist or be created by a previous step in the same job.
See reso
ed validation commands.None
esult values.
urce names and UNC formats.
AddOracleTablespacesToRepository
Adds tablespaces in a database to a specicrepository.
Syntax
and arguments
When in
AddOracleTablespacesToRepository ( %oraclerepository_unc_name%, %oracletablespace_unc_names% )
UNC Oracle Repository Name (%oraclerepository_unc_name% ). Select or enter the UNC name of the Oracle repository to which the tablespaces are to be added.
UNC Oracle Tablespaces N ames (%oracletablespace_unc_names% ). Select or enter the UNC names of the Oracle tablespaces to be added to the repository.
itially inserted into a job, the command syntax and default arguments are:
Examples
AddOracleTablespacesToRepository ( "\\HostA2\Catalog 20051214.021405", "\\HostA2\SYSTEM" )
HP StorageWorks Replication Solutions Manager 4 .0.1
87
Page 88
Comments
Associated validation com m ands.ValidateOracleTablespaces.
Ag ent and license prerequisites. Requires a host agent. Requires an Oracle-integration license.
C om mand result value. None. For a complete list, see command result values.
OS specics.None
Therepositorymustalreadyexistorbecreatedbyapreviousstepinthesamejob.
See sresource names and UNC formats.
AddReplicaT
oReplicaRepository
Adds to a repl
ica repository the storage volume replica (virtual disk replica) that underlies a host volume.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
AddReplicaToReplicaRepository ( %replica_repository_name%, %storvol_unc_name% )
Replica Repository Name (%replica_repository_name%). Select or enter the name of the replica repository to which the storage volume replica is to be added.
UNC Storage Volume Name (%storvol_unc_name%). Select or enter the UNC name of the storage volume replica th
at underlies the host volume.
Examples
AddReplicaToReplicaRepository ( “RR-20070223.015320.588”, "\\ArrayA2\Cats_replica" )
Comments
Associat
Ag ent and license prerequisites. Requires a host agent.
Command result value. None . For a complete list, see command result values.
OS spec i
See resource names and UNC formats.
ed validation commands. ValidateStorageVolume.
cs.
AddReplicasToReplicaRepository
Adds to a replica repository the storage volume replicas (virtual disk replicas)that underlies a host volume.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
AddReplicasToReplicaRepository ( %replica_repository_name%, %storvol_unc_names% )
Replica Repository Name (%replica_repository_name%). Select or enter the name of the replica repository to which the storage volume replicas are to be added.
UNC Storage Volume Names (%storvol_unc_names%). Select or enter the UNC names of the storage volume replicas to be added to the replica repository. See argument list. Or, select a variable used in a prior step that represents the storage volumes.
88
Job concepts, templates and commands
Page 89
Examples
AddReplicasToReplicaRepository ( “RR-20070223.015320.588”, ("\\Array2\Cats1", "\\Array2\Cats2", "\\Array3\Cats3") )
AddReplicasToReplicaRepository ( “RR- 20070223.015320.588”, $my_svol_list )
Comments
Associated validation commands. ValidateStorageVolume, ValidateStorageVolumes.
Ag ent and license prerequisites. Requires a host agent.
Com ma nd result value. N one . For a c omplete list, see command result values.
OS specics.None.
See resource names and UNC formats.
CombineLists
Creates a variable assignment that combines t wo lists. The variable can then be entered in arguments throughout
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
CombineLists ( %list_1%, %list_2% )
a job rather than entering the individual values.
First List (%list_1%). Enter the variable for the rst list.
Second List (%list_2%). Enter the variable for the second list.
Examples
$my_comb = CombineLists ( $my_list1", $my_list2" )
Comments
Associated validation com ma nds.None
Ag ent and license prerequisites.None
Com ma nd result value. None. For a complete list, see command result values.
OS specics.None
To refer to the variable elsewhere in the job, you must enter a variable assignment. See assignments.
Thetwolistvariablesmustbecreatedinstepspriortothestepthatcombinesthem.
ConvertStorageV olumeIntoContainer
rts a storage volume (virtual disk) to a storage container.
Conve
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
ConvertStorageVolumeIntoContainer ( %storvol_unc_name% )
UNC Storage Volume N ame (%storvol_unc_name%). Select or enter the UNC name of the storage volume to be converted to a container.
HP StorageWorks Replication Solutions Manager 4 .0.1
89
Page 90
Examples
ConvertStorageVolumeIntoContainer ( "\\ArrayA2\Cats" )
Comments
Associated validation commands. ValidateStorageVolume
Ag ent and license prerequisites.None
Command resul
OS specics.None
This command cannot be used with some older versions of controller software.
See resource
tvalue. Container name (UNC ). For a complete list, see command result values.
names and UNC formats.
ConvertStorageVolumesInManagedSetIntoContainers
Converts storage volumes (virtual disks) in a managed set into storage containers.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
ConvertSto
Managed set of containers. Select or enter the n am e of the managed set in which the storage volumes (virtual d
rageVolumesInManagedSetIntoContainers ( %managed_set_of_containers% )
isks) are members.
Examples
ConvertStorageVolumesInManagedSetIntoContainers ( "svol_cats" )
Comments
Associated validation commands.None
Ag ent and license prerequisites.None
Command result value. List of container names (UNC). For a complete list, see
command result values.
OS specics.None
This command cannot be used with some older versions of controller software.
See resource names and UNC formats.
Conver
tStorageVolumesIntoContainers
Converts storage volumes (virtual disks) to storage containers.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
rtStorageVolumesIntoContainers ( %storvol_unc_name% )
Conve
List of UNC Storage Volume Names (%storvol_unc_list%). Select or enter the UNC names of storage
es to be converted. See argument lists. Or, select a variable used in a prior step that represents the
volum storage volumes.
90
Job concepts, templates and commands
Page 91
Examples
ConvertStorageVolumesIntoContainers ( ("\\Array2\Cats", "\\Array2\Dogs") )
ConvertStorageVolumesIntoContainers ( $ my_svol_list )
Comments
Associated validation commands. ValidateStorageVolume
Ag ent and license prerequisites.None
Com ma n d result value. List of container names (UNC). For a c omplete list, see command result values.
Com ma nd result value. None. For a complete list, see command result values.
OS specics.None
This command cannot be used with some older versions of controller software.
See resource names and UNC formats.
ConvertStorageVolumesIntoContainersUsingRepository
Converts each storage volume that underlies an Oracle database to a container. The appropriate storage volumes are automatically converted by reference to the enabled host and database specied by the repositor
Syntax and arguments
y.
When initially inserted into a job, the command syntax and default arguments are:
ConvertStorageVolumesIntoContainersUsingRepository ( %oraclerepository_unc_name% )
UNC Oracle Repository Name (%oraclerepository_unc_name% ). Select or enter the UNC name of the repository the enabled host and database whose underlying storage volumes are to be converted to contain
ers.
Examples
ConvertStorageVolumesIntoContainersUsingRepository ( "\\HostA2\Catalog 20051214.021405" )
Comments
Associ
Ag ent a nd license prerequisites. Requires a host agent. Requires an Oracle-integration license.
Com ma n d result value. List of container names (UNC). For a c omplete list, see
OS specics.None
The repository must already exist or be created by a previous step in the same job.
This c
See resource names and UNC formats.
ated validation commands.None
comma
nd result values.
ommand cannot be used with some older versions of controller software.
CreateContainer
Creates a storage container on a storage system.
ax and a rguments
Synt
initially inserted into a job, the command syntax and default arguments are:
When
HP StorageWorks Replication Solutions Manager 4 .0.1
91
Page 92
CreateContainer ( %storvol_name%, %size%, RAID0, %diskgroup_unc_name% )
Container Name
(%storvol_name%). Enter a name for the container that is to be created.
Size (GB). Enter a size (GB) for the container.
Raid Level. Select a redundancy level for the container.
UNC Disk Group N
ame. Select or enter the UNC name of the disk group in which the container is to
be created.
Examples
CreateContainer ( "\\ArrayA2\CatsContainer", 1, RAID0, "\\ArrayA2\DskGrp4" )
Comments
Associated validation commands.None
Ag ent and license prerequisites.None
Command resu
lt value. Container name (UNC). For a complete list, see command result values.
OS specics.None
This command cannot be used with some older versions of controller software.
See resourc
e names and UNC formats.
CreateContainerForHostDiskDevice
Creates a managed set of storage containers that correspond to the virtual disks that underlie a host disk device.
Syntax and
When initi
CreateContainerForHostDiskDevice ( %hoststorvol_unc_name%, %managed_set_name% )
UNC Host Disk Device Name (%hoststorvol_unc_name%). Select or enter the UNC name of the host disk deviceforwhichthestoragecontainersaretobecreated.
Managed Set Name (%ma naged_set_name%). Select or enter a name for the managed set in which the storage containers are to be added.
Examples
AIX
HP-UX
Linux
OpenVMS
Solaris
Tru64 UNIX
Windows
Comments
Associated validation commands.None.
Ag ent and license prerequisites. Requires a host agent.
arguments
ally inserted into a job, the command syntax and default arguments are:
CreateContainerForHostDiskDevice ( “\\HostA2\/dev/dsk/hd1”, "hvol_cats" )
CreateCo
CreateContainerForHostDiskDevice ( “\\HostA2\/dev/sda3”, "hvol_cats" )
CreateContainerForHostDiskDevice ( “\\HostA2\$1$DGA2:”, " hvol_cats" )
CreateCo
CreateContainerForHostDiskDevice ( “\\HostA2\/dev/disk/dsk100c”, "hvol_cats" )
CreateContainerForHostDiskDevice ( “\\HostA2\Disk3”, "hvol_cats" )
ntainerForHostDiskDevice ( “\\HostA2\/dev/dsk/c2t0d2”, "hvol_cats" )
ntainerForHostDiskDevice ( “\\HostA2\/dev/dsk/c0t5d0s6”, "hvol_cats" )
92
Job concepts, templates and commands
Page 93
Com ma nd result value. Name of managed set of containers. For a complete list, see command result values.
OS specics. Yes. See examples above.
See resource names and UNC formats.
CreateContainersForHostVolume
Creates a mana volume.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
ged set of storage containers that correspond to the virtual disks that underlie a host
Examples
CreateConta
inersForHostVolume ( %hostvol_unc_name%, %managed_set_name% )
UNC Host Volume Name (%hostvol_unc_name%). SelectorentertheUNCnameofthehostvolumefor which the sto
Managed Set N
ragecontainersaretobecreated.
ame (%managed_set_name%). Select or enter a n am e for the managed set in which the
storage containers are to be added.
These examples show host volume mount points. Device names can also be used.
AIX
HP-UX
Linux
OpenVMS
Solaris
Tru64 UNIX
Windows
Drive
Drive & folders CreateContainersForHostVolume ( "\\HostA2\E:\pets\cats", "hvol_cats" )
CreateContainersForHostVolume ( "\\HostA2\/home/cats", "hvol_cats" )
CreateContainersForHostVolume ( "\\HostA2\/users/cats", "hvol_cats" )
CreateContainersForHostVolume ( "\\HostA2\/var/cats", "hvol_cats" )
CreateContainersForHostVolume ( "\\HostA2\CATS", "hvol_cats" )
CreateContainersForHostVolume ( "\\HostA2\/usr/cats", "hvol_cats" )
CreateContainersForHostVolume ( "\\HostA2\dom01#fset1", "hvol_cats" )
CreateCon
tainersForHostVolume ( "\\HostA2\E:\", "hvol_cats" )
Comments
Associated validation commands. ValidateHostVolume.
Ag ent and license prerequisites. Requires a host agent.
Com ma nd result value. None. For a complete list, see command result values.
OS specics. Yes. See examples above.
This command cannot be used with some older versions of controller software.
See resource names and UNC formats.
CreateContainersForHostVolumeGroup
Creates a managed set of storage containers that correspond to the virtual disks that underlie a host volume group.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
HP StorageWorks Replication Solutions Manager 4 .0.1
93
Page 94
CreateContainersForHostVolumeGroup ( %hostvolgroup_unc_name%, %managed_set_name% )
UNC Host Volume
volume group f
Managed Set Na
storage containers are to be added.
Examples
Comments
Associated validation commands.None.
Ag ent and license prerequisites. Requires a host agent.
Command re
OS specics.Yes.Seeexamplesabove.
See resour
Group Name (%hostvolgroup_unc_name%). SelectorentertheUNCnameofthehost
or which the storage containers are to be created.
me (%managed_set_name%). Select or enter a nam e for the managed set in which the
AIX
HP-UX
Linux
OpenVMS
Solaris
Tru64 UNIX
Windows Not applicable
CreateContainersForHostVolumeGroup ( "\\HostA2\/home/cats_vg", "hvol_cats" )
CreateContainersForHostVolumeGroup ( "\\HostA2\/users/cats_vg", "hvol_cats" )
CreateContainersForHostVolumeGroup ( "\\HostA2\/var/cats_vg”, "hvol_cats" )
Not applicab
CreateContainersForHostVolumeGroup ( "\\HostA2\/usr/cats_vg”, "hvol_cats" )
CreateContainersForHostVolumeGroup ( " \\HostA2\dom01#fset1”, "hvol_cats" )
sult value. Managed set name of virtual disk containers. For a complete list, see
command result values.
ce names and UNC formats.
le
CreateDiskDevice
Instructs an enabled host to create a raw host volume (disk device) from a storage volume (virtual disk).
The storage volume (virtual disk) is presented to the enabled host and a host bus scan is performed to identify the presented storage.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
CreateDiskDevice ( %storvol_unc_name%, %host_name%, 0, READ_WRITE )
Virtual Dis k Name (%storvol_unc_name%). Select or enter the UNC name of the storage volume to be presented to the host.
Host Name (%host_name%). Select or enter the name or IP address of the host to which the storage volume is to be presented.
LUN Number. Select or enter a host LUN for the presented storage volume. The LUN cannot already be in use when the job is run.
Access Type. Select or enter the type of host I/O to allow with the presented storage volume. Choices are none, read,andread_write.
Examples
CreateDiskDevice ( "\\ArrayA2\Cats", "HostA2", 12, READ_WRITE )
94
Job concepts, templates and commands
Page 95
Comments
Associated validation commands. ValidateHost, ValidateStorageVolume
Ag ent and license prerequisites. Requires a host agent.
Com ma nd result value. None. For a complete list, see command result values.
OS specics.None
See resource names and UNC formats.
This command may also cause other devices to appear on the host when its bus is scanned.
CreateDrGro
Creates a DR g DR group.
up
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
CreateDrGr 0, FALSE )
DR Group Name (%drgroup_name%). Enter a name for the new source DR group.
UNC Storage Volume Name (%storvol_unc_name%). Select or enter the UNC name of a source storage
volume to b
Destinati
storage system on which the destination DR group will be created.
Destination Disk G roup. Select or enter the name of the disk group on the destination storage system in which the destination storage volume (remote copy) will be created. If omitted, a default is applied when the job is run.
Destinat
If you do when the job is run.
Destination RAID Level. Select or enter the redundancy level for the remote copy. Choices are RAID0, RAID1, R
Source Log Disk Group. Select or enter the name of the disk group in which to create the source storage volume (virtual disk). If omitted, a default is applied when the job is run.
Destination Log Disk Group. Select or enter the name of the disk group in which to create the destination storage volume (remote copy). If omitted, a default is applied when the job is run.
oup ( %drgroup_name%, %storvol_unc_name%, %dest_storsys_name%, "", "", SAME, "", "",
e included in the source DR group. The storage volume must be an existing disk.
on Storage System Name (%dest_storsys_name%). Select or enter the name of destination
ion Storage Volume Name. Enter the name for the destination storage volume (remote copy).
not enter a name, the same name as the source storage volume is automatically assigned
AID5, and same.
roup pair and adds one storage volume (virtual disk) to the source and destination
Maximum Log Disk Size (MB). Enter a maximum size for the log disk. An entry of zero indicates no preference for the maximum size.
AutoSu
spend. Select or enter a mode. Choices are true (enabled) and false (disabled).
Examples
CreateDrGroup("DrGrpPets","\\ArrayA2\Cats","ArrayB7","","",SAME,"","",10,FALSE)
Comments
Assoc
Ag ent and license prerequisites. Requires remote replication licenses on the source and
Com m
OS specics.None
iated validation commands. ValidateStorageSystem, ValidateStorageVolume
destination storage systems.
and result value. DR group nam e (simple). For a complete list, see command result values.
HP StorageWorks Replication Solutions Manager 4 .0.1
95
Page 96
Guidelines apply.
The maximum number of virtual disks per DR group and other properties are controller software
dependent.
Values for the following properties can be specied in the CreateDrGroup command. These
properties can be changed later, in another job, by using the comma nds shown.
Default values
Property
Auto suspend False (disabled) False (disabled) SetDrGroupAutoSuspend
Maximum log disk size
Name (of DR gr
* The name of the source DR group is speciedintheCreateDrGroupcommand.Bydefaultthenameforthe destination DR group is the same as the source.
oup)
Source Destination
0(nomax) 0(nomax)
**
Job command
SetDrGroupMaxLogSize
SetDrGroupN
ame
Values for the following properties cannot be specied in the CreateDrGroup command. These
properties can be changed in the same job, or in another job, by using the commands shown.
Default val
Property
Comment
Destination access mode
Failsafe mode (failsafe on unavailable member)
Failsafe on link-down/power-up Enabled Enabled
Home True
I/O mode (write mode)
Source Destination
blank blank
None (no I/
Disabled Disabled
Synchronous Synchronous SetDrGroupIoMode
ues
O)
None (no I/
False
Job command
SetDrGroupComments
SetDrGroupDestinationAccess
O)
SetDrGroupFailsafe
SetDrGroupFailsafeOnLinkDow nPowerUp
SetDrGro
upHome
Suspension mode Resumed Resumed SetDrGroupSuspend
After a DR
group pair is created, you can a dd more virtual disks. See AddDrGroupMember.
When a job is run, some job arguments may specify features that are not available on the
target array.
See reso
urce names and UNC formats.
CreateDrGroupFromHostVolume
Creates a DR g roup pair by specifying a host volume as the source. The storage volumes that underlie the host volume are added to the source DR group and corresponding destination storage volumes are added to the destination DR group.
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
CreateDrGroupFromHostVolume ( %drgroup_name%, %hostvol_unc_name%, %dest_storsys_name%, "", "",SAME,"","",0,FALSE)
DR Group Name (%drgroup_name%). Enter a name for the new source DR group.
UNC Host Volume Name (% hostvol_unc_name%). Select or enter the UNC name of a source host volume
to be included in the source DR group. The host volume must be an existing disk.
96
Job concepts, templates and commands
Page 97
Examples
Destination Storage System Name (%dest_storsys_name%). Select or enter the name of destination storage system on which the destination DR group will be created.
Destination Disk G roup. Select or enter the name of the disk group on the destination storage system in which the destination storage volume (remote copy) will be created. If omitted, a default is applied when the job is run.
Destination Storage Volume Name. Enter the name for the destination storage volume (remote copy) . If you do not enter a name, the same name as the source storage volume is automatically assigned. If omitted, a default is applied when the job is run.
Destination RAID Level. Select or enter the redundancy level for the remote copy. Choices are RAID0, RAID1, R AID5, and same.
Source Log Disk Group. Select or enter the name of the disk group in which to create the source storage volume (virtual disk). If omitted, a default is applied when the job is run.
Destination Log Disk Group. Select or enter the name of the disk group in which to create the destination storage volume (remote copy). If omitted, a default is applied when the job is run.
Maximum Log Disk Size (MB). Enter a maximum size for the log disk. An entry of zero indicates no preference for the maximum size.
AutoSuspend on Link Down. Select or enter a mode. Choices are true (enabled) and false (disabled).
These exam
Comments
Assoc
Ag ent and license prerequisites. Requires a host agent on the source host. Requires remote
Com ma
OS specics. Yes. See examples above.
Guidelines apply.
The m
ples show host volume mount points. Device names can also be used.
AIX
HP-UX
Linux
OpenVMS
Solaris
Tru64 UNIX
Windows
Drive
Drive & folders
CreateDrGroupFromHostVolume ( "DrGrpPets", "\\HostA2\/home/cats", "ArrayB7", "", "", SAME, "", "", 10, FALSE )
CreateDrG "", "", SAM
CreateDrGroupFromHostVolume ( "DrGrpPets", "\\HostA2\/var/cats", "ArrayB7", "", "",SAME,"","",10,FALSE)
CreateDrGroupFromHostVolume ( "DrGrpPets", "\\HostA2\CATS", "ArrayB7", "", "", SAME, " ", "", 10, FALSE )
CreateDr "", SAME,
CreateDrGroupFromHostVolume ( "DrGrpPets", "\\HostA2\dom01#fset1", "ArrayB7", "", "", SAME, "", "", 10, FALSE )
CreateDrGroupFromHostVolume ( "DrGrpPets", "\\HostA2\E:\", "ArrayB7", "", "", SAME, " ", "", 10, FALSE )
CreateDrGroupFromHostVolume ( "DrGrpPets", "\\HostA2\E:\pets\cats", "ArrayB7", "", "", SAME, "", "", 10, FALSE )
roupFromHostVolume ( "DrGrpPets", "\\HostA2\/users/cats", "ArrayB7",
E, "", "", 10, FALSE )
GroupFromHostVolume ( "DrGrpPets", "\\HostA2\/usr/cats", "ArrayB7", "",
"","",10,FALSE)
iated validation commands. ValidateHostVolume, ValidateStorageSystem
replication licenses on the source and destination storage systems.
nd result value. DR group nam e (simple). For a complete list, see command result values.
aximum number of virtual disks per DR group and other properties are controller software
dependent.
HP StorageWorks Replication Solutions Manager 4 .0.1
97
Page 98
Values for the following properties can be specied in the CreateDrGroupFromHostVolume
command. These properties can be changed later, in another job, by using the commands shown.
Default values
Property
Auto suspend on links down mode
Maximum log disk size
Name (of DR gro
* The name of the source DR group is specied in the CreateDrGroupFromHostVolume command. By default the name for the destination DR group is the same as the source.
up)
Source Destination
False (disabled) False (disabled) SetDrGroupAutoSuspend
0(nomax) 0(nomax)
**
Job command
SetDrGroupMaxLogSize
SetDrGroupName
Values for the following properties cannot be specied in the CreateDrGroupFromHostVolume
command. These properties can be changed in the same job, or in another job, by using the commands shown.
Default values
Property
Comment
Destination access mode None (no I/O) None (no I/O)
Failsafe mode (failsafe on unavailable member)
Failsafe on link-down/power-up
Home True
Source Destination
blank blank
Disabled Disabled
Enabled Enabled
False
Job command
SetDrGroupComments
SetDrGroupDestinationAccess
SetDrGrou
SetDrGroupFailsafeOnLinkDow nPowerUp
SetDrGroupHome
pFailsafe
I/O mode (w
Suspension mode Resumed Resumed SetDrGroupSuspend
rite mode) Synchronous Synchronous SetDrGroupIoMode
After a DR group pair is created, you can add more virtual disks. See AddDrGroupMember.
When a job is run, some job arguments may specify features that are not available on the
target array.
See resource names and UNC formats.
CreateHostVolume
Creates a new host volume by presenting replicated storage to an enabled host. The replicated storage must be c
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
CreateHostVolume ( %src_hostvol_unc%, %storvol_snap_list%, %target_host% )
Source UNC Host Volume (%src_hostvol_unc%). Select or enter the UNC name of a host volume that has been previously replicated within the job.
Storag
in the job.
Target Host (%target_host%). Select or enter the name or IP address of the enabled host on which the host v
reated in a prior host volume replication step in the same job.
e Volume List (%storvol_snap_list%). Select the variable assigned to the previous replication
olumeistobecreated.
98
Job concepts, templates and commands
Page 99
Examples
Theseexamplesshowhostvolumemountpoints. Devicenamescanalsobeused. Therequiredreplication step that precedes the host volume creation step is marked with asterisks (**).
Comments
Associated validation commands. ValidateHost, ValidateHostVolume
Ag ent and license prerequisites. Requires a host agent.
Com ma nd resu
OS specics. Yes. See examples above.
HP-UX.Ifthesource host volume uses HP-UX PVLinks for multiple paths, the replica will have only one path dened.
Windows. Creating the host volume on the same host as the original may produce undesirable results. Windowswritesasignaturetothedisksandthesame signature will be on both the source and the new copy.
This command uses the previously replicated, underlying storage of an existing host volume.
The storage
To mount the host volume, use the MountHostVolume command.
See resour
AIX
HP-UX
Linux
OpenVMS
Solaris
Tru64 UNIX
Windows
Drive
Drive & folders CreateHostVolume ( "\\HostA2\E:\pets\cats", $Rep1, "HostA4" )
$Rep1=SnapcloneHostVolume ( "\ \HostA2\/home/cats", SAME, WAIT ) ** CreateHostVolume ( "\\HostA2\/home/cats", $ Rep1, "HostA4" )
$Rep1=SnapcloneHostVolume ( "\\HostA2\/users/cats", SAME, WAIT ) ** CreateHostVolume ( "\\HostA2\/users/cats", $Rep1, "HostA4" )
$Rep1=SnapcloneHostVolume ( "\\HostA2\/var/cats", SAME, WAIT ) ** CreateHostVolume ( "\\HostA2\/var/cats", $Rep1, "HostA4" )
$Rep1=SnapcloneHostVolume ( "\ \HostA2\CATS", SAME, WAIT ) * * CreateHostVolume ( "\\HostA2\CATS:", $Rep1, "HostA4" )
$Rep1=SnapcloneHostVolume ( "\ \HostA2\/usr/cats", SAME, WAIT ) ** CreateHostVolume ( "\\HostA2\/usr/cats", $Rep1, "HostA4" )
$Rep1=SnapcloneHostVolume ( "\\H ostA2\dom01#fset1", SAME, WAIT ) ** CreateHostVolume ( "\\HostA2\dom01#fset1", $Rep1, "HostA4" )
$Rep1=SnapcloneHostVolume ( "\\HostA2\E:\pets\cats", SAME, WAIT ) **
CreateHostVolume ( "\\HostA2\E:\", $Rep1, "HostA4" )
lt value. Host volume name (UNC). For a complete list, see command result values.
If necessary, you can use PVLinks to add paths to the replica af ter the job is nished.
See also CreateHostVolumeDiscrete.
is presented to the target host, and the storage structure of the source host volume is
reconstructed on the target host. The new host volume is not mounted.
ce names and UNC formats.
CreateHostVolumeDiscrete
Creates a new host volume by presenting the storage volumes that underlie a host volume to an enabled host.
Syntax an
darguments
When init
CreateHostVolumeDiscrete ( %component%, %storvol_unc_name%, %target_host% )
Partition/Slice (%component%). Enter the type of host volume component on the source host.
ially inserted into a job, the command syntax and default arguments are:
HP StorageWorks Replication Solutions Manager 4 .0.1
99
Page 100
Examples
Storage Volume UNC Name (%storvol_unc_name%). Select or enter the UNC name of the storage volume that underlies the host volume.
Target Host (%target_host%). Select or enter the name of the enabled host to which the storage volume is to be presented.
Comments
Associated validation commands. ValidateHost, ValidateHostVolume, ValidateStorageVolume
Ag ent and license prerequisites. Requires a host agent.
C om mand result value. Host volume nam e (U N C). For a complete list, see command result values.
OS specics.Yes.Seeexamplesabove.
The storage volume is presented to the target host. A new host volume is created using the
To mount the host volume, use the MountHostVolume command.
See also CreateHostVolume.
See resource names and UNC formats.
AIX
HP-UX
Linux
OpenVMS
Solaris
Tru64 UNIX
Windows
CreateHostVolumeDiscrete ( "1", "\\ ArrayA2\Cats", "HostA4" )
Not supported.
CreateHostVolumeDiscrete ( "7", "\\ ArrayA2\Cats", "HostA4" )
Not supported
CreateHostVo
CreateHostVolumeDiscrete ( "0", "\\ ArrayA2\Cats", "HostA4" )
CreateHostVolumeDiscrete ( "1", "\\ ArrayA2\Cats", "HostA4" )
lumeDiscrete ( "7", "\\ArrayA2\Cats", "HostA4" )
HP-UX. This command is not supported with HP-UX hosts. OpenVMS. This command is not supported with OpenVMS hosts. Tru64 UNIX
• The Partition/Slice (%component%) value must be 0 (zero).
• The command supports only host volumes with UFS le systems. AdvFS is not supported.
specied partition/slice structure. The new host volume is not mounted.
CreateHostVolumeFromDiskDevices
Uses repl volumes m
Syntax and arguments
When initially inserted into a job, the command syntax and default arguments are:
CreateHostVolumeFromDiskDevices ( %src_hostvol_unc%, %storvol_unc_list%, %target_host% )
Source UNC Host Volume (%src_hostvol_unc%). Select or enter the UNC name of a host volume that has been previously replicated and presented within the job.
Storage
in the job. See argument list.
Target Host (%target_host%). Select or enter the name or IP address of the enabled host on which the host volume is to be created.
100
icated storage volumes to create a new host volume on an enabled host. The replicated storage
usthavebeenpresentedtothehostandahostbusscanperformedinpriorstepsinthejob.
Volume List (%storvol_unc_list%). Select or enter the variable assigned to the previous replication
Job concepts, templates and commands
Loading...