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.4.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 |
|---|---|
The hostname, management IP or partition IP of the Storage Virtualize system. |
|
Domain for the Storage Virtualize system. Valid when hostname is used for the parameter clustername. |
|
Specifies the name or UUID of the draft partition to be assigned to the volume group. |
|
Specifies colon-separated list of the parent volumes name or UID. The parameters fromsourcevolumes is mandatory for clone volumes and optional for clone volume groups while creating clone. |
|
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:
|
|
Specifies the name of the I/O group for the new clone. |
|
Path of debug log file. |
|
Specifies a name for the new clone. |
|
Specifies the name of the ownership group to which the object is being added. |
|
Specifies the name or UUID of the storage partition to associate with the volume group. |
|
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 name or UUID 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. |
|
Specifies the preferred node that is used to access the volume. |
|
Specifies the name or UUID of the snapshot that is used to create the clone. The parameters fromsourcevolumes is mandatory for creating clone. |
|
Creates ( 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 clone to create. Volume can be thinclone or clone type. 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:
|
|
Specifies the name or UUID 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_sv_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_sv_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 a volumegroup from snapshot inside partition
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vg1_clone_uuid_1"
state: "present"
pool: "pool1"
type: "clone"
snapshot: "snapshot1"
iogrp: "io_grp0"
partition: "123e4567-e89b-12d3-a456-426614174000"
ownershipgroup: "grp1"
- name: Create a volume clone using volumegroup
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vol1_clone_uuid_1"
state: "present"
pool: "pool1"
type: "clone"
snapshot: "snapshot1"
fromsourcevolumes: "vol1"
iogrp: "io_grp0"
preferrednode: "node1"
volumegroup: "550e8400-e29b-41d4-a716-446655440000"
- name: Create a clone of volume vector from snapshot
ibm.storage_virtualize.ibm_sv_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"
- name: Create a clone of a volume with pool UUID
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vol1_clone_pool_uuid"
state: "present"
pool: "66197B52-9707-548D-8C42-E91A7D35F6B8"
type: "clone"
snapshot: "snapshot1"
fromsourcevolumes: "vol1"
- name: Create a clone of a volume with snapshot UUID
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vol1_clone_snap_uuid"
state: "present"
pool: "pool1"
type: "clone"
snapshot: 66197B52-9707-548D-8C42-E91A7D35F6B8
fromsourcevolumes: "vol1"
- name: Create a clone from source volumes using UIDs
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vg1_clone_from_uuid_vols"
state: "present"
fromsourcevolumes: 6005076400810261F80000000000027E:6005076400810261F80000000000027D
pool: "pool1"
type: "clone"
snapshot: "snapshot1"
- name: Create a clone with volumegroup UUID
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vol1_clone_vg_uuid"
state: "present"
pool: "pool1"
type: "clone"
snapshot: "snapshot1"
fromsourcevolumes: "vol1"
volumegroup: 66197B52-9707-548D-8C42-E91A7D35F6B8
- name: Create a clone with partition UUID
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vg1_clone_partition_uuid"
state: "present"
pool: "pool1"
type: "clone"
snapshot: "snapshot1"
partition: 66197B52-9707-548D-8C42-E91A7D35F6B8
- name: Create a clone with draft partition UUID
ibm.storage_virtualize.ibm_sv_manage_clone:
clustername: "{{ clustername }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path }}"
name: "vg1_clone_draft_partition_uuid"
state: "present"
pool: "pool1"
type: "clone"
snapshot: "snapshot1"
draftpartition: 66197B52-9707-548D-8C42-E91A7D35F6B8