ibm.spectrum_virtualize.ibm_sv_manage_snapshot module – This module manages snapshots (PiT image of a volume) on IBM Spectrum Virtualize family storage systems
Note
This module is part of the ibm.spectrum_virtualize collection (version 1.10.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 ibm.spectrum_virtualize
.
To use it in a playbook, specify: ibm.spectrum_virtualize.ibm_sv_manage_snapshot
.
New in ibm.spectrum_virtualize 1.9.0
Synopsis
In this implementation, a snapshot is a mutually consistent image of the volumes in a volume group or a list of independent volume(s).
This Ansible module provides the interface to manage snapshots through ‘addsnapshot’, ‘chsnapshot’ and ‘rmsnapshot’ Spectrum Virtualize commands.
Parameters
Parameter |
Comments |
---|---|
The hostname or management IP of the Spectrum Virtualize storage system. |
|
Domain for the Spectrum Virtualize storage system. Valid when hostname is used for the parameter clustername. |
|
Specifies the addition of the volume snapshots although there are already legacy FlashCopy mappings using the volume as a source. Choices:
|
|
Path of debug log file. |
|
Specifies the name of a snapshot. |
|
Specifies the old name of a snapshot. Valid when state=present, to rename the existing snapshot. |
|
Specifies the name of the ownershipgroup. Valid when state=present, to update an existing snapshot. |
|
REST API password for the Spectrum Virtualize storage system. The parameters username and password are required if not using token to authenticate a user. |
|
Specifies the retention period in days. safeguarded and retentiondays are required together. Applies, when state=present to create a safeguarded snapshot. |
|
Flag to create a safeguarded snapshot. safeguarded and retentiondays are required together. Supported in SV build 8.5.2.0 or later. Choices:
|
|
Specifies the name of child pool within which the snapshot is being created. |
|
Specifies the name of the volumes for which the snapshots are to be created. List of volume names can be specified with the delimiter colon. Valid when state=present, to create a snapshot. |
|
Specifies the name of the source volume group for which the snapshot is being created. src_volumegroup_name and src_volume_names are mutually exclusive. Required one of src_volumegroup_name or src_volume_names for creation of snapshot. |
|
Creates, updates ( Choices:
|
|
The authentication token to verify a user on the Spectrum Virtualize storage system. To generate a token, use the ibm.spectrum_virtualize.ibm_svc_auth module. |
|
REST API username for the Spectrum Virtualize storage system. The parameters username and password are required if not using token to authenticate a user. |
|
Validates certification. Choices:
|
Notes
Note
This module supports
check_mode
.This module automates the new Snapshot function, implemented by Spectrum Virtualize, which is using a simplified management model. Any user requiring the flexibility available with legacy FlashCopy can continue to use the existing module ibm.spectrum_virtualize.ibm_svc_manage_flashcopy.
Snapshots created by this Ansible module are not directly accessible from the hosts. To create a new group of host accessible volumes from a snapshot, use ibm.spectrum_virtualize.ibm_svc_manage_volumegroup module.
Examples
- name: Create volumegroup snapshot
ibm.spectrum_virtualize.ibm_sv_manage_snapshot:
clustername: '{{clustername}}'
username: '{{username}}'
password: '{{password}}'
name: ansible_1
src_volumegroup_name: volumegroup1
snapshot_pool: Pool0Childpool0
state: present
- name: Create volumes snapshot
ibm.spectrum_virtualize.ibm_sv_manage_snapshot:
clustername: '{{clustername}}'
username: '{{username}}'
password: '{{password}}'
name: ansible_2
src_volume_names: vdisk0:vdisk1
snapshot_pool: Pool0Childpool0
state: present
- name: Create safeguarded snapshot
ibm.spectrum_virtualize.ibm_sv_manage_snapshot:
clustername: '{{clustername}}'
username: '{{username}}'
password: '{{password}}'
name: ansible_2
src_volume_names: vdisk0:vdisk1
safeguarded: true
retentiondays: 1
snapshot_pool: Pool0Childpool0
state: present
- name: Update snapshot ansible_2
ibm.spectrum_virtualize.ibm_sv_manage_snapshot:
clustername: '{{clustername}}'
username: '{{username}}'
password: '{{password}}'
name: ansible_new
old_name: ansible_2
ownershipgroup: ownershipgroup0
state: present
- name: Delete volumegroup snapshot
ibm.spectrum_virtualize.ibm_sv_manage_snapshot:
clustername: '{{clustername}}'
username: '{{username}}'
password: '{{password}}'
name: ansible_1
src_volumegroup_name: volumegroup1
state: absent
- name: Delete volume snapshot
ibm.spectrum_virtualize.ibm_sv_manage_snapshot:
clustername: '{{clustername}}'
username: '{{username}}'
password: '{{password}}'
name: ansible_new
state: absent