dellemc.openmanage.idrac_storage_volume 模块 – 配置 RAID 配置属性
注意
此模块是 dellemc.openmanage 集合(版本 9.9.0)的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要进一步的要求才能使用此模块,请参阅 要求 以了解详细信息。
要在 playbook 中使用它,请指定:dellemc.openmanage.idrac_storage_volume。
dellemc.openmanage 9.1.0 中的新增功能
概要
- 此模块负责配置 RAID 属性。 
别名:dellemc_idrac_storage_volume
要求
执行此模块的主机需要以下要求。
- python >= 3.9.6 
参数
| 参数 | 注释 | 
|---|---|
| 包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 | |
| 虚拟磁盘大小,单位为 GB。 | |
| 存储控制器的完全限定设备描述符 (FQDD),例如“RAID.Integrated.1-1”。 | |
| 磁盘缓存策略。 选项 
 | |
| iDRAC IP 地址。 | |
| iDRAC 用户密码。 如果未提供密码,则使用环境变量  示例:export IDRAC_PASSWORD=password | |
| iDRAC 端口。 默认值:  | |
| iDRAC 用户名。 如果未提供用户名,则使用环境变量  示例:export IDRAC_USERNAME=username | |
| 此参数提供等待作业完成的选项。 当 state 为  选项 
 | |
| 此参数是 job_wait 的最大等待时间(以秒为单位)。 当 job_wait 为  默认值:  | |
| 媒体类型。 选项 
 | |
| 专用热备件的数量。 默认值:  | |
| 总线协议。 选项 
 | |
| 此选项表示要在虚拟磁盘上执行的初始化配置操作。 选项 
 | |
| 此选项表示是否需要在 RAID 控制器上执行重置配置操作。重置配置操作会删除 RAID 控制器上存在的所有虚拟磁盘。 选项 
 | |
| 读取缓存策略。 选项 
 | |
| RAID 配置中的跨度数。 创建时需要 span_depth,其值取决于 volume_type。 默认值:  | |
| 一个跨度中的磁盘数。 创建时需要 span_length,其值取决于 volume_type。 默认值:  | |
| 
 
 
 选项 
 | |
| 条带大小值,以 64 * 1024 的倍数提供。 默认值:  | |
| 服务器配置配置文件 (SCP) 导入操作的关闭前最大等待时间(以秒为单位)。 此选项在 state 为  默认值:  | |
| 套接字级别的超时时间,以秒为单位。 默认值:  | |
| 如果为  仅在个人控制的站点使用自签名证书时才配置为  在集合版本  选项 
 | |
| 虚拟磁盘的完全限定设备描述符 (FQDD),例如 ‘Disk.virtual.0:RAID.Slot.1-1’。此选项用于获取虚拟磁盘信息。 | |
| 提供所需的 RAID 级别。 选项 
 | |
| 虚拟磁盘特定 iDRAC 属性的列表。这适用于  对于  drives 是  在 iDRAC8 中,没有对驱动器状态的预验证。提供的驱动器的磁盘 ID 或插槽号可能处于或可能不处于就绪状态。输入已处于就绪状态的驱动器的磁盘 ID 或插槽号。 对于  请参阅示例了解更多详情。 | |
| 写缓存策略。 选项 
 | |
| 身份验证令牌。 如果未提供 x_auth_token,则使用环境变量  示例:export IDRAC_X_AUTH_TOKEN=x_auth_token | 
注释
注意
- 从可以直接访问集成戴尔远程访问控制器的系统运行此模块。 
- 此模块支持 idrac_ip 的 IPv4 和 IPv6 地址。 
- 此模块支持 - check_mode。
- 对于 iDRAC8 中存储的 - view操作,此模块不显示控制器电池详细信息。
示例
---
- name: Create single volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "create"
    controller_id: "RAID.Slot.1-1"
    volumes:
      - drives:
        location: [5]
- name: Create multiple volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    raid_reset_config: "True"
    state: "create"
    controller_id: "RAID.Slot.1-1"
    volume_type: "RAID 1"
    span_depth: 1
    span_length: 2
    number_dedicated_hot_spare: 1
    disk_cache_policy: "Enabled"
    write_cache_policy: "WriteBackForce"
    read_cache_policy: "ReadAhead"
    stripe_size: 65536
    capacity: 100
    raid_init_operation: "Fast"
    volumes:
      - name: "volume_1"
        drives:
          id: ["Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1", "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1"]
      - name: "volume_2"
        volume_type: "RAID 5"
        span_length: 3
        span_depth: 1
        drives:
          location: [7, 3, 5]
        disk_cache_policy: "Disabled"
        write_cache_policy: "WriteBack"
        read_cache_policy: "NoReadAhead"
        stripe_size: 131072
        capacity: "200"
        raid_init_operation: "None"
- name: View all volume details
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "view"
- name: View specific volume details
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "view"
    controller_id: "RAID.Slot.1-1"
    volume_id: "Disk.Virtual.0:RAID.Slot.1-1"
- name: Delete single volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "delete"
    volumes:
      - name: "volume_1"
- name: Delete multiple volume
  dellemc.openmanage.idrac_storage_volume:
    idrac_ip: "192.168.0.1"
    idrac_user: "username"
    idrac_password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "delete"
    volumes:
      - name: "volume_1"
      - name: "volume_2"
返回值
通用返回值记录在此处 here,以下是此模块特有的字段
| Key | 描述 | 
|---|---|
| HTTP 错误的详细信息。 返回: 在 HTTP 错误时 示例:  | |
| 存储配置操作的总体状态。 返回: 始终 示例:  | |
| 来自 iDRAC 的存储配置作业和进度详细信息。 返回: 成功 示例:  | 
