ibm.storage_virtualize.ibm_svc_manage_volumegroup 模块 – 此模块管理 IBM 存储虚拟化系列系统上的卷组
注意
此模块是 ibm.storage_virtualize 集合 (版本 2.5.0) 的一部分。
如果您正在使用 ansible 软件包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install ibm.storage_virtualize。
要在剧本中使用它,请指定: ibm.storage_virtualize.ibm_svc_manage_volumegroup。
ibm.storage_virtualize 1.6.0 中的新增功能
概要
- 管理“mkvolumegroup”、“chvolumegroup”和“rmvolumegroup”命令的 Ansible 接口。 
参数
| 参数 | 注释 | 
|---|---|
| 存储虚拟化系统的hostname或管理IP。 | |
| 存储虚拟化系统的域名。 当参数 *clustername* 使用 hostname 时有效。 | |
| 指定要分配给卷组的草稿分区名称。 在 *state=present* 时适用。 从 Storage Virtualize 系列系统 8.6.3.0 或更高版本支持。 | |
| 如果指定为 `True`,则删除卷组,但不删除卷。 在 *state=absent* 时适用,用于删除卷组,同时保留关联的卷。 从 Storage Virtualize 系列系统 8.6.2.0 或更高版本支持。 选项 
 | |
| 指定快照的父卷组。这用于在新卷组中预填充新卷。 在从现有快照创建主机可访问卷组期间有效。 | |
| 指定以冒号分隔的父卷列表。 与 type 参数和快照结合使用时,允许用户创建卷组,其中包含快照中存在映像的那些卷的子集。 在 *state=present* 时适用,用于从快照的卷子集创建卷组克隆或精简克隆。 从 Storage Virtualize 系列系统 8.6.2.0 或更高版本支持。 | |
| 允许用户通过调度程序或使用 `addsnapshot` 手动创建快照。只有当卷组中的卷用作用户旧版 FlashCopy 映射的源时,才能使用此选项。 在创建和更新卷组期间有效。 从 Storage Virtualize 系列系统 8.5.2.0 或更高版本支持。 选项 
 | |
| 指定新卷的 I/O 组。 在从现有快照创建主机可访问卷组期间有效。 | |
| 调试日志文件的路径。 | |
| 指定卷组的名称。 | |
| 如果指定为 `True`,则将对象从其所属的所有者组中删除。 参数 *ownershipgroup* 和 *noownershipgroup* 是互斥的。 在 *state=present* 时适用,用于修改现有卷组。 选项 
 | |
| 如果指定为 `True`,则从存储分区中删除卷组。 参数 *partition* 和 *nopartition* 是互斥的。 在 *state=present* 时适用,用于修改现有卷组。 从 Storage Virtualize 系列系统 8.6.1.0 或更高版本支持。 选项 
 | |
| 如果指定为 `True`,则删除分配给卷组的复制策略。 参数 *replicationpolicy* 和 *noreplicationpolicy* 是互斥的。 在 *state=present* 时适用,用于修改现有卷组。 从 Storage Virtualize 系列系统 8.5.2.1 或更高版本支持。 选项 
 | |
| 如果指定为 `True`,则删除分配给卷组的安全策略。 参数 *safeguardpolicyname* 和 *nosafeguardpolicy* 是互斥的。 在 *state=present* 时适用,用于修改现有卷组。 选项 
 | |
| 如果指定为 `True`,则删除分配给卷组的快照策略。 参数 *snapshotpolicy* 和 *nosnapshotpolicy* 是互斥的。 在 *state=present* 时适用,用于修改现有卷组。 选项 
 | |
| 在重命名期间指定卷组的旧名称。 在 *state=present* 时有效,用于重命名现有卷组。 | |
| 指定要向其添加对象的拥有者组的名称。 *ownershipgroup* 与参数 *safeguardpolicyname* 和 *noownershipgroup* 互斥。 在 *state=present* 时适用。 | |
| 指定要分配给卷组的存储分区的名称。 在 *state=present* 时适用。 从 Storage Virtualize 系列系统 8.6.1.0 或更高版本支持。 | |
| 存储虚拟化系统的 REST API 密码。 如果不使用 *token* 来验证用户,则参数 *username* 和 *password* 是必需的。 | |
| 指定第一次进行Safeguarded备份的时间。 此参数也可以与快照策略相关联。 使用policystarttime时,需要safeguardpolicyname。 接受的格式为YYMMDDHHMM。 在 *state=present* 时适用。 | |
| 指定要创建目标卷的池名称。 在从现有快照创建主机可访问卷组期间有效。 | |
| 指定要分配给卷组的复制策略的名称。 在 *state=present* 时适用。 从 Storage Virtualize 系列系统 8.5.2.1 或更高版本支持。 | |
| 如果指定,快照策略将创建受保护的快照。 应与snapshotpolicy一起指定。 在创建和更新卷组期间有效。 从 Storage Virtualize 系列系统 8.5.2.0 或更高版本支持。 选项 
 | |
| 要分配给卷组的Safeguarded策略的名称。 safeguardpolicyname与参数nosafeguardpolicy和ownershipgroup互斥。 在 *state=present* 时适用。 | |
| 指定用于预填充新卷组中新卷的快照名称。 从现有快照创建主机可访问的卷组时,此参数为必填。 | |
| 要分配给卷组的快照策略的名称。 snapshotpolicy与参数nosnapshotpolicy和ownershipgroup互斥。 在 *state=present* 时适用。 | |
| 指定是暂停 ( 在 *state=present* 时适用,用于修改现有卷组。 选项 
 | |
| 创建或更新 ( 选项 
 | |
| 用于验证Storage Virtualize系统上用户的身份验证令牌。 要生成令牌,请使用 ibm.storage_virtualize.ibm_svc_auth 模块。 | |
| 指定要从快照创建的卷组的类型。 在从现有快照创建主机可访问卷组期间有效。 选项 
 | |
| Storage Virtualize系统的REST API用户名。 如果不使用 *token* 来验证用户,则参数 *username* 和 *password* 是必需的。 | |
| 验证证书。 选项 
 | 
注释
注意
- 此模块支持 - check_mode。
- Safeguarded策略和快照策略不能同时使用。因此,参数snapshotpolicy和safeguardpolicyname互斥。 
示例
- name: Create a new volume group
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    state: present
- name: Delete a volume group
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    state: absent
- name: Update existing volume group to remove ownershipgroup and attach a safeguardpolicy to it
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    state: present
    noownershipgroup: True
    safeguardpolicyname: sg1
- name: Update volumegroup with snapshot policy and remove safeguarded policy
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    nosafeguardpolicy: true
    snapshotpolicy: sp1
    state: present
- name: Update volumegroup with safeguarded snapshot policy and ignoreuserfcmaps
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    safeguarded: true
    snapshotpolicy: sp1
    ignoreuserfcmaps: yes
    state: present
- name: Suspend snapshot policy in an existing volume group
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    snapshotpolicysuspended: true
    state: present
- name: Create host accessible volume group from an existing snapshot
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: host_accessible_vg
    type: clone
    snapshot: snapshot0
    fromsourcegroup: vg0
    pool: Pool0
    state: present
- name: Create a volumegroup thinclone from a list of volumes
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    type: thinclone
    fromsourcevolumes: vol1:vol2
    pool: Pool0
    state: present
- name: Create a volumegroup clone from a list of volumes
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    type: clone
    fromsourcevolumes: vol1:vol2
    pool: Pool0
    state: present
- name: Delete a volume group, keeping volumes which were associated with volumegroup
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    state: absent
    evictvolumes: true
- name: Add new or existing volumegroup to a draft partition
  ibm.storage_virtualize.ibm_svc_manage_volumegroup:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    name: vg0
    state: present
    draftpartition: partition_name
