ibm.storage_virtualize.ibm_svc_manage_volumegroup (2.3.1) — module

This module manages volume groups on IBM Storage Virtualize family systems

| "added in version" 1.6.0 of ibm.storage_virtualize"

Authors: Shilpi Jain(@Shilpi-J), Sanjaikumaar M (@sanjaikumaar), Sumit Kumar Gupta (@sumitguptaibm)

Install collection

Install with ansible-galaxy collection install ibm.storage_virtualize:==2.3.1


Add to requirements.yml

  collections:
    - name: ibm.storage_virtualize
      version: 2.3.1

Description

Ansible interface to manage 'mkvolumegroup', 'chvolumegroup', and 'rmvolumegroup' commands.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
name:
    description:
    - Specifies the name for the volume group.
    required: true
    type: str

pool:
    description:
    - Specifies the pool name where the target volumes are to be created.
    - Valid during creation of host accessible volume group from an existing snapshot.
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

type:
    choices:
    - clone
    - thinclone
    description:
    - Specifies the type of volume group to be created from the snapshot.
    - Valid during creation of host accessible volume group from an existing snapshot.
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

iogrp:
    description:
    - Specifies the I/O group for new volumes.
    - Valid during creation of host accessible volume group from an existing snapshot.
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

state:
    choices:
    - absent
    - present
    description:
    - Creates or updates (C(present)) or removes (C(absent)) a volume group.
    required: true
    type: str

token:
    description:
    - The authentication token to verify a user on the Storage Virtualize system.
    - To generate a token, use the M(ibm.storage_virtualize.ibm_svc_auth) module.
    type: str

domain:
    description:
    - Domain for the Storage Virtualize system.
    - Valid when hostname is used for the parameter I(clustername).
    type: str

log_path:
    description:
    - Path of debug log file.
    type: str

old_name:
    description:
    - Specifies the old name of the volume group during renaming.
    - Valid when I(state=present), to rename an existing volume group.
    type: str
    version_added: 2.0.0
    version_added_collection: ibm.storage_virtualize

password:
    description:
    - REST API password for the Storage Virtualize system.
    - The parameters I(username) and I(password) are required if not using I(token) to
      authenticate a user.
    type: str

snapshot:
    description:
    - 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.
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

username:
    description:
    - REST API username for the Storage Virtualize system.
    - The parameters I(username) and I(password) are required if not using I(token) to
      authenticate a user.
    type: str

partition:
    description:
    - Specifies the name of the storage partition to be assigned to the volume group.
    - Applies when I(state=present).
    - Supported from Storage Virtualize family systems 8.6.1.0 or later.
    type: str
    version_added: 2.1.0
    version_added_collection: ibm.storage_virtualize

clustername:
    description:
    - The hostname or management IP of the Storage Virtualize system.
    required: true
    type: str

nopartition:
    description:
    - If specified `True`, removes the volume group from the storage partition.
    - Parameters I(partition) and I(nopartition) are mutually exclusive.
    - Applies when I(state=present) to modify an existing volume group.
    - Supported from Storage Virtualize family systems 8.6.1.0 or later.
    type: bool
    version_added: 2.1.0
    version_added_collection: ibm.storage_virtualize

safeguarded:
    default: false
    description:
    - If specified, the snapshot policy creates safeguarded snapshots.
    - Should be specified along with I(snapshotpolicy).
    - Valid during creation and update of a volume group.
    - Supported from Storage Virtualize family systems 8.5.2.0 or later.
    type: bool
    version_added: 1.10.0
    version_added_collection: ibm.storage_virtualize

evictvolumes:
    description:
    - If specified `True`, delete the volume group but does not remove volumes.
    - Applies when I(state=absent) to delete the volume group, keeping associated volumes.
    - Supported from Storage Virtualize family systems from 8.6.2.0 or later.
    type: bool
    version_added: 2.2.0
    version_added_collection: ibm.storage_virtualize

ownershipgroup:
    description:
    - Specifies the name of the ownership group to which the object is being added.
    - I(ownershipgroup) is mutually exclusive with parameters I(safeguardpolicyname) and
      I(noownershipgroup).
    - Applies when I(state=present).
    type: str

snapshotpolicy:
    description:
    - The name of the snapshot policy to be assigned to the volume group.
    - I(snapshotpolicy) is mutually exclusive with parameters I(nosnapshotpolicy) and
      I(ownershipgroup).
    - Applies when I(state=present).
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

validate_certs:
    default: false
    description:
    - Validates certification.
    type: bool

fromsourcegroup:
    description:
    - 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.
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

policystarttime:
    description:
    - Specifies the time when the first Safeguarded backup is to be taken.
    - This parameter can also be associated with snapshot policy.
    - I(safeguardpolicyname) is required when using I(policystarttime).
    - The accepted format is YYMMDDHHMM.
    - Applies when I(state=present).
    type: str

ignoreuserfcmaps:
    choices:
    - 'yes'
    - 'no'
    description:
    - 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.
    type: str
    version_added: 1.10.0
    version_added_collection: ibm.storage_virtualize

noownershipgroup:
    description:
    - If specified `True`, the object is removed from the ownership group to which it
      belongs.
    - Parameters I(ownershipgroup) and I(noownershipgroup) are mutually exclusive.
    - Applies when I(state=present) to modify an existing volume group.
    type: bool

nosnapshotpolicy:
    description:
    - If specified `True`, removes the snapshot policy assigned to the volume group.
    - Parameters I(snapshotpolicy) and I(nosnapshotpolicy) are mutually exclusive.
    - Applies when I(state=present) to modify an existing volume group.
    type: bool
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

fromsourcevolumes:
    description:
    - 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 I(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.
    type: str
    version_added: 2.3.0
    version_added_collection: ibm.storage_virtualize

nosafeguardpolicy:
    description:
    - If specified `True`, removes the Safeguarded policy assigned to the volume group.
    - Parameters I(safeguardpolicyname) and I(nosafeguardpolicy) are mutually exclusive.
    - Applies when I(state=present) to modify an existing volume group.
    type: bool

replicationpolicy:
    description:
    - Specifies the name of the replication policy to be assigned to the volume group.
    - Applies when I(state=present).
    - Supported from Storage Virtualize family systems 8.5.2.1 or later.
    type: str
    version_added: 1.10.0
    version_added_collection: ibm.storage_virtualize

noreplicationpolicy:
    description:
    - If specified `True`, removes the replication policy assigned to the volume group.
    - Parameters I(replicationpolicy) and I(noreplicationpolicy) are mutually exclusive.
    - Applies when I(state=present) to modify an existing volume group.
    - Supported from Storage Virtualize family systems 8.5.2.1 or later.
    type: bool
    version_added: 1.10.0
    version_added_collection: ibm.storage_virtualize

safeguardpolicyname:
    description:
    - The name of the Safeguarded policy to be assigned to the volume group.
    - I(safeguardpolicyname) is mutually exclusive with parameters I(nosafeguardpolicy)
      and I(ownershipgroup).
    - Applies when I(state=present).
    type: str

snapshotpolicysuspended:
    choices:
    - 'yes'
    - 'no'
    description:
    - Specifies whether to suspend (C(yes)) or resume (C(no)) the snapshot policy on this
      volume group.
    - Applies when I(state=present) to modify an existing volume group.
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize