hitachivantara.vspone_block.vsp.hv_gad module – Manages GAD pairs on VSP block storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.6.1).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install hitachivantara.vspone_block.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hitachivantara.vspone_block.vsp.hv_gad.
New in hitachivantara.vspone_block 3.1.0
Synopsis
This module allows for the creation, deletion, splitting, and resynchronization of GAD pairs on VSP block storage systems.
It supports various GAD pairs operations based on the specified task level.
For examples, go to URL https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/gad_pair.yml
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
Parameters
Parameter |
Comments |
|---|---|
Information required to establish a connection to the storage system. |
|
IP address or hostname of the storage system. |
|
Token used to operate on locked resources. |
|
Type of connection to the storage system. Choices:
|
|
Password for authentication. This is a required field. |
|
Username for authentication. This is a required field. |
|
Information required to establish a connection to the secondary storage system. |
|
IP address or hostname of the secondary storage. |
|
Value of the lock token to operate on locked resources. |
|
Password for authentication. This field is required for secondary storage connection if api_token is not provided. |
|
Username for authentication. This field is required for secondary storage connection if api_token is not provided. |
|
Specification for the GAD pairs task. |
|
Allocate and assign a new consistency group ID. Required for the Create GAD pair with server cluster configuration /Create GAD pair with cross path server configuration tasks. Choices:
|
|
Specify beginning ldev id for LDEV range for svol. This is an optional field during create operation. If this field is specified, end_secondary_volume_id must also be specified. If this field is not specified, Ansible modules will try to create SVOL ID same as the PVOL ID if available, otherwise it will use the first available LDEV ID. Required for the Create a GAD pair using a range for secondary volume id task. |
|
Consistency Group ID. |
|
The name for the copy group. Required for the Create/Split/Resync/Delete/Swap-Split/Swap-Resync/Expand tasks. |
|
Copy pace. Choices:
|
|
The name for the pair in the copy group. Required for the Create/Split/Resync/Swap-Split/Swap-Resync/Expand tasks. |
|
Whether to perform an initial copy. Choices:
|
|
Specify end ldev id for LDEV range for svol. This is an optional field during create operation. If this field is specified, begin_secondary_volume_id must also be specified. If this field is not specified, Ansible modules will try to create SVOL ID same as PVOL ID iff available, otherwise it will use the first available LDEV ID. Required for the Create a GAD pair using a range for secondary volume id task. |
|
Fence level. Choices:
|
|
Specify true for consistency group. Choices:
|
|
Whether to forcibly create a pair. Choices:
|
|
Specify true for a new copy group name. Choices:
|
|
The device group name in the local storage system. Optional for the Split/Resync/Swap-Split/Swap-Resync tasks. |
|
The mirror unit number. |
|
Required for resize or expand operation. Value should be grater than the current volume size. Required for the Expand GAD pair task. |
|
Path group ID. |
|
The list of host groups on the primary storage device. Required for the Create GAD pair with server cluster configuration task. |
|
Enables the preferred path for the specified host group. Required for the Create GAD pair with server cluster configuration /Create GAD pair with cross path server configuration tasks. Choices:
|
|
LUN ID. |
|
Host group name. Required for the Create GAD pair with server cluster configuration /Create GAD pair with cross path server configuration tasks. |
|
Port name. Required for the Create GAD pair with server cluster configuration /Create GAD pair with cross path server configuration tasks. |
|
The primary resource group name. Required for the Create GAD pair with cross path server configuration task. |
|
The serial number of the primary storage device. |
|
Primary Volume ID. Required for the Create/Delete tasks. |
|
ID of the provisioned secondary volume that you want to use for the GAD pair creation. Required for the Create a GAD pair with provisioned secondary volume id task. |
|
The quorum disk ID. Required for the Create tasks. |
|
The device group name in the remote storage system. Optional for the Split/Resync/Swap-Split/Swap-Resync tasks. |
|
The list of host groups on the secondary storage device. Required for the Create tasks. |
|
Enables the preferred path for the specified host group. Required for the Create tasks. Choices:
|
|
LUN ID. Required for the Create tasks. |
|
Host group name. Required for the Create tasks. |
|
Port name. Required for the Create tasks. |
|
The list of iscsi targets on the secondary storage device. Required for the Create GAD-ISCSI Pair task. |
|
Enables the preferred path for the specified ISCSI target. Required for the Create GAD-ISCSI Pair task. Choices:
|
|
LUN ID. Required for the Create GAD-ISCSI Pair task. |
|
ISCSI target name. Required for the Create GAD-ISCSI Pair task. |
|
Port name. Required for the Create GAD-ISCSI Pair task. |
|
NVM subsystem details of the secondary volume. Required for the Create GAD-NVMe Pair task. |
|
Name of the NVM subsystem on the secondary storage system. Required for the Create GAD-NVMe Pair task. |
|
Host NQN paths information on the secondary storage system. Required for the Create GAD-NVMe Pair task. |
|
Pool ID of the secondary storage system. Required for the Create tasks. |
|
The secondary resource group name. |
|
The serial number of the secondary storage device. |
|
Set the ALUA mode to True. Required for the Create GAD pair with cross path server configuration task. Choices:
|
|
Specify true to delete the SVOL. Choices:
|
|
The level of the GAD pairs task. Choices:
|
|
Information about the storage system. This field is an optional field. |
|
The serial number of the storage system. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: none |
Determines if the module should run in check mode. |
Notes
Note
Connection type
gatewaywas removed starting from version 3.4.0. Please use an earlier version if you require this connection type.Ansible modules use a technology called copy group to manage all remote replication pair types (GAD, TC, HUR). Therefore, replication pairs created by tools that do not use copy group technology are not compatible with the Ansible modules. As a result, replication pairs created without copy group technology cannot be managed by the Ansible modules.
This module supports Fibre Channel, iSCSI, NVMe Fibre Channel, and NVMe TCP-based GAD pairs.
For GAD single server, cluster, and crosspath configurations
Before managing a GAD pair through Ansible Direct Connect, you must register (or pair) the source and target storage systems in the source storage’s API server. This step is required because Ansible uses REST API calls on the backend. If you skip this step—especially if you are unfamiliar with Hitachi’s REST API—you will encounter errors when managing a GAD pair through Ansible. For instructions, see Manage remote storage registration.
After creating the secondary host group, you must manually add it to the VSM resource group.
A valid WWN should be added to the host groups (primary and secondary).
Before executing the GAD playbook, make sure that remote paths and the quorum disk are configured correctly as mentioned in the User Guide for GAD.
For VSM to VSM GAD, a common VSM must be created on the primary and secondary storage systems.
Add the P-VOL and host group to the VSM. Map the P-VOL to the host group.
After adding a P-VOL to the VSM, the virtual ID of the P-VOL becomes the ‘GAD Reserve’ or 65534. Hence, update the virtual ID of the P-VOL using the Update volume with virtual ldev task from the LDEV playbook. The P-VOL’s physical and virtual ID must match.
Add the secondary host group to the VSM.
If the P-VOL is unnamed, the S-VOL will be assigned a name in the format smrha-[ldev_id]. If the P-VOL has a name, the S-VOL should use the same name. (Here, smrha stands for Storage Module Red Hat Ansible.)
Examples
- name: Swap-Split a GAD pair
hitachivantara.vspone_block.vsp.hv_gad:
state: "swap_split"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
secondary_connection_info:
address: storage2.company.com
username: "admin"
password: "secret"
spec:
copy_group_name: "gad_copy_group_name_8"
copy_pair_name: "gad_copy_pair_name_8"
local_device_group_name: "gad_local_device_group_name_8"
remote_device_group_name: "gad_remote_device_group_name_8"
- name: Swap-Resync a GAD pair
hitachivantara.vspone_block.vsp.hv_gad:
state: "swap_resync"
connection_info:
address: storage2.company.com
username: "username"
password: "password"
secondary_connection_info:
address: storage1.company.com
username: "admin"
password: "secret"
spec:
copy_group_name: "gad_copy_group_name_8"
copy_pair_name: "gad_copy_pair_name_8"
local_device_group_name: "gad_local_device_group_name_8"
remote_device_group_name: "gad_remote_device_group_name_8"
- name: Increase size of volumes of a GAD pair
hitachivantara.vspone_block.vsp.hv_gad:
state: "resize"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
secondary_connection_info:
address: storage2.company.com
username: "admin"
password: "secret"
spec:
copy_group_name: "gad_copy_group_name_9"
copy_pair_name: "gad_copy_pair_name_9"
new_volume_size: "4GB"
- name: Create a GAD-NVMe pair
hitachivantara.vspone_block.vsp.hv_gad:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
secondary_connection_info:
address: storage2.company.com
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
primary_volume_id: 12
secondary_pool_id: 1
secondary_nvm_subsystem:
name: gk-nvm-sub-75
paths:
- "nqn.2014-08.com.ucpa-sc-hv:nvme:gk-test-12346"
quorum_disk_id: 1
- name: Create a GAD-ISCSI pair
hitachivantara.vspone_block.vsp.hv_gad:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
secondary_connection_info:
address: storage2.company.com
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
primary_volume_id: 12
secondary_pool_id: 1
secondary_iscsi_targets:
- name: "test"
port: "CL1-A"
enable_preferred_path: false
lun_id: 1
quorum_disk_id: 1
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Newly created GAD pair object. Returned: success |
|
Consistency Group ID. Returned: success Sample: |
|
Copy group name. Returned: success Sample: |
|
Copy pair name. Returned: success Sample: |
|
Copy progress rate. Returned: success Sample: |
|
Fence level. Returned: success Sample: |
|
Whether ALUA is enabled. Returned: success |
|
Primary volume difference data management. Returned: success Sample: |
|
Primary volume I/O mode. Returned: success Sample: |
|
Primary volume journal ID. Returned: success Sample: |
|
Primary volume LDEV ID. Returned: success Sample: |
|
Primary volume processing status. Returned: success Sample: |
|
Primary volume status. Returned: success Sample: |
|
Primary volume storage device ID. Returned: success Sample: |
|
Quorum disk ID. Returned: success Sample: |
|
Remote mirror copy pair ID. Returned: success Sample: |
|
Replication type. Returned: success Sample: |
|
Secondary volume difference data management. Returned: success Sample: |
|
Secondary volume I/O mode. Returned: success Sample: |
|
Secondary volume journal ID. Returned: success Sample: |
|
Secondary volume LDEV ID. Returned: success Sample: |
|
Secondary volume processing status. Returned: success Sample: |
|
Secondary volume status. Returned: success Sample: |
|
Secondary volume storage device ID. Returned: success Sample: |