Test failover advanced options
The following four advanced options of the SRDF SRA control the behavior of automatic device creation during test failover:
- AutoTargetDevice — When enabled, SRA dynamically creates target devices to link snapshots. DEFAULT=DISABLED
- AutoTargetDeviceReuse — When enabled along with AutoTargetDevice, SRA retains dynamically created target devices and adds source to target mapping in the EmcSrdfSraTestFailoverConfig.xml file. If disabled, the SRA will delete the devices during Cleanup. DEFAULT=ENABLED
- TerminateCopySessions — The SRA will terminate replicas or snapshots after a test failover operation. The value of this option must be opposite of AutoTargetDeviceReuse - versions prior to 10.x will report an error. DEFAULT=DISABLED
- AutoTargetDeviceFreeTracks — When enabled along with AutoTargetDeviceReuse, the SRA frees all allocated tracks in the target devices during Cleanup without deleting them. DEFAULT=DISABLED
In addition, testing while the protection and recovery sites are disconnected is covered.
AutoTargetDevice
If this option is enabled, the SRA will do the following during a test failover:
- Automatically create devices of the same size and geometry as the R2s in the recovery plan
- Link the snapshots of the R2 devices to the newly created target devices
- Place the target devices in the R2 storage group
Some important notes about using this option:
- The EmcSrdfSraTestFailoverConfig.xml file must be present in the appropriate directory. If this file is not present, the SRA will create a “.tmp” file each time a test failover is run and generate new devices for every test. To resolve, rename the “.tmp” file to EmcSrdfSraTestFailoverConfig.xml before running a cleanup.
- If the user wishes the target devices to be placed into a different, existing storage group than the R2 one, the EmcSrdfSraMaskingControl.xml file must be modified with both a different storage group name and the associated R2 devices as placeholders in the SrcDeviceList. That storage group must be in a masking view presented to the recovery site. The TestReplicaMaskingControl global option must be enabled for this to work. Be sure the syntax is accurate or the test will fail. For example, if the recovery plan contains R2 devices AB and AC and the desired storage group is target_device_sg, the xml file would look like the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<DeviceMaskingInfo>
<Version>9.0</Version>
<MaskViewList>
<MaskView>
<ArrayId>000123456789</ArrayId>
<StorageGroup>target_device_sg</StorageGroup>
<DeviceList>
<Device></Device>
<Device></Device>
</DeviceList>
<SrcDeviceList>
<Device>AB</Device>
<Device>AC</Device>
</SrcDeviceList>
</MaskView>
</MaskViewList>
</DeviceMaskingInfo>
- If AutoTargetDeviceReuse is set to false, the target devices will be removed from the storage group and deleted during SRM cleanup.
- This option only supports SnapVX. It does not support any emulation modes such as CLONE. By default NOCOPY mode is used. If COPY mode is required, the EmcSrdfSraTestFailoverConfig.xml must be modified to include a valid CopyInfoBlock with the COPY setting, leaving the target devices blank (as they are unknown). Using the previous example R2 devices of AB and AC, the file would appear as such:
<?xml version="1.0" encoding="ISO-8859-1"?>
<TestFailoverInfo>
<Version>9.0</Version>
<CopyInfo>
<ArrayId>000123 456789</ArrayId>
<CopyType>SNAPVX</CopyType>
<CopyMode>COPY</CopyMode>
<SavePoolName></SavePoolName>
<DeviceList>
<DevicePair>
<Source>AB</Source>
<Target></Target>
</DevicePair>
<DevicePair>
<Source>AC</Source>
<Target></Target>
</DevicePair>
</DeviceList>
</CopyInfo>
</TestFailoverInfo>
AutoTargetDeviceReuse
When this option is enabled (default) along with AutoTargetDevice, the target devices automatically created by the SRA are retained after an SRM Cleanup along with the link to the R2s. In addition, the SRA will create an EmcSrdfSraTestFailoverConfig.xml file with the device pairings (R2 - > target device) during the SRM test phase. The SRA will continue to use these devices until an SRM Cleanup is run with AutoTargetDeviceReuse disabled. At that point the SRA will remove the target devices from the storage group, delete them, and remove the device pairings from the EmcSrdfSraTestFailoverConfig.xml.
Note that whenever the SRA modifies the XML file, it will first create a backup by adding the suffix".EMCSRDFSRA.bak_YYMMDDhhmmssuuu" to the original file where year is YY, month is MM, date is DD, hour is hh, minutes are mm, seconds are ss and microseconds are uuu.
Reusing devices is a time-saving option when conducting many tests over a designated time window; however, Dell recommends disabling this option on the last test so that sessions are not left in a created state for an extended time period as it will continue to use system resources.
TerminateCopySessions
When this option is enabled, the SRA will terminate replicas or snapshots after a test failover operation when using a custom EmcSrdfSraTestFailoverConfig.xml file.
Reusing devices is a time-saving option when conducting many tests over a designated time window; however, Dell recommends enabling this option on the last test so that sessions are not left in a created state for an extended time period as it will continue to use system resources.
AutoTargetDeviceFreeTracks
When this option is enabled along with AutoTargetDeviceReuse, the SRA will free up most allocations on any auto target devices during the Cleanup. This option is useful when testing generates significant amounts of data but multiple testing iterations are planned and thus deleting the devices is not desirable.
Important notes for parameters
- A “force” cleanup (meaning two cleanups) will be required for any invalid configuration file since no snapshots are created and thus the SRA cannot delete them.
- In versions prior to SRA 10.x, enabling AutoTargetDevice can cause a conflict when both TerminateCopySession and AutoTargetDeviceReuse are disabled or enabled as the SRA is being instructed to both keep the copy session but delete it also. To resolve this, either TerminateCopySession must be enabled to make sure dynamically created devices can be deleted in Cleanup or else enable AutoTargetDeviceReuse so that a Cleanup operation does not delete target devices. In other words, these two global options should always be opposites of each other.
- If an SRM test is run with these options set incorrectly, SRM will fail with “Failed to create snapshots...” The SRA log should be reviewed, where the following message will be seen: [ERROR]: Invalid global configuration options.
- The creation and deletion of devices can be a time-consuming operation and may lead to an SRM timeout. This can be fixed by adjusting the SRM advanced option storage.commandTimeout to a larger value if testing produces this issue.
- SRA fails on Test and Cleanup operations when the CopyInfoBlock of the EmcSrdfSraTestFailoverConfig.xml file contains partially-filled Target tags. Either all Target tags should be empty or all should be filled (by SRA when Test successful completed and AutoTargetDeviceReuse is enabled).
- When AutoTargetDevice is enabled and there is an existing EmcSrdfSraTestFailoverConfig.xml file that is not the one generated by the SRA, Test and Cleanup operations will fail. To prevent the failure, the EmcSrdfSraTestFailoverConfig.xml file should be in the default configuration similar to the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<TestFailoverInfo>
<Version>10.0</Version>
<CopyInfo>
<ArrayId></ArrayId>
<CopyType>CLONE</CopyType>
<CopyMode>NOCOPY</CopyMode>
<DeviceList>
<DevicePair>
<Source></Source>
<Target></Target>
</DevicePair>
</DeviceList>
</CopyInfo>
</TestFailoverInfo>
- If devices in the SRM replication plan are a subset of the CopyInfoBlock device list, then target devices will be created for all R2 devices present in CopyInfoBlock.These devices will be deleted when a Cleanup operation is called with AutoTargetDeviceReuse disabled.
- Because target devices are associated with the R2 as the link remains after Cleanup, setting AutoTargetDeviceFreeTracks cannot free all tracks.
- When AutoTargetDeviceFreeTracks is in use, devices are removed from the storage group prior to track deallocation, then added back once complete before the Cleanup operation finishes.
- Enabling AutoTargetDeviceFreeTracks can increase the time a Cleanup operation runs commensurate with the amount of data to deallocate.
- When AutoTargetDeviceFreeTracks is enabled, the SRA will record any track deallocation in the SRA log file.
Testing in disconnected state
SRM offers the ability to run a failover test while the protection and recovery sites are not communicating, or what is known as a disconnected state. The SRDF SRA supports this functionality. For partitioned environments which only involve bringing down the vCenter/SRM server or Solutions Enabler, no changes are required to the SRA. There will be connection errors in the SRA log file, but the test will continue. If the SRDF replication is altered, however, resulting in a change of pair state, then it is necessary to set the global options parameter TestFailoverForce to enabled. Setting the parameter will instruct the SRA to continue through errors generated because of the SRDF state.
Note: Testing in a disconnected state will not function properly with the parameter TestFailoverWithoutLocalSnapshots enabled and the SRDF link down, even if TestFailoverForce is enabled. In such a configuration the SRA is unable to discern the status of replication and therefore cannot utilize the R2 in testing. It is possible, however, to manually split the SRDF pairs prior to bringing the link down, and that will enable the test to proceed. After the test is complete, replication needs to be re-established manually before running a cleanup operation.