netapp_e_volume – NetApp E-Series manage storage volumes (standard and thin)

From Get docs
Ansible/docs/2.8/modules/netapp e volume module


netapp_e_volume – NetApp E-Series manage storage volumes (standard and thin)

New in version 2.2.


Synopsis

  • Create or remove volumes (standard and thin) for NetApp E/EF-series storage arrays.

Parameters

Parameter Choices/Defaults Comments

api_password

- / required

The password to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API.

api_url

- / required

The url to the SANtricity Web Services Proxy or Embedded Web Services API. Example https://prod-1.wahoo.acme.com/devmgr/v2

api_username

- / required

The username to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API.

data_assurance_enabled

boolean

  • no

  • yes

Determines whether data assurance (DA) should be enabled for the volume

Only available when creating a new volume and on a storage pool with drives supporting the DA capability.

metadata

dictionary

added in 2.8

Dictionary containing meta data for the use, user, location, etc of the volume (dictionary is arbitrarily defined for whatever the user deems useful)

When workload_name exists on the storage array but the metadata is different then the workload definition will be updated. (Changes will update all associated volumes!)

workload_name must be specified when metadata are defined.

name

- / required

The name of the volume to manage.

read_ahead_enable

boolean

added in 2.8

  • no

  • yes

Indicates whether or not automatic cache read-ahead is enabled.

This option has no effect on thinly provisioned volumes since the architecture for thin volumes cannot benefit from read ahead caching.

read_cache_enable

boolean

added in 2.8

  • no
  • yes

Indicates whether read caching should be enabled for the volume.

segment_size_kb

-

Default:

"128"

Segment size of the volume

All values are in kibibytes.

Some common choices include '8', '16', '32', '64', '128', '256', and '512' but options are system dependent.

Retrieve the definitive system list from netapp_e_facts under segment_sizes.

When the storage pool is a raidDiskPool then the segment size must be 128kb.

Segment size migrations are not allowed in this module

size

- / required

Required only when state=='present'.

Size of the volume in size_unit.

Size of the virtual volume in the case of a thin volume in size_unit.

Maximum virtual volume size of a thin provisioned volume is 256tb; however other OS-level restrictions may exist.

size_unit

-

  • bytes
  • b
  • kb
  • mb
  • gb

  • tb
  • pb
  • eb
  • zb
  • yb

The unit used to interpret the size parameter

ssd_cache_enabled

boolean

  • no

  • yes

Whether an existing SSD cache should be enabled on the volume (fails if no SSD cache defined)

The default value is to ignore existing SSD cache setting.

ssid

-

Default:

1

The ID of the array to manage. This value must be unique for each array.

state

- / required

  • present
  • absent

Whether the specified volume should exist

storage_pool_name

-

Required only when requested state=='present'.

Name of the storage pool wherein the volume should reside.

thin_provision

boolean

  • no

  • yes

Whether the volume should be thin provisioned.

Thin volumes can only be created when raid_level=="raidDiskPool".

Generally, use of thin-provisioning is not recommended due to performance impacts.

thin_volume_expansion_policy

-

added in 2.8

  • automatic

  • manual

This is the thin volume expansion policy.

When thin_volume_expansion_policy=="automatic" and thin_volume_growth_alert_threshold is exceed the thin_volume_max_repo_size will be automatically expanded.

When thin_volume_expansion_policy=="manual" and thin_volume_growth_alert_threshold is exceeded the storage system will wait for manual intervention.

The thin volume_expansion policy can not be modified on existing thin volumes in this module.

Generally speaking you should almost always use thin_volume_expansion_policy=="automatic.

thin_volume_growth_alert_threshold

-

added in 2.8

Default:

95

This is the thin provision repository utilization threshold (in percent).

When the percentage of used storage of the maximum repository size exceeds this value then a alert will be issued and the thin_volume_expansion_policy will be executed.

Values must be between or equal to 10 and 99.

thin_volume_max_repo_size

-

Default:

"same as size (in size_unit)"

This is the maximum amount the thin volume repository will be allowed to grow.

Only has significance when thin_volume_expansion_policy=="automatic".

When the percentage thin_volume_repo_size of thin_volume_max_repo_size exceeds thin_volume_growth_alert_threshold then a warning will be issued and the storage array will execute the thin_volume_expansion_policy policy.

Expansion operations when thin_volume_expansion_policy=="automatic" will increase the maximum repository size.

thin_volume_repo_size

-

This value (in size_unit) sets the allocated space for the thin provisioned repository.

Initial value must between or equal to 4gb and 256gb in increments of 4gb.

During expansion operations the increase must be between or equal to 4gb and 256gb in increments of 4gb.

This option has no effect during expansion if thin_volume_expansion_policy=="automatic".

Generally speaking you should almost always use thin_volume_expansion_policy=="automatic.

validate_certs

boolean

  • no
  • yes

Should https certificates be validated?

wait_for_initialization

boolean

added in 2.8

  • no

  • yes

Forces the module to wait for expansion operations to complete before continuing.

workload_name

-

added in 2.8

Label for the workload defined by the metadata.

When workload_name and metadata are specified then the defined workload will be added to the storage array.

When workload_name exists on the storage array but the metadata is different then the workload definition will be updated. (Changes will update all associated volumes!)

Existing workloads can be retrieved using netapp_e_facts.

write_cache_enable

boolean

added in 2.8

  • no

  • yes

Indicates whether write-back caching should be enabled for the volume.



Notes

Note

  • The E-Series Ansible modules require either an instance of the Web Services Proxy (WSP), to be available to manage the storage-system, or an E-Series storage-system that supports the Embedded Web Services API.
  • Embedded Web Services is currently available on the E2800, E5700, EF570, and newer hardware models.
  • netapp_e_storage_system may be utilized for configuring the systems managed by a WSP instance.


Examples

- 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

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description

msg

string

always

State of volume


Sample:

Standard volume [workload_vol_1] has been created.




Status

Authors

  • Kevin Hulquest (@hulquest)
  • Nathan Swartz (@ndswartz)

Hint

If you notice any issues in this documentation you can edit this document to improve it.


© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/netapp_e_volume_module.html