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

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.8

Parameters

Parameter

Comments

connection_info

dictionary / required

Information required to establish a connection to the storage system.

address

string / required

IP address or hostname of the storage system.

api_token

string

This field is used to pass the value of the lock token to operate on locked resources.

connection_type

string

Type of connection to the storage system.

Choices:

  • "direct" ← (default)

password

string

Password for authentication. This is a required field.

username

string

Username for authentication. This is a required field.

secondary_connection_info

dictionary

Information required to establish a connection to the secondary storage system.

address

string / required

IP address or hostname of the Hitachi storage system.

api_token

string

This field is used to pass the value of the lock token of the secondary storage to operate on locked resources.

password

string

Password for authentication. This is a required field.

username

string

Username for authentication. This is a required field.

spec

dictionary

Specification for the TrueCopy pairs task.

consistency_group_id

integer

Consistency Group ID, 0 to 255. This is an optional field.

copy_group_name

string

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_pace

string

Copy speed.

copy_pair_name

string

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.

do_initial_copy

boolean

Perform initial copy. This is an optional field during create operation.

Choices:

  • false

  • true ← (default)

fence_level

string

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:

  • "NEVER" ← (default)

  • "DATA"

  • "STATUS"

is_consistency_group

boolean

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:

  • false ← (default)

  • true

is_data_reduction_force_copy

boolean

Force copy for data reduction. This is an optional field during create operation.

Choices:

  • false ← (default)

  • true

is_new_group_creation

boolean

Create a new copy group. This is an optional field during create operation.

Choices:

  • false ← (default)

  • true

is_svol_readwriteable

boolean

It is applicable for split pair operation only. If true, the secondary volume will be read-writeable after split.

Choices:

  • false ← (default)

  • true

local_device_group_name

string

Name of the local device group. This is an optional field.

new_volume_size

string

Required only for resize or expand operation. Value should be grater than the current volume size.

path_group_id

integer

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

integer

Primary volume ID. This is a required field for create operation.

remote_device_group_name

string

Name of the remote device group. This is an optional field.

secondary_hostgroup

dictionary

Host group details of the secondary volume.

lun_id

integer

LUN ID of the host group on the secondary storage system. This is not required for create operation.

name

string / required

Name of the host group on the secondary storage system. This is required for create operation.

port

string / required

Port of the host group on the secondary storage system. This is required for create operation.

secondary_iscsi_targets

list / elements=dictionary

The list of iscsi targets on the secondary storage device.

lun_id

integer

LUN ID.

name

string / required

ISCSI target name.

port

string / required

Port name.

secondary_nvm_subsystem

dictionary

NVM subsystem details of the secondary volume.

name

string / required

Name of the NVM subsytem on the secondary storage system.

paths

list / elements=string

Host NQN paths information on the secondary storage system.

secondary_pool_id

integer

ID of the dynamic pool where the secondary volume will be created.

secondary_volume_id

integer

Secondary volume id.

should_delete_svol

boolean

Specify true to delete the SVOL.

Choices:

  • false ← (default)

  • true

state

string

The level of the TrueCopy pairs task.

present is used to create or update a TrueCopy pair.

absent is used to delete a TrueCopy pair.

expand or resize is used to expand the size of the volumes of a TrueCopy pair.

resync is used to re-sync a TrueCopy pair.

split is used to split a TrueCopy pair.

swap-split is used to swap-split a TrueCopy pair.

swap-resync is used to swap-resync a TrueCopy pair.

Choices:

  • "present" ← (default)

  • "absent"

  • "split"

  • "resync"

  • "resize"

  • "expand"

  • "swap_split"

  • "swap_resync"

storage_system_info

dictionary

Information about the storage system. This field is an optional field.

serial

string

The serial number of the storage system.

Attributes

Attribute

Support

Description

check_mode

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

data

dictionary

Newly created TrueCopy pair object for direct connection.

Returned: success

consistency_group_id

integer

Consistency Group ID.

Returned: success

Sample: -1

copy_group_name

string

Name of the copy group.

Returned: success

Sample: "TC_TEST_1107"

copy_pair_name

string

Name of the copy pair.

Returned: success

Sample: "rd_copy_pair_202"

copy_progress_rate

integer

Copy progress rate.

Returned: success

Sample: -1

fence_level

string

Fence level.

Returned: success

Sample: "NEVER"

primary_hex_volume_id

string

Primary hex volume ID.

Returned: success

Sample: "00:02:77"

primary_or_secondary

string

Primary or secondary.

Returned: success

Sample: ""

primary_volume_id

integer

Primary volume ID.

Returned: success

Sample: 631

pvol_status

string

PVOL status.

Returned: success

Sample: "PAIR"

pvol_storage_device_id

string

PVOL storage device ID.

Returned: success

Sample: "A34000810045"

remote_mirror_copy_pair_id

string

Remote mirror copy pair ID.

Returned: success

Sample: "A34000810045,TC_TEST_1107,TC_TEST_1107P_,TC_TEST_1107S_,rd_copy_pair_202"

secondary_hex_volume_id

string

Secondary hex volume ID.

Returned: success

Sample: "00:00:ca"

secondary_volume_id

integer

Secondary volume ID.

Returned: success

Sample: 202

status

string

Status.

Returned: success

Sample: ""

storage_serial_number

string

Storage serial number.

Returned: success

Sample: "810050"

svol_access_mode

string

SVOL access mode.

Returned: success

Sample: ""

svol_status

string

SVOL status.

Returned: success

Sample: "PAIR"

svol_storage_device_id

string

SVOL storage device ID.

Returned: success

Sample: "A34000810050"

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)