dellemc.openmanage.redfish_storage_volume 模块 – 管理存储卷配置
注意
此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage
。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在剧本中使用它,请指定:dellemc.openmanage.redfish_storage_volume
。
dellemc.openmanage 2.1.0 中的新增功能
摘要
此模块允许创建、修改、初始化或删除单个存储卷。
要求
执行此模块的主机需要以下要求。
python >= 3.9.6
参数
参数 |
注释 |
---|---|
卷配置的应用时间。
*apply_time* 的默认值取决于控制器的不同类型。例如,BOSS-S1 和 BOSS-N1 控制器的 *apply_time* 默认值为 选项
|
|
目标带外控制器的 IP 地址。例如 - <ipaddress>:<port>。 |
|
以字节为单位的块大小。仅当 *state* 为 |
|
包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 |
|
以字节为单位的卷大小。 仅当 *state* 为 |
|
选项
|
|
存储控制器的完全限定设备描述符 (FQDD)。 例如 - RAID.Slot.1-1。 当 *state* 为 |
|
物理磁盘的 FQDD。 例如 - Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1。 仅当创建新卷时 *state* 为 |
|
指示卷当前是否正在使用加密。 仅当 *state* 为 选项
|
|
可以选择以下加密类型。
仅当 *state* 为 选项
|
|
当正常重启失败时,强制重启服务器以应用更改。 *force_reboot* 仅当 *reboot_server* 为 选项
|
|
现有卷的初始化类型。 仅当 *command* 为 选项
|
|
此参数提供等待作业完成的选项。 当 *apply_time* 为 当 *apply_time* 为 选项
|
|
此参数是 *job_wait* 的最大等待时间(以秒为单位)。 当 *job_wait* 为 默认值: |
|
要创建的卷的名称。 仅当 *state* 为 |
|
包含 OEM 扩展有效负载。 仅当state为present时适用。 |
|
Stripe大小值必须是64 * 1024的倍数。 仅当 *state* 为 |
|
目标带外控制器的密码。 如果未提供密码,则使用环境变量 示例:export IDRAC_PASSWORD=password |
|
raid_type与volume_type互斥。 选项
|
|
重启服务器以应用更改。 只有当apply_timeout为 选项
|
|
选项
|
|
套接字级别超时(秒)。 默认值: |
|
目标带外控制器的用户名。 如果未提供用户名,则使用环境变量 示例:export IDRAC_USERNAME=username |
|
如果为 仅在使用自签名证书的个人控制站点上配置 在集合版本 选项
|
|
现有卷的FQDD。 例如:Disk.Virtual.4:RAID.Slot.1-1。 此选项在以下情况下是必需的: 当更新卷时,state为 当删除卷时,state为 当初始化卷时,command为 |
|
必须选择以下卷类型之一来创建卷。
volume_type与raid_type互斥。 选项
|
|
身份验证令牌。 如果未提供x_auth_token,则使用环境变量 示例:export IDRAC_X_AUTH_TOKEN=x_auth_token |
注释
注意
从此模块可以直接访问Redfish API的系统运行此模块。
此模块支持
check_mode
。当未指定name和volume_id时,此模块始终报告更改。为了支持
check_mode
,需要name或volume_id。此模块不支持在iDRAC8上创建RAID6和RAID60存储卷。
此模块支持IPv4和IPv6地址。
示例
---
- name: Create a volume with supported options
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "present"
volume_type: "Mirrored"
name: "VD0"
controller_id: "RAID.Slot.1-1"
drives:
- Disk.Bay.5:Enclosure.Internal.0-1:RAID.Slot.1-1
- Disk.Bay.6:Enclosure.Internal.0-1:RAID.Slot.1-1
block_size_bytes: 512
capacity_bytes: 299439751168
optimum_io_size_bytes: 65536
encryption_types: NativeDriveEncryption
encrypted: true
- name: Create a volume with minimum options
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "present"
controller_id: "RAID.Slot.1-1"
volume_type: "NonRedundant"
drives:
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
- name: Create a RAID0 on PERC controller on reset
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
controller_id: "RAID.Slot.1-1"
raid_type: "RAID0"
drives:
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
apply_time: OnReset
- name: Create a RAID0 on BOSS controller with restart
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
controller_id: "RAID.Slot.1-1"
raid_type: "RAID0"
drives:
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
apply_time: OnReset
reboot_server: true
- name: Create a RAID0 on BOSS controller with force restart
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
controller_id: "RAID.Slot.1-1"
raid_type: "RAID0"
drives:
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
reboot_server: true
force_reboot: true
- name: Modify a volume's encryption type settings
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "present"
volume_id: "Disk.Virtual.5:RAID.Slot.1-1"
encryption_types: "ControllerAssisted"
encrypted: true
- name: Delete an existing volume
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "absent"
volume_id: "Disk.Virtual.5:RAID.Slot.1-1"
- name: Initialize an existing volume
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
command: "initialize"
volume_id: "Disk.Virtual.6:RAID.Slot.1-1"
initialize_type: "Slow"
- name: Create a RAID6 volume
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
controller_id: "RAID.Slot.1-1"
raid_type: "RAID6"
drives:
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-3
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-4
- name: Create a RAID60 volume
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
controller_id: "RAID.Slot.1-1"
raid_type: "RAID60"
drives:
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-2
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-3
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-4
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-5
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-6
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-7
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-8
返回值
常用返回值已记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
http错误的详细信息。 返回:http错误时 示例: |
|
存储配置操作的总体状态。 返回:始终 示例: |
|
返回已创建任务的ID和URI。 返回:成功 示例: |