ibm.storage_virtualize.ibm_svc_manage_volumegroup module – This module manages volume groups on IBM Storage Virtualize family systems
Note
This module is part of the ibm.storage_virtualize collection (version 2.5.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.storage_virtualize
.
To use it in a playbook, specify: ibm.storage_virtualize.ibm_svc_manage_volumegroup
.
New in ibm.storage_virtualize 1.6.0
Synopsis
Ansible interface to manage ‘mkvolumegroup’, ‘chvolumegroup’, and ‘rmvolumegroup’ commands.
Parameters
Parameter |
Comments |
---|---|
The hostname or management IP of the Storage Virtualize system. |
|
Domain for the Storage Virtualize system. Valid when hostname is used for the parameter clustername. |
|
Specifies the name of the draft partition to be assigned to the volume group. Applies when state=present. Supported from Storage Virtualize family systems 8.6.3.0 or later. |
|
If specified `True`, delete the volume group but does not remove volumes. Applies when state=absent to delete the volume group, keeping associated volumes. Supported from Storage Virtualize family systems from 8.6.2.0 or later. Choices:
|
|
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. |
|
Specifies colon-separated list of the parent volumes. When combined with the type parameter and a snapshot, this allows the user to create a volumegroup with a subset of those volumes whose image is present in a snapshot. Applies when state=present to create volumegroup clone or thinclone, from subset of volumes of snapshot. Supported from Storage Virtualize family systems from 8.6.2.0 or later. |
|
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 Storage Virtualize family 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 volume group from the storage partition. Parameters partition and nopartition are mutually exclusive. Applies when state=present to modify an existing volume group. Supported from Storage Virtualize family systems 8.6.1.0 or later. 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 Storage Virtualize family 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 old name of the volume group during renaming. Valid when state=present, to rename an existing volume group. |
|
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. |
|
Specifies the name of the storage partition to be assigned to the volume group. Applies when state=present. Supported from Storage Virtualize family systems 8.6.1.0 or later. |
|
REST API password for the Storage Virtualize 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 Storage Virtualize family 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 Storage Virtualize family 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 Storage Virtualize system. To generate a token, use the ibm.storage_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 Storage Virtualize 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.storage_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.storage_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.storage_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.storage_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.storage_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.storage_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.storage_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
- name: Create a volumegroup thinclone from a list of volumes
ibm.storage_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
type: thinclone
fromsourcevolumes: vol1:vol2
pool: Pool0
state: present
- name: Create a volumegroup clone from a list of volumes
ibm.storage_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
type: clone
fromsourcevolumes: vol1:vol2
pool: Pool0
state: present
- name: Delete a volume group, keeping volumes which were associated with volumegroup
ibm.storage_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
state: absent
evictvolumes: true
- name: Add new or existing volumegroup to a draft partition
ibm.storage_virtualize.ibm_svc_manage_volumegroup:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: vg0
state: present
draftpartition: partition_name