ibm.storage_virtualize.ibm_sv_manage_storage_partition module – This module manages storage partition on IBM Storage Virtualize family systems

Note

This module is part of the ibm.storage_virtualize collection (version 2.6.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 ibm.storage_virtualize.

To use it in a playbook, specify: ibm.storage_virtualize.ibm_sv_manage_storage_partition.

New in ibm.storage_virtualize 2.1.0

Synopsis

  • This Ansible module provides the interface to manage syslog servers through ‘mksyslogserver’, ‘chsyslogserver’ and ‘rmsyslogserver’ Storage Virtualize commands.

  • The Policy based High Availability (HA) solution uses Storage Partitions. These partitions contain volumes, volume groups, host and host-to-volume mappings.

Parameters

Parameter

Comments

clustername

string / required

The hostname or management IP of the Storage Virtualize system.

deletenonpreferredmanagementobjects

boolean

If the storage partition has a replication policy and associated objects, such as volumes, volumes groups, hosts or host mappings, one of the two deletenonpreferredmanagementobjects or deletepreferredmanagementobjects parmeters is required. If specified, the command is only permitted on the active management system, and requires that the active management system is the same as the preferred management system.

Applies when state=absent.

Choices:

  • false

  • true

deletepreferredmanagementcopy

boolean

This parameter is to be used along with noreplicationpolicy parameter and active management system must NOT be the same as the preferred management system.

Choices:

  • false

  • true

deletepreferredmanagementobjects

boolean

If the storage partition has a replication policy and associated objects, such as volumes, volumes groups, hosts or host mappings, one of the two deletenonpreferredmanagementobjects or deletepreferredmanagementobjects parmeters is required. If the storage partition cannot be managed at the preferred management system then deletepreferredmanagementobjects to be used to remove the storage partition and unassign the replication policy.

Applies when state=absent.

Choices:

  • false

  • true

domain

string

Domain for the Storage Virtualize system.

Valid when hostname is used for the parameter clustername.

draft

boolean

added in ibm.storage_virtualize 2.5.0

If specified and set to true, creates a partition in draft state. If set to false, creates a new partition into published state or moves an existing partition into published state.

Applies when state=present.

Choices:

  • false

  • true

string

added in ibm.storage_virtualize 2.6.0

Specifies uuid of the disaster-recovery system’s partition

Applies, when state=present.

Supported from Storage Virtualize family systems 8.7.1.0 or later.

location

string

added in ibm.storage_virtualize 2.6.0

Specifies a desired target system location to migrate an existing storage partition.

log_path

string

Path of debug log file.

migrationaction

string

added in ibm.storage_virtualize 2.6.0

Indicates how the partition migration should continue on target system. fixeventwithchecks - The system marks the event as fixed and re-check the configuration. If the error condition still exists, the event is logged again. This ensures migration only proceeds when error conditions are resolved.

Choices:

  • "fixeventwithchecks"

name

string / required

Specifies the name of a storage partition.

noreplicationpolicy

boolean

Unassigns the current replication policy from the volume group. This parameter, if used without deletepreferredmanagementcopy parameter, is allowed only on active management system.

Choices:

  • false

  • true

partition_to_merge

string

added in ibm.storage_virtualize 2.5.0

If specified, merges the partition_to_merge and all its objects into partition specified with name.

After merge, partition specified with partition_to_merge disappears from the list of partitions.

Applies when state=present.

password

string

REST API password for the Storage Virtualize system.

The parameters username and password are required if not using token to authenticate a user.

preferredmanagementsystem

string

Changes the preferred management system for the storage partition.

Permitted only from the system which is the active management system.

remotesystem

string

added in ibm.storage_virtualize 2.6.0

Specifies the disaster-recovery system.

Applies, when state=present.

Supported from Storage Virtualize family systems 8.7.1.0 or later.

boolean

added in ibm.storage_virtualize 2.6.0

Removes the disaster recovery link from this partition.

Applies, when state=present.

Supported from Storage Virtualize family systems 8.7.1.0 or later.

Choices:

  • false

  • true

replicationpolicy

string

Specifies the replication policy for the storage partition.

state

string / required

Creates, updates (present) or deletes (absent) a storage partition.

Choices:

  • "present"

  • "absent"

token

string

The authentication token to verify a user on the Storage Virtualize system.

To generate a token, use the ibm.storage_virtualize.ibm_svc_auth module.

username

string

REST API username for the Storage Virtualize system.

The parameters username and password are required if not using token to authenticate a user.

validate_certs

boolean

Validates certification.

Choices:

  • false ← (default)

  • true

Notes

Note

  • This module supports check_mode.

  • Parameters drlink_partition_uuid and remotesystem are interdependent and mutually exclusive with other parameters.

  • When a migrationaction is triggered for a partition that does not exist on the target cluster, ansible returns ‘CMMVC5753E The specified partition object does not exist.’ error.

Examples

- name: Create Storage Partition
  ibm.storage_virtualize.ibm_sv_manage_storage_partition:
   clustername: '{{ clustername }}'
   username: '{{ username }}'
   password: '{{ password }}'
   name: partition1
   state: present
   replicationpolicy: ha_policy_1
- name: Delete the storage partition
  ibm.storage_virtualize.ibm_sv_manage_storage_partition:
   clustername: '{{ clustername }}'
   username: '{{ username }}'
   password: '{{ password }}'
   name: partition1
   state: absent
- name: Create a partition in draft state
  ibm.storage_virtualize.ibm_sv_manage_storage_partition:
   clustername: "{{ clustername }}"
   domain: "{{ domain }}"
   username: "{{ username }}"
   password: "{{ password }}"
   log_path: /tmp/playbook.debug
   name: partition0
   state: present
   draft: true
- name: Publish a draft partition
  ibm.storage_virtualize.ibm_sv_manage_storage_partition:
   clustername: "{{ clustername }}"
   domain: "{{ domain }}"
   username: "{{ username }}"
   password: "{{ password }}"
   log_path: /tmp/playbook.debug
   name: partition0
   state: present
   draft: false
- name: Merge partition (partition1) into partition (partition0)
  ibm.storage_virtualize.ibm_sv_manage_storage_partition:
   clustername: "{{ clustername }}"
   domain: "{{ domain }}"
   username: "{{ username }}"
   password: "{{ password }}"
   log_path: /tmp/playbook.debug
   name: partition0
   state: present
   partition_to_merge: partition1
- name: Create dr-link using remote system uuid
  ibm.storage_virtualize.ibm_sv_manage_storage_partition:
   clustername: '{{ clustername }}'
   username: '{{ username }}'
   password: '{{ password }}'
   name: partition1
   state: present
   drlink_partition_uuid: 4D837492-8C69-5BEA-9147-F5C937D38028
   remotesystem: '{{ remote_system }}'
- name: Remove existing DR link
  ibm_sv_manage_storage_partition:
   clustername: '{{ clustername }}'
   username: '{{ username }}'
   password: '{{ password }}'
   name: partition1
   state: present
   removedrlink: true
- name: Initiate partition migration by changing location to target cluster
  ibm_sv_manage_storage_partition:
   clustername: '{{ clustername }}'
   username: '{{ username }}'
   password: '{{ password }}'
   name: partition0
   state: present
   location: '{{ target_cluster_fqdn_name }}'
- name: Complete migration on target cluster
  ibm_sv_manage_storage_partition:
   clustername: "{{ target_cluster_name }}"
   username: "{{ target_cluster_username }}"
   password: "{{ target_cluster_password }}"
   name: partition0
   state: present
   migrationaction: fixeventwithchecks

Authors

  • Shilpi Jain (@Shilpi-J)

  • Sumit Kumar Gupta (@sumitguptaibm)

  • Sandip Gulab Rajbanshi (@Sandip-Rajbanshi)