W3cubDocs

/Ansible 2.9

aix_lvol – Configure AIX LVM logical volumes

New in version 2.4.

Synopsis

  • This module creates, removes or resizes AIX logical volumes. Inspired by lvol module.

Parameters

Parameter Choices/Defaults Comments
copies
integer
Default:
1
The number of copies of the logical volume.
Maximum copies are 3.
lv
string / required
The name of the logical volume.
lv_type
string
Default:
"jfs2"
The type of the logical volume.
opts
string
Free-form options to be passed to the mklv command.
policy
string
    Choices:
  • maximum
  • minimum
Sets the interphysical volume allocation policy.
maximum allocates logical partitions across the maximum number of physical volumes.
minimum allocates logical partitions across the minimum number of physical volumes.
pvs
list
A list of physical volumes e.g. hdisk1,hdisk2.
size
string
The size of the logical volume with one of the [MGT] units.
state
string
    Choices:
  • absent
  • present
Control if the logical volume exists. If present and the volume does not already exist then the size option is required.
vg
string / required
The volume group this logical volume is part of.

Examples

- name: Create a logical volume of 512M
  aix_lvol:
    vg: testvg
    lv: testlv
    size: 512M

- name: Create a logical volume of 512M with disks hdisk1 and hdisk2
  aix_lvol:
    vg: testvg
    lv: test2lv
    size: 512M
    pvs: [ hdisk1, hdisk2 ]

- name: Create a logical volume of 512M mirrored
  aix_lvol:
    vg: testvg
    lv: test3lv
    size: 512M
    copies: 2

- name: Create a logical volume of 1G with a minimum placement policy
  aix_lvol:
    vg: rootvg
    lv: test4lv
    size: 1G
    policy: minimum

- name: Create a logical volume with special options like mirror pool
  aix_lvol:
    vg: testvg
    lv: testlv
    size: 512M
    opts: -p copy1=poolA -p copy2=poolB

- name: Extend the logical volume to 1200M
  aix_lvol:
    vg: testvg
    lv: test4lv
    size: 1200M

- name: Remove the logical volume
  aix_lvol:
    vg: testvg
    lv: testlv
    state: absent

Return Values

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

Key Returned Description
msg
string
always
A friendly message describing the task result.

Sample:
Logical volume testlv created.


Status

Authors

  • Alain Dejoux (@adejoux)

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.9/modules/aix_lvol_module.html