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 系统的hostname或管理IP。 | |
| 指定要创建压缩卷。 参数 ‘compressed’ 和 ‘thin’ 是互斥的。 当 state=present 时有效,用于创建压缩卷。 选项 
 | |
| 指定要创建重复数据删除卷。 当 state=present 时必需,用于创建重复数据删除卷。 选项 
 | |
| Storage Virtualize 系统的域。 当使用 hostname 作为参数 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 模块。 | |
| 指定要创建的卷的类型。卷可以是精简克隆 (thinclone) 或完整克隆 (clone) 类型。 当 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"
