hitachivantara.vspone_block.vsp.hv_truecopy module – Manages TrueCopy pairs on Hitachi VSP storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 3.4.0).
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_truecopy
.
New in hitachivantara.vspone_block 3.1.0
Synopsis
This module allows for the creation, deletion, splitting, re-syncing and resizing of TrueCopy pairs.
It also allows swap-splitting and swap-resyncing operations of TrueCopy pairs.
It supports various TrueCopy 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/truecopy.yml
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.8
Parameters
Parameter |
Comments |
---|---|
Information required to establish a connection to the storage system. |
|
IP address or hostname of the storage system. |
|
This field is used to pass the value of the lock token 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 Hitachi storage system. |
|
This field is used to pass the value of the lock token of the secondary storage to operate on locked resources. |
|
Password for authentication. This is a required field. |
|
Username for authentication. This is a required field. |
|
Specification for the TrueCopy pairs task. |
|
Consistency Group ID, 0 to 255. This is an optional field. |
|
Name of the copy group. This is a required field for create operation. For other operations, this field is optional, but when provided, the time to complete the operation is faster. |
|
Copy speed. |
|
Name of the copy pair. This is a required field for create operation. For other operations, this field is optional, but when provided, the time to complete the operation is faster. |
|
Perform initial copy. This is an optional field during create operation. Choices:
|
|
Specifies the primary volume fence level setting and determines if the host is denied access or continues to access the primary volume when the pair is suspended because of an error. This is an optional field. Choices:
|
|
This is an optional field during create operation. Depending on the value, this attribute specifies whether to register the new pair in a consistency group. If true, the new pair is registered in a consistency group. If false, the new pair is not registered in a consistency group. Choices:
|
|
Force copy for data reduction. This is an optional field during create operation. Choices:
|
|
Create a new copy group. This is an optional field during create operation. Choices:
|
|
It is applicable for split pair operation only. If true, the secondary volume will be read-writeable after split. Choices:
|
|
Name of the local device group. This is an optional field. |
|
Required only for resize or expand operation. Value should be grater than the current volume size. |
|
This is an optional field during create operation. Specify the path group ID in the range from 0 to 255. If you are unsure don’t use this parameter. If you omit this value or specify 0, the lowest path group ID in the specified path group is used. |
|
Primary volume ID. This is a required field for create operation. |
|
Name of the remote device group. This is an optional field. |
|
Host group details of the secondary volume. |
|
LUN ID of the host group on the secondary storage system. This is not required for create operation. |
|
Name of the host group on the secondary storage system. This is required for create operation. |
|
Port of the host group on the secondary storage system. This is required for create operation. |
|
The list of iscsi targets on the secondary storage device. |
|
LUN ID. |
|
ISCSI target name. |
|
Port name. |
|
NVM subsystem details of the secondary volume. |
|
Name of the NVM subsytem on the secondary storage system. |
|
Host NQN paths information on the secondary storage system. |
|
ID of the dynamic pool where the secondary volume will be created. |
|
Secondary volume id. |
|
Specify true to delete the SVOL. Choices:
|
|
The level of the TrueCopy 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. |
Examples
- name: Create a TrueCopy pair
hitachivantara.vspone_block.vsp.hv_truecopy:
state: "present"
connection_info:
address: 172.1.1.126
username: "admin"
password: "secret"
secondary_connection_info:
address: 172.1.1.127
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
primary_volume_id: 11
is_consistency_group: true
fence_level: 'NEVER'
secondary_pool_id: 1
secondary_hostgroup:
name: ansible_test_group
port: CL1-A
lun_id: 1
- name: Split a TrueCopy pair
hitachivantara.vspone_block.vsp.hv_truecopy:
state: "split"
connection_info:
address: 172.1.1.126
username: "admin"
password: "secret"
secondary_connection_info:
address: 172.1.1.127
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
- name: Resync a TrueCopy pair
hitachivantara.vspone_block.vsp.hv_truecopy:
state: "resync"
connection_info:
address: 172.1.1.126
username: "admin"
password: "secret"
secondary_connection_info:
address: 172.1.1.127
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
- name: Swap-split a TrueCopy pair
hitachivantara.vspone_block.vsp.hv_truecopy:
state: "swap_split"
connection_info:
address: 172.1.1.127
username: "admin"
password: "secret"
secondary_connection_info:
address: 172.1.1.126
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
- name: Swap-resync a TrueCopy pair
hitachivantara.vspone_block.vsp.hv_truecopy:
state: "swap_resync"
connection_info:
address: 172.1.1.127
username: "admin"
password: "secret"
secondary_connection_info:
address: 172.1.1.126
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
- name: Delete a TrueCopy pair
hitachivantara.vspone_block.vsp.hv_truecopy:
state: "swap_resync"
connection_info:
address: 172.1.1.126
username: "admin"
password: "secret"
secondary_connection_info:
address: 172.1.1.127
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
- name: Increase the size of the volumes of a TrueCopy pair
hitachivantara.vspone_block.vsp.hv_truecopy:
state: "expand"
connection_info:
address: 172.1.1.126
username: "admin"
password: "secret"
secondary_connection_info:
address: 172.1.1.127
username: "admin"
password: "secret"
spec:
copy_group_name: "copy_group_name_1"
copy_pair_name: "copy_pair_name_1"
new_volume_size: 4GB
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Newly created TrueCopy pair object for direct connection. Returned: success |
|
Consistency Group ID. Returned: success Sample: |
|
Name of the copy group. Returned: success Sample: |
|
Name of the copy pair. Returned: success Sample: |
|
Copy progress rate. Returned: success Sample: |
|
Fence level. Returned: success Sample: |
|
Primary hex volume ID. Returned: success Sample: |
|
Primary or secondary. Returned: success Sample: |
|
Primary volume ID. Returned: success Sample: |
|
PVOL status. Returned: success Sample: |
|
PVOL storage device ID. Returned: success Sample: |
|
Remote mirror copy pair ID. Returned: success Sample: |
|
Secondary hex volume ID. Returned: success Sample: |
|
Secondary volume ID. Returned: success Sample: |
|
Status. Returned: success Sample: |
|
Storage serial number. Returned: success Sample: |
|
SVOL access mode. Returned: success Sample: |
|
SVOL status. Returned: success Sample: |
|
SVOL storage device ID. Returned: success Sample: |