hitachivantara.vspone_block.vsp.hv_ldev module – Manages logical devices (LDEVs) on Hitachi VSP storage systems.

Note

This module is part of the hitachivantara.vspone_block collection (version 3.4.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install hitachivantara.vspone_block. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: hitachivantara.vspone_block.vsp.hv_ldev.

New in hitachivantara.vspone_block 3.0.0

Synopsis

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.8

Parameters

Parameter

Comments

connection_info

dictionary / required

Information required to establish a connection to the storage system.

address

string / required

IP address or hostname of the storage system.

api_token

string

This field is used to pass the value of the lock token to operate on locked resources.

connection_type

string

Type of connection to the storage system.

Choices:

  • "direct" ← (default)

password

string

Password for authentication. This is a required field.

username

string

Username for authentication. This is a required field.

spec

dictionary / required

Specification for the LDEV.

capacity_saving

string

Whether to enable the capacity saving functions. Valid value is one of the following three options: - 1. compression - Enable the capacity saving function (compression). - 2. compression_deduplication - Enable the capacity saving function (compression and deduplication). - 3 disabled - Disable the capacity saving function (compression and deduplication) Default value is disabled.

data_reduction_share

boolean

Specify whether to create a data reduction shared volume. This value is set to true for Thin Image Advance.

Choices:

  • false

  • true

force

boolean

Force delete. Delete the LDEV and removes the LDEV from hostgroups, iscsi targets or NVM subsystem namespace.

Choices:

  • false

  • true

host_nqns

list / elements=string

List of host nqns to add to or remove from the LDEV depending on the state value.

is_compression_acceleration_enabled

boolean

Whether the compression accelerator of the capacity saving function is enabled.

Choices:

  • false

  • true

is_relocation_enabled

boolean

Specify whether to enable the tier relocation setting for the HDT volume.

Choices:

  • false

  • true

ldev_id

integer

ID of the LDEV (required for delete and update operations), for new it will assigned to this ldev if it’s free.

name

string

Name of the LDEV (optional). If not given, it assigns the name of the LDEV to “smrha-<ldev_id>”.

nvm_subsystem_name

string

Specify whether the LDEV created will be part of an NVM subsystem.

parity_group

string

ID of the parity_group where the LDEV will be created. Options pool_id and parity_group_id are mutually exclusive.

pool_id

integer

ID of the pool where the LDEV will be created. Options pool_id and parity_group_id are mutually exclusive.

qos_settings

dictionary

QoS settings for the LDEV.

lower_alert_allowable_time

integer

Lower alert allowable time.

lower_iops

integer

Lower IOPS limit.

lower_transfer_rate

integer

Lower transfer rate limit.

response_alert_allowable_time

integer

Response alert allowable time.

response_priority

integer

Response priority.

upper_alert_allowable_time

integer

Upper alert allowable time.

upper_iops

integer

Upper IOPS limit.

upper_transfer_rate

integer

Upper transfer rate limit.

should_shred_volume_enable

boolean

It shreds an LDEV (basic volume) or DP volume. Overwrites the volume three times with dummy data.

Choices:

  • false

  • true

size

string

Size of the LDEV. Can be specified in units such as GB, TB, or MB (e.g., ‘10GB’, ‘5TB’, ‘100MB’, 200).

state

string

State of the NVM subsystems task. This is valid only when nvm_subsystem_name is specified.

add_host_nqn - Add the host NQNs to the LDEV.

remove_host_nqn - Remove the host NQNs from the LDEV.

Choices:

  • "add_host_nqn" ← (default)

  • "remove_host_nqn"

tier_level_for_new_page_allocation

string

Specify which tier of the HDT pool will be prioritized when a new page is allocated.

tiering_policy

dictionary

Tiering policy for the LDEV.

tier1_allocation_rate_max

integer

Tier1 max, a value from 1 to 100.

tier1_allocation_rate_min

integer

Tier1 min, a value from 1 to 100.

tier3_allocation_rate_max

integer

Tier3 max, a value from 1 to 100.

tier3_allocation_rate_min

integer

Tier3 min, a value from 1 to 100.

tier_level

integer

Tier level, a value from 0 to 31.

vldev_id

integer

Specify the virtual LDEV id.

state

string

The desired state of the LDEV.

Choices:

  • "present" ← (default)

  • "absent"

storage_system_info

dictionary

Information about the storage system. This field is an optional field.

serial

string

The serial number of the storage system.

Attributes

Attribute

Support

Description

check_mode

Support: none

Determines if the module should run in check mode.

Examples

- name: Create ldev with free id and present to NVM System
  hitachivantara.vspone_block.vsp.hv_ldev:
    state: present
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      pool_id: 1
      size: "10GB"
      name: "New_LDEV"
      capacity_saving: "compression_deduplication"
      data_reduction_share: true
      state: "add_host_nqn"
      nvm_subsystem_name: "nvm_subsystem_01"
      host_nqns: ["nqn.2014-08.org.example:uuid:4b73e622-ddc1-449a-99f7-412c0d3baa39"]

- name: Present existing volume to NVM System
  hitachivantara.vspone_block.vsp.hv_ldev:
    state: present
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      ldev_id: 1
      state: "add_host_nqn"
      nvm_subsystem_name: "nvm_subsystem_01"
      host_nqns: ["nqn.2014-08.org.example:uuid:4b73e622-ddc1-449a-99f7-412c0d3baa39"]

- name: Force delete ldev removes the ldev from hostgroups, iscsi targets or NVMe subsystem namespace
  hitachivantara.vspone_block.vsp.hv_ldev:
    state: absent
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      ldev_id: 123
      force: true

- name: Update the qos settings for an existing LDEV
  hitachivantara.vspone_block.vsp.hv_ldev:
    state: absent
    connection_info:
      address: storage.company.com
      username: "admin"
      password: "passw0rd"
    spec:
      ldev_id: 123
      qos_settings:
        upper_iops: 1000
        lower_iops: 500
        upper_transfer_rate: 1000
        lower_transfer_rate: 500
        upper_alert_allowable_time: 1000
        lower_alert_allowable_time: 500
        response_priority: 1000
        response_alert_allowable_time: 1000

Return Values

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

Key

Description

volume

dictionary

Storage volumes with their attributes.

Returned: success

canonical_name

string

Unique identifier for the volume.

Returned: success

Sample: "naa.60060e8028274200508027420000000a"

dedup_compression_progress

integer

Progress percentage of deduplication and compression.

Returned: success

Sample: -1

dedup_compression_status

string

Status of deduplication and compression.

Returned: success

Sample: "DISABLED"

deduplication_compression_mode

string

Mode of deduplication and compression.

Returned: success

Sample: "disabled"

emulation_type

string

Emulation type of the volume.

Returned: success

Sample: "OPEN-V-CVS-CM"

hostgroups

list / elements=string

List of host groups associated with the volume.

Returned: success

Sample: []

is_alua

boolean

Indicates if ALUA is enabled.

Returned: success

Sample: false

is_command_device

boolean

Indicates if the volume is a command device.

Returned: success

Sample: false

is_data_reduction_share_enabled

boolean

Indicates if data reduction share is enabled.

Returned: success

Sample: false

is_device_group_definition_enabled

boolean

Indicates if device group definition is enabled.

Returned: success

Sample: false

is_encryption_enabled

boolean

Indicates if encryption is enabled.

Returned: success

Sample: false

is_security_enabled

boolean

Indicates if security is enabled.

Returned: success

Sample: false

is_user_authentication_enabled

boolean

Indicates if user authentication is enabled.

Returned: success

Sample: false

is_write_protected

boolean

Indicates if the volume is write-protected.

Returned: success

Sample: false

is_write_protected_by_key

boolean

Indicates if the volume is write-protected by key.

Returned: success

Sample: false

iscsi_targets

list / elements=string

List of associated iSCSI targets.

Returned: success

Sample: []

ldev_id

integer

Logical Device ID.

Returned: success

Sample: 10

logical_unit_id_hex_format

string

Logical Unit ID in hexadecimal format.

Returned: success

Sample: "00:00:0A"

name

string

Name of the volume.

Returned: success

Sample: "snewar-cmd"

num_of_ports

integer

Number of ports associated with the volume.

Returned: success

Sample: 1

nvm_subsystems

list / elements=string

List of associated NVM subsystems.

Returned: success

Sample: []

parity_group_id

string

Parity group ID of the volume.

Returned: success

Sample: ""

path_count

integer

Number of paths to the volume.

Returned: success

Sample: 1

pool_id

integer

Pool ID where the volume resides.

Returned: success

Sample: 0

provision_type

string

Provisioning type of the volume.

Returned: success

Sample: "CMD,CVS,HDP"

qos_settings

dictionary

Quality of Service settings for the volume.

Returned: success

Sample: {}

resource_group_id

integer

Resource group ID of the volume.

Returned: success

Sample: 0

snapshots

list / elements=string

List of snapshots associated with the volume.

Returned: success

Sample: []

status

string

Current status of the volume.

Returned: success

Sample: "NML"

storage_serial_number

string

Serial number of the storage system.

Returned: success

Sample: "810050"

tiering_policy

dictionary

Tiering policy applied to the volume.

Returned: success

Sample: {}

total_capacity

string

Total capacity of the volume.

Returned: success

Sample: "50.00MB"

total_capacity_in_mb

string

Total capacity of the volume in megabytes.

Returned: success

Sample: "50.0 MB"

used_capacity

string

Used capacity of the volume.

Returned: success

Sample: "0.00B"

used_capacity_in_mb

string

Used capacity of the volume in megabytes.

Returned: success

Sample: "0.0 MB"

virtual_ldev_id

integer

Virtual Logical Device ID.

Returned: success

Sample: -1

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)