ibm.storage_virtualize.ibm_svc_manage_volume 模块 – 此模块管理 IBM Storage Virtualize 系列系统上的标准卷
注意
此模块是 ibm.storage_virtualize 集合 (版本 2.5.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install ibm.storage_virtualize
。
要在 playbook 中使用它,请指定: ibm.storage_virtualize.ibm_svc_manage_volume
。
ibm.storage_virtualize 1.6.0 中的新增功能
概要
管理“mkvolume”、“rmvolume”和“chvdisk”卷命令的 Ansible 接口。
参数
参数 |
注释 |
---|---|
如果指定为 `True`,则通过忽略卷类型验证来管理超交换卷。 当 state=present 时有效,用于修改现有卷。 选项
|
|
指定卷将作为精简配置和压缩卷的缓冲区保留的池容量。 必须指定参数“thin”或“compressed”才能使用此参数。 默认缓冲区大小为 2%。 使用 buffersize 时需要 thin 或 compressed。 当 state=present 时有效,用于创建卷。 |
|
指定云帐户名称。 当 enable_cloud_snapshot=true 时有效。 |
|
Storage Virtualize 系统的主机名或管理 IP。 |
|
指定要创建压缩卷。 参数“compressed”和“thin”是互斥的。 当 state=present 时有效,用于创建压缩卷。 选项
|
|
指定要创建重复数据删除卷。 当 state=present 时需要,用于创建重复数据删除卷。 选项
|
|
Storage Virtualize 系统的域名。 当为参数 clustername 使用主机名时有效。 |
|
指定启用或禁用云快照。 当 state=present 时有效,用于修改现有卷。 选项
|
|
指定用于预填充克隆或精简克隆卷的快照中的卷名称。 当 state=present 时有效,用于创建精简克隆或克隆卷。 8.6.2.0 或更高版本的 Storage Virtualize 系列系统支持。 |
|
指定 I/O 组名称列表。列表中的组名必须用逗号分隔。 创建新卷时,列表中的第一个 I/O 组将同时添加为缓存和访问 I/O 组,而其余 I/O 组将添加为访问 I/O 组。 此参数支持更新功能。 当 state=present 时有效,用于创建或修改卷。 |
|
调试日志文件的路径。 |
|
指定要分配给新卷的名称。 |
|
如果指定为 `True`,则卷将从其关联的卷组中删除。 参数“novolumegroup”和“volumegroup”是互斥的。 当 state=present 时有效,用于修改卷。 选项
|
|
在重命名期间指定卷的旧名称。 当 state=present 时有效,用于重命名现有卷。 |
|
Storage Virtualize 系统的 REST API 密码。 如果不使用 token 来验证用户,则需要参数 username 和 password。 |
|
指定创建卷时要使用的存储池的名称。 当 state=present 时,此参数是必需的,用于创建卷。 |
|
定义卷的大小。此参数也可用于调整现有卷的大小。 当 state=present 时需要,用于创建或修改卷。 |
|
创建或更新 ( 选项
|
|
指定要创建精简配置卷。 参数“thin”和“compressed”是互斥的。 当 state=present 时有效,用于创建精简配置卷。 选项
|
|
用于在 Storage Virtualize 系统上验证用户的身份验证令牌。 要生成令牌,请使用 ibm_svc_auth 模块。 |
|
指定要创建的卷的类型。卷可以是精简克隆或克隆类型。 当 state=present 时有效,用于创建精简克隆或克隆卷。 8.6.2.0 或更高版本的 Storage Virtualize 系列系统支持。 选项
|
|
指定要与参数“size”指定的容量一起使用的数单位。 使用 unit 时需要 size。 选项
|
|
Storage Virtualize 系统的 REST API 用户名。 如果不使用 token 来验证用户,则需要参数 username 和 password。 |
|
验证认证。 选项
|
|
指定要将卷添加到其中的卷组的名称。 参数“volumegroup”和“novolumegroup”是互斥的。 当 state=present 时有效,用于创建或修改卷。 |
备注
注意
此模块支持
check_mode
。
示例
- 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_svc_manage_volume:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
name: "vol1_thinclone"
fromsourcevolume: "vol1"
state: "present"
pool: "pool0"
- 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"
- 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"
- 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: 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"