dellemc / dellemc.powermax / 1.6.1 / module / dellemc_powermax_srdf Manage SRDF pair on PowerMax/VMAX Storage System | "added in version" 1.3.0 of dellemc.powermax" Authors: Manisha Agrawal (@agrawm3) <ansible.team@dell.com>, Rajshree Khare (@khareRajshree) <ansible.team@dell.com> preview | supported by communitydellemc.powermax.dellemc_powermax_srdf (1.6.1) — module
Install with ansible-galaxy collection install dellemc.powermax:==1.6.1
collections: - name: dellemc.powermax version: 1.6.1
Managing SRDF link on a PowerMax storage system includes creating an SRDF pair for a storage group, modifying the SRDF mode, modifying the SRDF state of an existing SRDF pair, and deleting an SRDF pair. All create and modify calls are asynchronous by default.
- name: Create and establish storagegroup SRDF/a pairing register: Job_details_body dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" remote_serial_no: "{{remote_serial_no}}" srdf_mode: 'Asynchronous' srdf_state: 'Establish' state: 'present'
- name: Create storagegroup SRDF/s pair in default suspended mode as an Synchronous task dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name2}}" remote_serial_no: "{{remote_serial_no}}" state: 'present' srdf_mode: 'Synchronous' wait_for_completion: True
- name: Create storagegroup Metro SRDF pair with Witness for resiliency dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" remote_serial_no: "{{remote_serial_no}}" state: 'present' srdf_mode: 'Active' wait_for_completion: True srdf_state: 'Establish'
- name: Suspend storagegroup Metro SRDF pair dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" remote_serial_no: "{{remote_serial_no}}" state: 'present' srdf_state: 'Suspend'
- name: Establish link for storagegroup Metro SRDF pair and use Bias for resiliency dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" remote_serial_no: "{{remote_serial_no}}" state: 'present' wait_for_completion: False srdf_state: 'Establish' witness: False
- name: Get SRDF details dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" state: 'present'
- name: Modify SRDF mode dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" srdf_mode: 'Synchronous' state: 'present'
- name: Failover SRDF link dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" srdf_state: 'Failover' state: 'present'
- name: Get SRDF Job status dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" job_id: "{{Job_details_body.Job_details.jobId}}" state: 'present'
- name: Establish SRDF link dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name2}}" srdf_state: 'Establish' state: 'present'
- name: Suspend SRDF link dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name2}}" srdf_state: 'Suspend' state: 'present'
- name: Delete SRDF link dellemc_powermax_srdf: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "{{sg_name}}" state: 'absent'
user: description: - The username of the Unisphere host. required: true type: str state: choices: - absent - present description: - Define whether the SRDF pairing should exist or not. - present indicates that the SRDF pairing should exist in system. - absent indicates that the SRDF pairing should not exist in system. required: true type: str job_id: description: - Job ID of an asynchronous task. Can be used to get details of a job. required: false type: str rdfg_no: description: - The RDF group number. - Optional parameter for each call. For a create operation, if specified, the array will reuse the RDF group, otherwise an error is returned. For modify and delete operations, if the RFD group number is not specified, and the storage group is protected by multiple RDF groups, then an error is raised. required: false type: int sg_name: description: - Name of storage group. SRDF pairings are managed at a storage group level. - Required to identify the SRDF link. required: false type: str witness: description: - Flag to specify use of Witness for a Metro configuration. Setting to True signifies to use Witness, setting it to False signifies to use Bias. It is recommended to configure a witness for SRDF Metro in a production environment, this is configured via Unisphere for PowerMax UI or REST. - The flag can be set only for modifying srdf_state to either Establish, Suspend, or Restore. - While creating a Metro configuration, the witness flag must be set to True. required: false type: bool password: description: - The password of the Unisphere host. required: true type: str serial_no: description: - The serial number will refer to the source PowerMax/VMAX array when protecting a storage group. However srdf_state operations may be issued from primary or remote array. required: true type: str srdf_mode: choices: - Active - Adaptive Copy - Synchronous - Asynchronous description: - The replication mode of the SRDF pair. - Required when creating an SRDF pair. - Can be modified by providing a required value. required: false type: str srdf_state: choices: - Establish - Resume - Restore - Suspend - Swap - Split - Failback - Failover - Setbias description: - Desired state of the SRDF pairing. While creating a new SRDF pair, allowed values are 'Establish' and 'Suspend'. If the state is not specified, the pair will be created in a 'Suspended' state. When modifying the state, only certain changes are allowed. required: false type: str universion: choices: - 91 - 92 description: - Unisphere version, currently '91' and '92' versions are supported. required: false type: int verifycert: choices: - true - false description: - Boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. - False - indicates that the SSL certificate should not be verified. required: true type: bool new_rdf_group: description: - Overrides the SRDF group selection functionality and forces the creation of a new SRDF group. - PowerMax has a limited number of RDF groups. If this flag is set to True, and the RDF groups are exhausted, then SRDF link creation will fail. - If not specified, default value is 'false'. required: false type: bool unispherehost: description: - IP or FQDN of the Unisphere host required: true type: str remote_serial_no: description: - Integer 12-digit serial number of remote PowerMax or VMAX array. - Required while creating an SRDF link. required: false type: str wait_for_completion: default: false description: - Flag to indicate if the operation should be run synchronously or asynchronously. True signifies synchronous execution. By default, all create and update operations will be run asynchronously. required: false type: bool
Job_details: contains: completed_date_milliseconds: description: Date of job completion in milliseconds. type: int jobId: description: Unique identifier of the job. type: str last_modified_date: description: Last modified date of job. type: str last_modified_date_milliseconds: description: Last modified date of job in milliseconds. type: int name: description: Name of the job. type: str resourceLink: description: Resource link w.r.t Unisphere. type: str result: description: Job description type: str status: description: Status of the job. type: str task: description: Details about the job. type: list username: description: Unisphere username. type: str description: Details of the job. returned: When job exist. type: list SRDF_link_details: contains: hop2Modes: description: SRDF hop2 mode. type: str hop2Rdfgs: description: Hop2 RDF group number. type: str hop2States: description: SRDF hop2 state. type: str largerRdfSides: description: Larger volume side of the link. type: str localR1InvalidTracksHop1: description: Number of invalid R1 tracks on local volume. type: int localR2InvalidTracksHop1: description: Number of invalid R2 tracks on local volume. type: int modes: description: Mode of the SRDF pair. type: str rdfGroupNumber: description: RDF group number of the pair. type: int remoteR1InvalidTracksHop1: description: Number of invalid R1 tracks on remote volume. type: int remoteR2InvalidTracksHop1: description: Number of invalid R2 tracks on remote volume. type: int remoteSymmetrix: description: Remote symmetrix ID. type: str states: description: State of the SRDF pair. type: str storageGroupName: description: Name of storage group that is SRDF protected. type: str symmetrixId: description: Primary symmetrix ID. type: str totalTracks: description: Total number of tracks in the volume. type: int volumeRdfTypes: description: RDF type of volume. type: str description: Details of the SRDF link. returned: When SRDF link exists. type: complex changed: description: Whether or not the resource has changed. returned: always type: bool