ibm.storage_virtualize.ibm_svc_manage_volume module – This module manages standard volumes on IBM Storage Virtualize family systems

Note

This module is part of the ibm.storage_virtualize collection (version 3.2.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_volume.

New in ibm.storage_virtualize 1.6.0

Synopsis

  • Ansible interface to manage ‘mkvolume’, ‘rmvolume’, and ‘chvdisk’ volume commands.

Parameters

Parameter

Comments

allow_hs

boolean

added in ibm.storage_virtualize 2.0.0

If specified `True`, manages the hyperswap volume by ignoring the volume type validation.

Valid when state=present, to modify an existing volume.

Choices:

  • false ← (default)

  • true

autoexpand

string

added in ibm.storage_virtualize 3.2.0

Specifies whether thin-provisioned volume copies automatically expand their real capacities.

If specified as off, works as `noautoexpand`.

Choices:

  • "on"

  • "off"

buffersize

string

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%.

thin or compressed is required when using buffersize.

Valid when state=present, to create a volume.

cache

string

added in ibm.storage_virtualize 3.2.0

Specifies the caching options for the volume.

When not specified, the default value is ‘readwrite’.

Choices:

  • "readwrite"

  • "readonly"

  • "none"

cloud_account_name

string

added in ibm.storage_virtualize 1.11.0

Specifies the name of the cloud account name.

Valid when enable_cloud_snapshot=true.

clustername

string / required

The hostname or management IP or Partition IP of the Storage Virtualize system.

compressed

boolean

Specifies that a compressed volume is to be created.

Parameters ‘compressed’ and ‘thin’ are mutually exclusive.

Valid when state=present, to create a compressed volume.

Choices:

  • false

  • true

deduplicated

boolean

Specifies that a deduplicated volume is to be created.

Required when state=present, to create a deduplicated volume.

Choices:

  • false

  • true

domain

string

Domain for the Storage Virtualize system.

Valid when hostname is used for the parameter clustername.

enable_cloud_snapshot

boolean

added in ibm.storage_virtualize 1.11.0

Specify to enable or disable cloud snapshot.

Valid when state=present, to modify an existing volume.

Choices:

  • false

  • true

fromsourcevolume

string

Specifies the volume name in the snapshot used to pre-populate clone or thinclone volume.

Valid when state=present, to create a thinclone or clone volume.

Supported from Storage Virtualize family systems from 8.6.2.0 or later.

grainsize

integer

added in ibm.storage_virtualize 3.0.0

Sets the grain size for a thin-provisioned volume.

Choices:

  • 32

  • 64

  • 128

  • 256

iogrp

string

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 state=present, to create or modify a volume.

log_path

string

Path of debug log file.

name

string / required

Specifies the name to assign to the new volume.

novolumegroup

boolean

If specified `True`, the volume is removed from its associated volumegroup.

Parameters ‘novolumegroup’ and ‘volumegroup’ are mutually exclusive.

Valid when state=present, to modify a volume.

Choices:

  • false

  • true

old_name

string

added in ibm.storage_virtualize 1.9.0

Specifies the old name of the volume during renaming.

Valid when state=present, to rename an existing volume.

password

string

REST API password for the Storage Virtualize system.

The parameters username and password are required if not using token to authenticate a user.

pool

string

Specifies the name of the storage pool to use while creating the volume.

This parameter is required when state=present, to create a volume.

preferrednode

string

added in ibm.storage_virtualize 3.2.0

Specifies the preferred node name that is used to access the volume.

When not specified, the system selects the preferred node automatically.

size

string

Defines the size of the volume. This parameter can also be used to resize an existing volume.

Required when state=present, to create or modify a volume.

state

string / required

Creates or updates (present) or removes (absent) a volume.

Choices:

  • "absent"

  • "present"

thin

boolean

Specifies that a thin-provisioned volume is to be created.

Parameters ‘thin’ and ‘compressed’ are mutually exclusive.

Valid when state=present, to create a thin-provisioned volume.

Choices:

  • false

  • true

token

string

The authentication token to verify a user on the Storage Virtualize system.

To generate a token, use the ibm_svc_auth module.

type

string

Specifies the type of volume to create. Volume can be thinclone or clone type.

Valid when state=present, to create a thinclone or clone volume.

Supported from Storage Virtualize family systems from 8.6.2.0 or later.

Also used to convert a thinclone volume to clone. type = clone should be specified.

Choices:

  • "thinclone"

  • "clone"

unit

string

Specifies the data units to use with the capacity that is specified by the ‘size’ parameter.

size is required when using unit.

Choices:

  • "b"

  • "kb"

  • "mb"

  • "gb"

  • "tb"

  • "pb"

unmap

list / elements=string

added in ibm.storage_virtualize 2.7.0

Removes specified objects associated with the volume which is to be deleted.

Valid when state=absent, to delete a volume.

Choices:

  • "host_mappings"

  • "remotecopy_relationships"

  • "flashcopy_mappings"

username

string

REST API username for the Storage Virtualize system.

The parameters username and password are required if not using token to authenticate a user.

validate_certs

boolean

Validates certification.

Choices:

  • false ← (default)

  • true

volumegroup

string

Specifies the name of the volumegroup to which the volume is to be added.

Parameters ‘volumegroup’ and ‘novolumegroup’ are mutually exclusive.

Valid when state=present, to create or modify a volume.

warning

integer

added in ibm.storage_virtualize 2.7.0

Raises a warning when the used disk capacity on the thin-provisioned copy first exceeds the specified threshold.

The value is specified as a percentage of the total capacity of the thin-provisioned volume, hence it must be between 0 and 100.

When not specified, the default value is 80%.

Valid when state=present, to create or modify a thin-provisioned or compressed volume.

Notes

Note

  • This module supports check_mode.

  • For unmap parameter, the option remotecopy_relationships has been deprecated from 8.7.1.0 onwards.

  • CMMVC9855E The command failed because one of more of the specified volumes does not exist. This error occurs when the user-provided volume(s) do not exist.

  • This module supports logging in via partition IP.

  • To create a clone or thinclone of a Volume, please refer to ibm_sv_manage_clone module.

Examples

- 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"
- 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%
- 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%
- 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"
- name: Create thinclone volume from volume vol1
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "vol1_thinclone"
    fromsourcevolume: "vol1"
    state: "present"
    pool: "pool0"
    type: "thinclone"
- name: Create clone volume from volume vol1
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "vol1_clone"
    fromsourcevolume: "vol1"
    state: "present"
    pool: "pool0"
    type: "clone"
- 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"
    iogrp: "io_grp0, io_grp1"
- 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"
- name: Convert a thinclone volume to clone
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "vol0-0"
    type: "clone"
    log_path: "{{ log_path }}"
    state: "present"
- name: Convert list of thinclone volumes to clone
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "vol0:vol1:vol2"
    type: "clone"
    log_path: "{{ log_path }}"
    state: "present"
- name: Update size of volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "volume_name"
    size: "2"
    unit: "gb"
    state: "present"
- name: Update volumegroup of volume
  ibm.storage_virtualize.ibm_svc_manage_volume:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    name: "volume_name"
    volumegroup: "vg1"
    state: "present"
- 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"
- 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"
- name: Delete a volume and remove associated host mappings, remote copy relationships, and flashcopy mappings
  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"
    unmap: ['host_mappings', 'remotecopy_relationships', 'flashcopy_mappings']
- name: Create a thin volume with grainsize
  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"
    thin: true
    grainsize: 32

Authors

  • Sreshtant Bohidar(@Sreshtant-Bohidar)

  • Rahul Pawar(@rahul-p)

  • Sumit Kumar Gupta(@sumitguptaibm)