hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts module – Retrieves GAD (Global-Active Device) information from VSP One storage systems.

Note

This module is part of the hitachivantara.vspone_block collection (version 4.8.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.

To use it in a playbook, specify: hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts.

New in hitachivantara.vspone_block 4.8.0

Synopsis

  • This module retrieves GAD pair information from VSP One Block 20/80 series and VSP E series storage systems.

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

Token used 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

Query parameters for filtering and paginating GAD pair information.

consistency_group_id

integer

Filter results by a specific Consistency Group ID.

If omitted, GAD pairs from all consistency groups are retrieved.

count

integer

The maximum number of GAD pair entries to retrieve in a single operation.

Supports values from 1 to 500.

If set to 1 alongside primary_volume_id, the module targets a specific GAD pair matching that LDEV ID and Mirror Unit.

If set to a value greater than 1, it initiates a sequential retrieval. This begins at the specified cursor (or the next numerically available pair if the exact ID is missing) and includes all subsequent entries across all Mirror Units.

If omitted, this defaults to 500, retrieving up to 500 pairs starting from the beginning of the list or the specified primary_volume_id.

Default: 500

mirror_unit_number

integer

The Mirror Unit (MU) number associated with the primary_volume_id to start retrieval from.

If primary_volume_id is specified but this is omitted, it defaults to 0.

All subsequent pairs, regardless of their Mirror Unit number, will be included in the results.

primary_volume_id

integer

Specifies the starting LDEV ID for cursor-based pagination.

When provided, retrieval begins at this volume ID. If the exact LDEV ID is not present, the operation falls back to the next available pair.

If count is set to 1, this parameter functions as a specific lookup for the designated LDEV.

This parameter acts as a starting offset for sequential retrieval and includes all subsequent LDEVs up to the specified count.

Examples

# ######################################################################################
# Task: Retrieve GAD pairs using the default batch size (500) from the beginning of the list.
# ######################################################################################
- name: Get all GAD pairs (default limit)
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
  register: result

- name: Debug the result variable
  ansible.builtin.debug:
    var: result

# ######################################################################################
# Task: Retrieve a specific number of GAD pairs from the beginning of the list.
# ######################################################################################
- name: Get first 10 GAD pairs
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      count: 10
  register: result

- name: Debug the result variable
  ansible.builtin.debug:
    var: result

# ######################################################################################
# Task: Retrieve first available gad pair.
# ######################################################################################
- name: Get first available GAD pair
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      count: 1
  register: result

- name: Debug the result variable
  ansible.builtin.debug:
    var: result

# ######################################################################################
# Task: Filter GAD pairs by Consistency Group ID.
# Returns an empty list if no pairs are associated with the specified group.
# ######################################################################################
- name: Get GAD pairs for Consistency Group 2
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      consistency_group_id: 2
  register: result

- name: Debug the result variable
  ansible.builtin.debug:
    var: result

# ######################################################################################
# Task: Retrieve a single GAD pair from a specific Consistency Group.
# ######################################################################################
- name: Get a single GAD pair from Consistency Group 2
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      consistency_group_id: 2
      count: 1
  register: result

# ######################################################################################
# Task: Retrieve information for a specific LDEV and Mirror Unit.
# Set count to 1 to find only this specific GAD pair LDEVID/MU.
# ######################################################################################
- name: Get specific GAD pair by LDEV and MU
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      primary_volume_id: 244
      mirror_unit_number: 3
      count: 1
  register: result

- name: Debug the result variable
  ansible.builtin.debug:
    var: result

# ######################################################################################
# Task: Retrieve specific GAD pair using the default Mirror Unit (0).
# Set count to 1 to find only this specific GAD pair LDEVID/MU.
# ######################################################################################
- name: Get GAD pair by LDEV ID (Default MU 0)
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      primary_volume_id: 244
      count: 1
  register: result

# ######################################################################################
# Task: Cursor-based batch retrieval.
# Starts at LDEV 249 / MU 3 if present; otherwise, falls back to the next available
# pair in numerical order. Results include all subsequent Mirror Units and volumes.
# ######################################################################################
- name: Get batch of 10 pairs starting from a gad pair
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      primary_volume_id: 249
      mirror_unit_number: 3
      count: 10
  register: result

- name: Debug the result variable
  ansible.builtin.debug:
    var: result

# ######################################################################################
# Task: Sequential retrieval starting from a volume-level cursor.
# Defaults to Mirror Unit 0. Retrieval starts from the specified ID or the next
# available numerical match up to the maximum batch limit (500).
# ######################################################################################
- name: Get up to 500 pairs starting from Volume 249
  hitachivantara.vspone_block.vsp.hv_vsp_one_gad_facts:
    connection_info: "{{ connection_info }}"
    spec:
      primary_volume_id: 249
  register: result

- name: Debug the result variable
  ansible.builtin.debug:
    var: result

Returned Facts

Facts returned by this module are added/updated in the hostvars host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

Key

Description

count

integer

The number of GAD pairs retrieved and stored in ansible_facts.

Returned: success

Sample: 2

gad_pairs

list / elements=dictionary

List of dictionaries containing detailed GAD pair properties.

Returned: success

consistency_group_id

integer

ID of the consistency group the pair belongs to.

Returned: success

Sample: 2

copy_pace

integer

Speed of the copy operation (1-15).

Returned: success

Sample: 3

copy_progress_rate

integer

Percentage of initial copy completion.

Returned: success

Sample: -1

copy_time

integer

Total seconds taken to reach PAIR status.

Returned: success

Sample: 0

created_time

string

Timestamp of pair creation.

Returned: success

Sample: "2024-10-01T10:00:00Z"

data_synchronization_rate

integer

Synchronization percentage between volumes.

Returned: success

Sample: 100

failure_factor

string

Reason for GAD pair failure, if any.

Returned: success

Sample: "NONE"

io_preference

string

I/O preference settings.

Returned: success

Sample: "DISABLED"

local_last_updated_time

string

Timestamp of the last local update.

Returned: success

Sample: "2024-10-01T10:05:00Z"

mirror_unit_number

integer

Mirror Unit (MU) number.

Returned: success

Sample: 0

pair_operation_mode_for_blocked_quorum_disk

string

Behavior when the quorum disk is blocked.

Returned: success

Sample: "QUORUMLESS"

primary_volume_differential_data_management

string

Method used for differential data management.

Returned: success

Sample: "HIERARCHICAL"

primary_volume_id

integer

LDEV ID of the local (primary) volume.

Returned: success

Sample: 244

primary_volume_id_hex

string

Hexadecimal representation of the primary volume ID.

Returned: success

Sample: "00:00:F4"

primary_volume_io_mode

string

Host I/O behavior (MIRROR, LOCAL, BLOCK).

Returned: success

Sample: "MIRROR"

primary_volume_name

string

Nickname or name assigned to the primary volume.

Returned: success

Sample: "GadTest"

primary_volume_position

string

Role of the local volume (PRIMARY or SECONDARY).

Returned: success

Sample: "PRIMARY"

primary_volume_processing_status

string

Capacity expansion status (IDLE, EXPANDING).

Returned: success

Sample: "IDLE"

primary_volume_provisioning_type

string

Provisioning type (INTERNAL, VIRTUAL, or EXTERNAL).

Returned: success

Sample: "VIRTUAL"

primary_volume_status

string

Current pair status (PAIR, COPY, PSUS, etc.).

Returned: success

Sample: "PAIR"

quorum_disk_id

integer

ID of the quorum disk used for the GAD pair.

Returned: success

Sample: 22

remote_connection_id

dictionary

Information about the remote storage system connection.

Returned: success

path_group_id

integer

ID of the path group used for the connection.

Returned: success

Sample: 0

storage_model

string

Model of the remote storage (e.g., RH20ETP).

Returned: success

Sample: "RH20ETP"

storage_serial_number

string

Serial number of the remote storage.

Returned: success

Sample: "70041"

secondary_volume_id

integer

LDEV ID of the volume on the remote storage system.

Returned: success

Sample: 55

secondary_volume_id_hex

string

Hexadecimal representation of the secondary volume ID.

Returned: success

Sample: "00:00:37"

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)