ibm.storage_virtualize.ibm_svc_manage_volume (2.3.1) — module

This module manages standard volumes on IBM Storage Virtualize family systems

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

Authors: Sreshtant Bohidar(@Sreshtant-Bohidar)

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 'mkvolume', 'rmvolume', and 'chvdisk' volume commands.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{domain}}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "volume_name"
    state: "present"
    pool: "pool_name"
    size: "1"
    unit: "gb"
    iogrp: "io_grp0, io_grp1"
    volumegroup: "test_volumegroup"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a thin-provisioned volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "volume_name"
    state: "present"
    pool: "pool_name"
    size: "1"
    unit: "gb"
    iogrp: "io_grp0, io_grp1"
    thin: true
    buffersize: 10%
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a compressed volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "volume_name"
    state: "present"
    pool: "pool_name"
    size: "1"
    unit: "gb"
    iogrp: "io_grp0, io_grp1"
    compressed: true
    buffersize: 10%
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Creating a volume with iogrp- io_grp0
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain}}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "volume_name"
    state: "present"
    pool: "pool_name"
    size: "1"
    unit: "gb"
    iogrp: "io_grp0"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create thinclone volume from volume vol1
  ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "vol1_thinclone"
    fromsourcevolume: "vol1"
    state: "present"
    pool: "pool0"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create clone volume from volume vol1
  ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "vol1_clone"
    fromsourcevolume: "vol1"
    state: "present"
    pool: "pool0"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Adding a new iogrp- io_grp1
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "volume_name"
    state: "present"
    pool: "pool_name"
    size: "1"
    unit: "gb"
    iogrp: "io_grp0, iogrp1"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Rename an existing volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    old_name: "volume_name"
    name: "new_volume_name"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Enable cloud backup in an existing volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "volume_name"
    enable_cloud_snapshot: true
    cloud_account_name: "aws_acc"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete a volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "new_volume_name"
    state: "absent"

Inputs

    
name:
    description:
    - Specifies the name to assign to the new volume.
    required: true
    type: str

pool:
    description:
    - Specifies the name of the storage pool to use while creating the volume.
    - This parameter is required when I(state=present), to create a volume.
    type: str

size:
    description:
    - Defines the size of the volume. This parameter can also be used to resize an existing
      volume.
    - Required when I(state=present), to create or modify a volume.
    type: str

thin:
    description:
    - Specifies that a thin-provisioned volume is to be created.
    - Parameters 'thin' and 'compressed' are mutually exclusive.
    - Valid when I(state=present), to create a thin-provisioned volume.
    type: bool

type:
    choices:
    - thinclone
    - clone
    description:
    - Specifies the type of volume to create. Volume can be thinclone or clone type.
    - Valid when I(state=present), to create a thinclone or clone volume.
    - Supported from Storage Virtualize family systems from 8.6.2.0 or later.
    type: str

unit:
    choices:
    - b
    - kb
    - mb
    - gb
    - tb
    - pb
    default: mb
    description:
    - Specifies the data units to use with the capacity that is specified by the 'size'
      parameter.
    - I(size) is required when using I(unit).
    type: str

iogrp:
    description:
    - Specifies the list of I/O group names. Group names in the list must be separated
      by using a comma.
    - While creating a new volume, the first I/O group in the list is added as both cached
      & access I/O group, while remaining I/O groups are added as access I/O groups.
    - This parameter supports update functionality.
    - Valid when I(state=present), to create or modify a volume.
    type: str

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

token:
    description:
    - The authentication token to verify a user on the Storage Virtualize system.
    - To generate a token, use the 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

allow_hs:
    default: false
    description:
    - If specified `True`, manages the hyperswap volume by ignoring the volume type validation.
    - Valid when I(state=present), to modify an existing volume.
    type: bool
    version_added: 2.0.0
    version_added_collection: ibm.storage_virtualize

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

old_name:
    description:
    - Specifies the old name of the volume during renaming.
    - Valid when I(state=present), to rename an existing volume.
    type: str
    version_added: 1.9.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

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

buffersize:
    description:
    - Specifies the pool capacity that the volume will reserve as a buffer for thin-provisioned
      and compressed volumes.
    - Parameter 'thin' or 'compressed' must be specified to use this parameter.
    - The default buffer size is 2%.
    - I(thin) or I(compressed) is required when using I(buffersize).
    - Valid when I(state=present), to create a volume.
    type: str

compressed:
    description:
    - Specifies that a compressed volume is to be created.
    - Parameters 'compressed' and 'thin' are mutually exclusive.
    - Valid when I(state=present), to create a compressed volume.
    type: bool

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

volumegroup:
    description:
    - Specifies the name of the volumegroup to which the volume is to be added.
    - Parameters 'volumegroup' and 'novolumegroup' are mutually exclusive.
    - Valid when I(state=present), to create or modify a volume.
    type: str

deduplicated:
    description:
    - Specifies that a deduplicated volume is to be created.
    - Required when I(state=present), to create a deduplicated volume.
    type: bool

novolumegroup:
    description:
    - If specified `True`, the volume is removed from its associated volumegroup.
    - Parameters 'novolumegroup' and 'volumegroup' are mutually exclusive.
    - Valid when I(state=present), to modify a volume.
    type: bool

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

fromsourcevolume:
    description:
    - Specifies the volume name in the snapshot used to pre-populate clone or thinclone
      volume.
    - Valid when I(state=present), to create a thinclone or clone volume.
    - Supported from Storage Virtualize family systems from 8.6.2.0 or later.
    type: str

cloud_account_name:
    description:
    - Specifies the name of the cloud account name.
    - Valid when I(enable_cloud_snapshot=true).
    type: str
    version_added: 1.11.0
    version_added_collection: ibm.storage_virtualize

enable_cloud_snapshot:
    description:
    - Specify to enable or disable cloud snapshot.
    - Valid when I(state=present), to modify an existing volume.
    type: bool
    version_added: 1.11.0
    version_added_collection: ibm.storage_virtualize