yadro.tatlin_uni.tatlin_sp_pool module – Create, modify or destroy a pool

Note

This module is part of the yadro.tatlin_uni collection (version 1.0.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 yadro.tatlin_uni.

To use it in a playbook, specify: yadro.tatlin_uni.tatlin_sp_pool.

New in version 1.0.0: of yadro.tatlin_uni

Synopsis

  • This module is intended to create new pool and change or remove existing pool

  • Supports check mode

Parameters

Parameter

Comments

connection

dictionary / required

connection describes Tatlin Storage Processor (SP) connection configuration.

Only session connection supported.

Authorization is executed automatically with corresponding endpoint. ‘auth/login’ by default.

Client receives x-auth-token and uses it for following requests.

base_url

string / required

Tatlin REST API entrypoint.

password

string

Tatlin user password.

timeout

integer

Tatlin REST API request timeout.

Default: 60

username

string

Tatlin username to login.

validate_certs

boolean

Responsible for SSL certificates validation.

If set to False certificates won’t validated.

Choices:

  • no

  • yes ← (default)

critical_threshold

integer

Pool usage threshold in % (from 1 to 99) for sending alerts with level Critical.

Used only with provision == thick

drive_group

string / required

Name of the drive group

drives_count

integer

Pool size in disks

One of the following arguments is required, when new pool is creating - size, device_count

Mutually exclusive with size

name

string / required

Name of the pool

protection

string

Data protection scheme

Required when new pool is creating

Choices:

  • 1+1

  • 2+1

  • 2+2

  • 4+1

  • 4+2

  • 4+3

  • 4+4

  • 8+1

  • 8+2

  • 8+3

  • 8+4

  • 8+5

  • 8+6

  • 8+7

  • 8+8

provision

string

Type of resources reservation

Required if new pool is creating

Choices:

  • thin

  • thick

size

string

Pool volume

One of the following arguments is required, when new pool is creating - size, device_count

Mutually exclusive with device_count

Can be presented as a string number with postfix. For example ‘100 MiB’. Following postfixes are allowed - [B, KB, MB, GB, TB, PB, EB, ZB, YB, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB]

If no postfix is passed, ‘B’ (bytes) will be used.

spare_count

integer

Count of reserved drives

state

string

present create new pool or change existing

With existing pool it is allowed only resizing (size or drives_count) and changing spare_count and thresholds

absent removes existing pool. Only pool without resources can be removed

Choices:

  • present ← (default)

  • absent

stripe_size

string

Size of stripe

wait_timeout

integer

The number of seconds for waiting until pool will be ready

Default: 60

warning_threshold

integer

Pool usage threshold in % (from 1 to 99) for sending alerts with level Warning.

Used only with provision == thin

Notes

Note

  • Fact pool size may differ from size value. Real size will be returned by module

  • Pool removing takes some time in Tatlin. It means that after execution module with state absent task completes, but pool can still exist. Therefore, if new pool is created after removing pool with same name, it needs to be ensure that pool doesn’t exists. This operation is out of scope of this module. yadro.tatlin_uni.tatlin_sp_pools_info can be used in that case

Examples

---
- name: Create new pool
  yadro.tatlin_uni.tatlin_sp_pool:
    connection: "{{ connection }}"
    drive_group: HDD_209.71MB
    name: testpool
    protection: '1+1'
    provision: 'thin'
    size: 192 MiB
    spare_count: 1
    stripe_size: 4KiB
    warning_threshold: 80
    critical_threshold: 95

- name: Resize pool
  yadro.tatlin_uni.tatlin_sp_pool:
    connection: "{{ connection }}"
    drive_group: HDD_209.71MB
    name: testpool
    drives_count: 5

- name: Update thresholds
  yadro.tatlin_uni.tatlin_sp_pool:
    connection: "{{ connection }}"
    drive_group: HDD_209.71MB
    name: testpool
    warning_threshold: 75
    critical_threshold: 90

- name: Remove pool
  yadro.tatlin_uni.tatlin_sp_pool:
    connection: "{{ connection }}"
    drive_group: HDD_209.71MB
    name: testpool
    state: absent

Return Values

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

Key

Description

error

string

Error details if raised

Returned: on error

msg

string

Operation status message

Returned: always

real_size

string

Real pool size (may be defferent from size)

Always None if state is absent

Returned: on success

Authors

  • Sergey Kovalev (@kvlvs)