hitachivantara.vspone_block.vsp.hv_snapshot module – Manages snapshots on VSP block 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. 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_snapshot.
New in hitachivantara.vspone_block 3.0.0
Synopsis
- This module allows for the creation, deletion, splitting, syncing, and restoring of snapshots on VSP block storage systems.
- It supports various snapshot 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/snapshot.yml
Requirements
The below requirements are needed on the host that executes this module.
- python >= 3.9
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. |
|
connection_type string |
Type of connection to the storage system. Choices:
|
|
password string |
Password for authentication. This is a required field. |
|
username string |
Username for authentication. This is a required field. |
spec dictionary / required | Specification for the snapshot task. |
|
allocate_new_consistency_group boolean |
Specify whether to allocate a consistency group. Required for the Create snapshot pair with a new consistency group task. Choices:
|
|
auto_split boolean |
Specify whether to automatically split the pair. Choices:
|
|
can_cascade boolean |
Specify whether the pair can be cascaded. Default is True when capacity savings is not Choices:
|
|
clones_automation boolean |
Specify whether the pair is to be cloned after the pair is created. You can specify this item when true is specified for the is_clone attribute. Required for the Create and clone snapshot pair with copy speed and clones automation task. Choices:
|
|
copy_speed string |
Specify the copy speed at which the created pair is to be cloned. You can specify this item when true is specified for both the is_clone attribute and the clones_automation attribute. Required for the Create and clone snapshot pair with copy speed and clones automation task. Choices:
|
|
is_clone boolean |
Specify whether to create a pair that has the clone attribute specified. If you specify true for this attribute, do not specify the auto_split attribute. When creating a Thin Image Advanced pair, you cannot specify true. Required for the Create and clone snapshot pair /Create and clone snapshot pair with copy speed and clones automation task. Choices:
|
|
is_data_reduction_force_copy boolean |
Specify whether to forcibly create a pair for a volume for which the capacity saving function is enabled. Default is True when capacity savings is not Choices:
|
|
mirror_unit_number aliases: mirror_unit_id integer |
Number of the mirror unit. Required for the Split a snapshot pair /Resync a snapshot pair /Restore a snapshot pair /Delete a snapshot pair /Clone snapshot pair/Thin Image pair /Unassign floating snapshot pair /Set retention period of an existing snapshot pair /Set retention period of snapshot pair after split tasks. Optional for the Create floating snapshot pair /Assign floating snapshot pair tasks. |
|
operation_type string |
Specify the operation type for garbage data deletion. This can be set when the should_delete_tree attribute is set to true. Required for the Deleting garbage data of all Thin Image pairs in a snapshot tree task. |
|
pool_id integer |
ID of the pool where the snapshot will be allocated. Optional for the Create a snapshot pair /Create snapshot pair with a new consistency group /Create and auto-split a snapshot pair /Create a snapshot pair using an existing consistency group /Create and clone snapshot pair /Create Thin Image Advanced snapshot pair /Set retention period of snapshot pair with auto split tasks. Required for the Create and clone snapshot pair with copy speed and clones automation /Create floating snapshot pair tasks. |
|
primary_volume_id string / required |
ID of the primary volume. Required for the Create a snapshot pair /Create snapshot pair with a new consistency group /Split a snapshot pair /Resync a snapshot pair /Create and auto-split a snapshot pair /Restore a snapshot pair /Create a snapshot pair using an existing consistency group /Delete a snapshot pair /Delete Thin Image pairs by snapshot tree /Clone snapshot pair/Thin Image pair /Create and clone snapshot pair /Create and clone snapshot pair with copy speed and clones automation /Create floating snapshot pair /Assign floating snapshot pair /Unassign floating snapshot pair /Create Thin Image Advanced snapshot pair /Set retention period of an existing snapshot pair /Set retention period of snapshot pair after split /Set retention period of snapshot pair with auto split /Deleting garbage data of all Thin Image pairs in a snapshot tree tasks. |
|
retention_period integer |
Specify the retention period for the snapshot in hours. This can be set when the snapshot status is PSUS. This attribute can be used when the storage system is VSP One B20. You can specify this attribute only if the auto_split attribute is set to true for new pair. Required for the Set retention period of an existing snapshot pair /Set retention period of snapshot pair after split /Set retention period of snapshot pair with auto split tasks. |
|
secondary_volume_id string |
Secondary volume id. Required for the Create floating snapshot pair /Assign floating snapshot pair /Unassign floating snapshot pair tasks. Optional for the Create Thin Image Advanced snapshot pair task. |
|
should_delete_svol boolean |
Specify whether to delete the secondary volume when deleting a snapshot pair. Required for the Delete a snapshot pair task. Choices:
|
|
should_delete_tree boolean |
Specify whether to delete garbage data of all Thin Image pairs in a snapshot tree. Required for the Delete Thin Image pairs by snapshot tree task. Choices:
|
|
snapshot_group_name string |
Name of the snapshot group. Required for the Create a snapshot pair /Create snapshot pair with a new consistency group /Create and auto-split a snapshot pair /Create a snapshot pair using an existing consistency group /Create and clone snapshot pair /Create and clone snapshot pair with copy speed and clones automation /Create floating snapshot pair /Create Thin Image Advanced snapshot pair /Set retention period of snapshot pair with auto split tasks. |
|
wait_for_final_state boolean |
Should wait for final state after initiating the snapshot operation. Choices:
|
state string | The level of the snapshot task. Choices are Choices:
|
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. |
Notes
Note
- The input parameters
consistency_group_idandenable_quick_modewere removed in version 3.4.0. These were deprecated due to internal API simplification and are no longer supported. - Connection type
gatewaywas removed starting from version 3.4.0. Please use an earlier version if you require this connection type. - During automatic SVOL creation in a pair setup, the system provisions a single secondary host group/iSCSI target.
- For Create a snapshot pair
-
- 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.)
-
- Only VSP One B24, B26, and B28 support Thin Image Advanced.
- For Create snapshot pair with a new consistency group
-
- 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.)
-
- Only VSP One B24, B26, and B28 support Thin Image Advanced.
- For Split a snapshot pair
-
- Splitting a snapshot pair will fail if the pair belongs to a consistency group.
- For Restore a snapshot pair
-
- To restore a Thin Image and Thin Image Advanced pair, the pair must be in PSUS status. After restoration, the Thin Image Advanced pair remains in PSUS status, while the Thin Image pair changes to PAIR status.
- For Delete a snapshot pair
-
- If the pair includes an SVOL, it is unmapped from the associated host group(s), iSCSI target(s), and NVM subsystem(s), and then deleted.
- For Delete Thin Image pairs by snapshot tree
-
- Thin Image Advanced is not available for this task.
- For Assign floating snapshot pair
-
- Thin Image Advanced pairs must have a PSUS status assigned.
- For Unassign floating snapshot pair
-
- The SVOL is detached from the mapped host groups, iSCSI targets, and NVM subsystems, and then deleted.
- For Set retention period of an existing snapshot pair
- If your P-VOL and S-VOL are a new Thin Image (HTI) pair and the desired state is split, the workflow is
-
- Create the new TI pair (from two unpaired volumes).
-
- Split the pair to store snapshot data (so the snapshot is preserved and copy-on-write stops).
- For Set retention period of snapshot pair after split If your P-VOL and S-VOL are a new Thin Image (HTI) pair and the desired state is split, the workflow is
-
- Create the new TI pair (from two unpaired volumes).
-
- Split the pair to store snapshot data (so the snapshot is preserved and copy-on-write stops).
- For Set retention period of snapshot pair with auto split If your P-VOL and S-VOL are a new Thin Image (HTI) pair and the desired state is split, the workflow is
-
- Create the new TI pair (from two unpaired volumes).
-
- Split the pair to store snapshot data (so the snapshot is preserved and copy-on-write stops).
- For Deleting garbage data of all Thin Image pairs in a snapshot tree
-
- Thin Image Advanced pairs do not support this task.
Examples
- name: Create a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: present
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
pool_id: 1
snapshot_group_name: "snap_group"
- name: Create a thin image advance cascade
hitachivantara.vspone_block.vsp.hv_snapshot:
state: present
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
pool_id: 1
snapshot_group_name: "snap_group"
can_cascade: true
is_data_reduction_force_copy: true
- name: Create a thin image clone pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: present
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
pool_id: 1
snapshot_group_name: "snap_group"
is_clone: true
- name: Clone a thin image clone pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: clone
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
- name: Delete a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: absent
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 10
- name: Split a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: split
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 10
- name: Resync a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: resync
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 10
- name: Restore a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: restore
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
- name: Set the retention period for a snapshot
hitachivantara.vspone_block.vsp.hv_snapshot:
state: split
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
retention_period: 500
- name: Set the retention period for a snapshot with auto split.
hitachivantara.vspone_block.vsp.hv_snapshot:
state: split
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 123
mirror_unit: 3
retention_period: 500
pool_id: 1
snapshot_group_name: "snap_group"
- name: Create and clone snapshot pair with copy speed and clones automation
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
pool_id: 5
snapshot_group_name: "snapshot-group-name-1"
is_clone: true
copy_speed: "FAST"
clones_automation: true
- name: Create floating snapshot pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
secondary_volume_id: -1
pool_id: 5
snapshot_group_name: "snapshot-group-name-1"
mirror_unit_number: 4
- name: Assign floating snapshot pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
secondary_volume_id: 200
mirror_unit_number: 1
- name: Unassign floating snapshot pair
hitachivantara.vspone_block.vsp.hv_snapshot:
state: "present"
connection_info:
address: storage1.company.com
username: "username"
password: "password"
spec:
primary_volume_id: 100
secondary_volume_id: -1
mirror_unit_number: 1
- name: Deleting garbage data of all Thin Image pairs in a snapshot tree
hitachivantara.vspone_block.vsp.hv_snapshot:
connection_info:
address: storage1.company.com
username: "username"
password: "password"
state: "defragment"
spec:
primary_volume_id: 100
operation_type: "start"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
snapshot_data list / elements=dictionary | A list of snapshots gathered from the storage system. Returned: always |
|
can_cascade boolean |
Indicates if the snapshot can be cascaded. Returned: success Sample: |
|
concordance_rate integer |
Concordance rate of the snapshot operation. Returned: success Sample: |
|
copy_pace_track_size string |
Copy pace track size. Returned: success Sample: |
|
copy_rate integer |
Copy rate of the snapshot. Returned: success Sample: |
|
is_clone boolean |
Indicates if the snapshot is a clone. Returned: success Sample: |
|
is_cloned boolean |
Indicates if the snapshot has been cloned. Returned: success Sample: |
|
is_consistency_group boolean |
Indicates if the snapshot is part of a consistency group. Returned: success Sample: |
|
is_data_reduction_force_copy boolean |
Indicates if data reduction force copy is enabled. Returned: success Sample: |
|
is_redirect_on_write boolean |
Indicates if redirect-on-write is enabled. Returned: success Sample: |
|
is_snapshot_data_read_only boolean |
Indicates if the snapshot data is read-only. Returned: success |
|
is_written_in_svol boolean |
Indicates if data is written in the secondary volume. Returned: success Sample: |
|
mirror_unit_id integer |
Deprecated. Use mirror_unit_number instead. Identifier of the mirror unit. Returned: success Sample: |
|
mirror_unit_number integer |
Number of the mirror unit. Returned: success Sample: |
|
pool_id integer |
ID of the pool where the snapshot is allocated. Returned: success Sample: |
|
primary_hex_volume_id string |
Hexadecimal ID of the primary volume. Returned: success Sample: |
|
primary_volume_id integer |
ID of the primary volume. Returned: success Sample: |
|
progress_rate integer |
Progress rate of the snapshot operation. Returned: success Sample: |
|
pvol_host_groups list / elements=string |
List of host groups for the primary volume. Returned: success Sample: |
|
pvol_nvm_subsystem_name string |
NVM subsystem name for the primary volume. Returned: success Sample: |
|
pvol_processing_status string |
Processing status of the primary volume. Returned: success Sample: |
|
retention_period_in_hours integer |
Retention period of the snapshot. Returned: success Sample: |
|
secondary_hex_volume_id string |
Hexadecimal ID of the secondary volume. Returned: success Sample: |
|
secondary_volume_id integer |
ID of the secondary volume. Returned: success Sample: |
|
snapshot_group_name string |
Name of the snapshot group. Returned: success Sample: |
|
snapshot_id string |
ID of the snapshot. Returned: success Sample: |
|
split_time string |
Time when the snapshot was split. Returned: success Sample: |
|
status string |
Status of the snapshot. Returned: success Sample: |
|
svol_host_groups list / elements=string |
List of host groups for the secondary volume. Returned: success Sample: |
|
svol_nvm_subsystem_name string |
NVM subsystem name for the secondary volume. Returned: success Sample: |
|
svol_processing_status string |
Processing status of the secondary volume. Returned: success Sample: |
|
type string |
Type of the snapshot. Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/hitachivantara/vspone_block/vsp.hv_snapshot_module.html