hitachivantara.vspone_block.vsp.hv_snapshot module – Manages snapshots 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_snapshot
.
New in hitachivantara.vspone_block 3.0.0
Synopsis
This module allows for the creation, deletion, splitting, syncing, and restoring of snapshots on Hitachi VSP 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.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. |
|
Specification for the snapshot task. |
|
Specify whether to allocate a consistency group. Choices:
|
|
Specify whether to automatically split the pair. Choices:
|
|
Specify whether the pair can be cascaded. Default is True when capacity savings is not Choices:
|
|
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. Choices:
|
|
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. Choices:
|
|
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. Choices:
|
|
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:
|
|
ID of the mirror unit. |
|
ID of the pool where the snapshot will be allocated. |
|
ID of the primary volume. |
|
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. |
|
Secondary volume id. |
|
Name of the snapshot group. |
|
The level of the snapshot task. Choices are 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 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_id: 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_id: 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_id: 1
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A list of snapshots gathered from the storage system. Returned: always |
|
Indicates if the snapshot can be cascaded. Returned: success Sample: |
|
Concordance rate of the snapshot operation. Returned: success Sample: |
|
Copy pace track size. Returned: success Sample: |
|
Copy rate of the snapshot. Returned: success Sample: |
|
Indicates if the snapshot is part of a consistency group. Returned: success Sample: |
|
ID of the mirror unit. Returned: success Sample: |
|
ID of the pool where the snapshot is allocated. Returned: success Sample: |
|
Hexadecimal ID of the primary volume. Returned: success Sample: |
|
Indicates if the volume is primary or secondary. Returned: success Sample: |
|
ID of the primary volume. Returned: success Sample: |
|
Progress rate of the snapshot operation. Returned: success Sample: |
|
Retention period of the snapshot. Returned: success Sample: |
|
Hexadecimal ID of the secondary volume. Returned: success Sample: |
|
ID of the secondary volume. Returned: success Sample: |
|
Name of the snapshot group. Returned: success Sample: |
|
ID of the snapshot. Returned: success Sample: |
|
Status of the snapshot. Returned: success Sample: |
|
Serial number of the storage system. Returned: success Sample: |
|
Access mode of the secondary volume. Returned: success Sample: |
|
Type of the snapshot. Returned: success Sample: |