ibm.spectrum_virtualize.ibm_svc_manage_volumegroup module – This module manages volume groups on IBM Spectrum Virtualize family storage systems
Note
This module is part of the ibm.spectrum_virtualize collection (version 2.0.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_svc_manage_volumegroup
.
Note
The ibm.spectrum_virtualize collection has been renamed to ibm.storage_virtualize and will eventually be removed from Ansible. The content of ibm.spectrum_virtualize will be replaced by redirects to ibm.storage_virtualize in Ansible 10. If you use content from ibm.spectrum_virtualize, please update FQCNs in your playbooks and roles! When creating new playbooks or roles, directly use content from ibm.storage_virtualize instead.
New in ibm.spectrum_virtualize 1.6.0
Synopsis
Ansible interface to manage ‘mkvolumegroup’, ‘chvolumegroup’, and ‘rmvolumegroup’ 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 parent volume group of the snapshot. This is used to prepopulate the new volume in the new volume group. Valid during creation of host accessible volume group from an existing snapshot. |
|
Allows user to create snapshots through the scheduler or manually with `addsnapshot`. This can only be used if a volume in the volume group is used as a source of a user legacy FlashCopy mapping. Valid during creation and update of a volume group. Supported from Spectrum Virtualize family storage systems 8.5.2.0 or later. Choices:
|
|
Specifies the I/O group for new volumes. Valid during creation of host accessible volume group from an existing snapshot. |
|
Path of debug log file. |
|
Specifies the name for the volume group. |
|
If specified `True`, the object is removed from the ownership group to which it belongs. Parameters ownershipgroup and noownershipgroup are mutually exclusive. Applies when state=present to modify an existing volume group. Choices:
|
|
If specified `True`, removes the replication policy assigned to the volume group. Parameters replicationpolicy and noreplicationpolicy are mutually exclusive. Applies when state=present to modify an existing volume group. Supported from Spectrum Virtualize family storage systems 8.5.2.1 or later. Choices:
|
|
If specified `True`, removes the Safeguarded policy assigned to the volume group. Parameters safeguardpolicyname and nosafeguardpolicy are mutually exclusive. Applies when state=present to modify an existing volume group. Choices:
|
|
If specified `True`, removes the snapshot policy assigned to the volume group. Parameters snapshotpolicy and nosnapshotpolicy are mutually exclusive. Applies when state=present to modify an existing volume group. Choices:
|
|
Specifies the name of the ownership group to which the object is being added. ownershipgroup is mutually exclusive with parameters safeguardpolicyname and noownershipgroup. Applies when state=present. |
|
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 time when the first Safeguarded backup is to be taken. This parameter can also be associated with snapshot policy. safeguardpolicyname is required when using policystarttime. The accepted format is YYMMDDHHMM. Applies when state=present. |
|
Specifies the pool name where the target volumes are to be created. Valid during creation of host accessible volume group from an existing snapshot. |
|
Specifies the name of the replication policy to be assigned to the volume group. Applies when state=present. Supported from Spectrum Virtualize family storage systems 8.5.2.1 or later. |
|
If specified, the snapshot policy creates safeguarded snapshots. Should be specified along with snapshotpolicy. Valid during creation and update of a volume group. Supported from Spectrum Virtualize family storage systems 8.5.2.0 or later. Choices:
|
|
The name of the Safeguarded policy to be assigned to the volume group. safeguardpolicyname is mutually exclusive with parameters nosafeguardpolicy and ownershipgroup. Applies when state=present. |
|
Specifies the name of the snapshot used to prepopulate the new volumes in the new volume group. Required when creating a host accessible volume group from an existing snapshot. |
|
The name of the snapshot policy to be assigned to the volume group. snapshotpolicy is mutually exclusive with parameters nosnapshotpolicy and ownershipgroup. Applies when state=present. |
|
Specifies whether to suspend ( Applies when state=present to modify an existing volume group. Choices:
|
|
Creates or 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. |
|
Specifies the type of volume group to be created from the snapshot. Valid during creation of host accessible volume group from an existing snapshot. Choices:
|
|
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
.Safeguarded policy and snapshot policy cannot be used at the same time. Therefore, the parameters snapshotpolicy and safeguardpolicyname are mutually exclusive.
Examples
- name: Create a new volume group
ibm.spectrum_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
state: present
- name: Delete a volume group
ibm.spectrum_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
state: absent
- name: Update existing volume group to remove ownershipgroup and attach a safeguardpolicy to it
ibm.spectrum_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
state: present
noownershipgroup: True
safeguardpolicyname: sg1
- name: Update volumegroup with snapshot policy and remove safeguarded policy
ibm.spectrum_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
nosafeguardpolicy: true
snapshotpolicy: sp1
state: present
- name: Update volumegroup with safeguarded snapshot policy and ignoreuserfcmaps
ibm.spectrum_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
safeguarded: true
snapshotpolicy: sp1
ignoreuserfcmaps: yes
state: present
- name: Suspend snapshot policy in an existing volume group
ibm.spectrum_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
snapshotpolicysuspended: true
state: present
- name: Create host accessible volume group from an existing snapshot
ibm.spectrum_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: host_accessible_vg
type: clone
snapshot: snapshot0
fromsourcegroup: vg0
pool: Pool0
state: present