netapp_eseries.santricity.netapp_e_volume 模块 – NetApp E 系列管理存储卷(标准和精简)
注意
此模块是 netapp_eseries.santricity 集合(版本 1.4.1)的一部分。
如果您正在使用 ansible
包,您可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install netapp_eseries.santricity
。
要在 playbook 中使用它,请指定:netapp_eseries.santricity.netapp_e_volume
。
netapp_eseries.santricity 2.2.0 中的新增功能
概要
为 NetApp E/EF 系列存储阵列创建或删除卷(标准和精简)。
参数
参数 |
注释 |
---|---|
用于通过 SANtricity Web Services Proxy 或 Embedded Web Services API 进行身份验证的密码。 |
|
SANtricity Web Services Proxy 或 Embedded Web Services API 的 URL。示例:https://prod-1.wahoo.acme.com/devmgr/v2 |
|
用于通过 SANtricity Web Services Proxy 或 Embedded Web Services API 进行身份验证的用户名。 |
|
指示是否应在没有电池备份的情况下使用缓存。 警告,cache_without_batteries==true 且存储系统断电且没有电池备份,数据将会丢失! 选项
|
|
确定是否应为卷启用数据保证 (DA) 仅在创建新卷且在支持 DA 功能的驱动器的存储池上可用。 选项
|
|
等待初始化操作终止之前的持续时间(以秒为单位)。 wait_for_initialization==True 才会对模块的操作产生任何影响。 |
|
包含卷的用途、用户、位置等的元数据的字典(该字典是为用户认为有用的任何内容而任意定义的) 当存储阵列上存在 workload_name 但元数据不同时,工作负载定义将被更新。(更改将更新所有关联的卷!) 定义 metadata 时,必须指定 workload_name。 |
|
要管理的卷的名称。 |
|
指定哪个控制器将成为卷的主所有者 不指定将允许控制器选择所有权。 选项
|
|
指示是否启用自动缓存预读。 此选项对精简配置的卷无效,因为精简卷的架构无法从预读缓存中获益。 选项
|
|
指示是否应为卷启用读取缓存。 选项
|
|
卷的段大小 所有值均以千字节为单位。 一些常见的选项包括“8”、“16”、“32”、“64”、“128”、“256”和“512”,但选项取决于系统。 从 netapp_eseries.santricity.netapp_e_facts 的 segment_sizes 下检索明确的系统列表。 当存储池是 raidDiskPool 时,段大小必须为 128kb。 此模块中不允许段大小迁移 默认: |
|
仅当 state==’present’ 时才需要。 卷的大小,单位为 size_unit。 精简卷情况下的虚拟卷大小,单位为 size_unit。 精简配置卷的最大虚拟卷大小为 256tb;但是,可能存在其他操作系统级别的限制。 |
|
用于解释大小参数的单位 选项
|
|
是否应在卷上启用现有的 SSD 缓存(如果未定义 SSD 缓存则失败) 默认值是忽略现有的 SSD 缓存设置。 选项
|
|
要管理的阵列的 ID。此值对于每个阵列都必须是唯一的。 默认: |
|
指定的卷是否存在 选项
|
|
仅在请求 state==’present’ 时才需要。 卷应驻留的存储池的名称。 |
|
该卷是否应进行精简配置。 仅当 raid_level==”raidDiskPool” 时才能创建精简卷。 通常,不建议使用精简配置,因为它会影响性能。 选项
|
|
这是精简卷扩展策略。 当 thin_volume_expansion_policy==”automatic” 且超出 thin_volume_growth_alert_threshold 时,thin_volume_max_repo_size 将自动扩展。 当 thin_volume_expansion_policy==”manual” 且超出 thin_volume_growth_alert_threshold 时,存储系统将等待人工干预。 在此模块中,不能修改现有精简卷上的精简卷扩展策略。 一般来说,您应该几乎始终使用 thin_volume_expansion_policy==”automatic。 选项
|
|
这是精简配置存储库利用率阈值(以百分比表示)。 当最大存储库大小的已用存储百分比超过此值时,将发出警报,并执行thin_volume_expansion_policy。 值必须介于 10 和 99 之间(含 10 和 99)。 默认值: |
|
这是允许精简卷存储库增长的最大量。 仅当thin_volume_expansion_policy==”automatic”时才有意义。 当thin_volume_repo_size 占 thin_volume_max_repo_size 的百分比超过 thin_volume_growth_alert_threshold 时,将发出警告,存储阵列将执行 thin_volume_expansion_policy 策略。 当 thin_volume_expansion_policy==”automatic” 时,扩展操作将增加最大存储库大小。 默认值将与大小(以 size_unit 为单位)相同。 |
|
此值(以 size_unit 为单位)设置精简配置存储库的分配空间。 初始值必须介于 4gb 和 256gb 之间(含 4gb 和 256gb),且以 4gb 为增量。 在扩展操作期间,增量必须介于 4gb 和 256gb 之间(含 4gb 和 256gb),且以 4gb 为增量。 如果 thin_volume_expansion_policy==”automatic”,则此选项在扩展期间无效。 一般来说,您应该几乎始终使用 thin_volume_expansion_policy==”automatic。 |
|
是否应验证 https 证书? 选项
|
|
强制模块等待扩展操作完成后再继续。 选项
|
|
由元数据定义的工作负载的标签。 当指定了 workload_name 和 metadata 时,定义的工作负载将添加到存储阵列。 当存储阵列上存在 workload_name 但元数据不同时,工作负载定义将被更新。(更改将更新所有关联的卷!) 可以使用 netapp_eseries.santricity.netapp_e_facts检索现有工作负载。 |
|
指示是否应为卷启用写回缓存。 选项
|
注释
注意
E-Series Ansible 模块需要 Web Services Proxy (WSP) 的实例才能管理存储系统,或者需要支持嵌入式 Web Services API 的 E-Series 存储系统。
嵌入式 Web Services 目前可在 E2800、E5700、EF570 和更新的硬件型号上使用。
可以使用 netapp_eseries.santricity.netapp_e_storage_system 来配置由 WSP 实例管理的系统。
示例
- name: Create simple volume with workload tags (volume meta data)
netapp_e_volume:
ssid: "{{ ssid }}"
api_url: "{{ netapp_api_url }}"
api_username: "{{ netapp_api_username }}"
api_password: "{{ netapp_api_password }}"
validate_certs: "{{ netapp_api_validate_certs }}"
state: present
name: volume
storage_pool_name: storage_pool
size: 300
size_unit: gb
workload_name: volume_tag
metadata:
key1: value1
key2: value2
- name: Create a thin volume
netapp_e_volume:
ssid: "{{ ssid }}"
api_url: "{{ netapp_api_url }}"
api_username: "{{ netapp_api_username }}"
api_password: "{{ netapp_api_password }}"
validate_certs: "{{ netapp_api_validate_certs }}"
state: present
name: volume1
storage_pool_name: storage_pool
size: 131072
size_unit: gb
thin_provision: true
thin_volume_repo_size: 32
thin_volume_max_repo_size: 1024
- name: Expand thin volume's virtual size
netapp_e_volume:
ssid: "{{ ssid }}"
api_url: "{{ netapp_api_url }}"
api_username: "{{ netapp_api_username }}"
api_password: "{{ netapp_api_password }}"
validate_certs: "{{ netapp_api_validate_certs }}"
state: present
name: volume1
storage_pool_name: storage_pool
size: 262144
size_unit: gb
thin_provision: true
thin_volume_repo_size: 32
thin_volume_max_repo_size: 1024
- name: Expand thin volume's maximum repository size
netapp_e_volume:
ssid: "{{ ssid }}"
api_url: "{{ netapp_api_url }}"
api_username: "{{ netapp_api_username }}"
api_password: "{{ netapp_api_password }}"
validate_certs: "{{ netapp_api_validate_certs }}"
state: present
name: volume1
storage_pool_name: storage_pool
size: 262144
size_unit: gb
thin_provision: true
thin_volume_repo_size: 32
thin_volume_max_repo_size: 2048
- name: Delete volume
netapp_e_volume:
ssid: "{{ ssid }}"
api_url: "{{ netapp_api_url }}"
api_username: "{{ netapp_api_username }}"
api_password: "{{ netapp_api_password }}"
validate_certs: "{{ netapp_api_validate_certs }}"
state: absent
name: volume
返回值
常见返回值记录在此处,以下是此模块独有的字段
键 |
描述 |
---|---|
卷的状态 返回: 始终 示例: |