ibm.storage_virtualize.ibm_sv_manage_clone module – This module manages clone and thinclone of volume and volumegroup

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

New in ibm.storage_virtualize 3.2.0

Synopsis

  • Ansible interface to manage ‘mkvolume’ and ‘mkvolumegroup’ clone commands.

Parameters

Parameter

Comments

clustername

string / required

The hostname, management IP or partition IP of the Storage Virtualize system.

domain

string

Domain for the Storage Virtualize system.

Valid when hostname is used for the parameter clustername.

fromsourcevolumes

string

Specifies colon-separated list of the parent volumes.

The parameters fromsourcevolumes is mandatory for clone volumes and optional for clone volume groups while creating clone.

ignoreuserfcmaps

string

Indicates that snapshots can be created with the scheduler or with the addsnapshot command, if any volumes in the volume group are used as a source volume in legacy FlashCopy mapping.

Choices:

  • "yes"

  • "no"

iogrp

string

Specifies the name of the I/O group for the new clone.

log_path

string

Path of debug log file.

name

string / required

Specifies a name for the new clone.

ownershipgroup

string

Specifies the name of the ownership group to which the object is being added.

partition

string

Specifies the name of the storage partition to be assigned to the volume group.

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

The parameters pool is mandatory for clone volumes and optional for clone volume groups while creating clone.

preferrednode

string

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

snapshot

string

Specifies the name of the snapshot that is used to create the clone.

The parameters fromsourcevolumes is mandatory for creating clone.

state

string / required

Creates (present) or removes (absent) the clone object.

Choices:

  • "absent"

  • "present"

token

string

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.

type

string

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

Choices:

  • "clone"

  • "thinclone"

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 clone is to be added.

When logging in via partition IP, the volumegroup parameter is required to create a volume clone.

Notes

Note

  • This module supports check_mode.

  • This module currently only supports the creation of clone volume or volumegroup (state=present).

  • Support for updating or removing these clone objects may be added in a future release. For updating (converting thinclone to clone) or removing thinclone or clone for volume and volumegroup, use the ibm_svc_manage_volume or ibm_svc_manage_volumegroup modules, respectively.

  • This module supports log-in via partition-ip.

Examples

- name: Create a clone of a volume from snapshot
  ibm.storage_virtualize.ibm_svc_manage_clone:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "vol1_clone_1"
    state: "present"
    pool: "pool1"
    type: "clone"
    snapshot: "snapshot1"
    fromsourcevolumes: "vol1"
    iogrp: "io_grp0"
    preferrednode: "node1"
    volumegroup: "Vg1"
- name: Create a clone of a volumegroup from snapshot
  ibm.storage_virtualize.ibm_svc_manage_clone:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "vg1_clone_1"
    state: "present"
    pool: "pool1"
    type: "clone"
    snapshot: "snapshot1"
    iogrp: "io_grp0"
    partition: "ptn1"
    ownershipgroup: "grp1"
- name: Create a clone of volume vector from snapshot
  ibm.storage_virtualize.ibm_svc_manage_clone:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: "{{ log_path }}"
    name: "vg1_clone_1"
    state: "present"
    fromsourcevolumes: "vol1:vol2:vol3"
    pool: "pool1"
    type: "clone"
    snapshot: "snapshot1"
    iogrp: "io_grp0"
    partition: "ptn1"
    ownershipgroup: "grp1"

Authors

  • Sandip G. Rajbanshi (@Sandip-Rajbanshi)