community.general.lvg – Configure LVM volume groups¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.lvg
.
Parameters¶
See Also¶
See also
- community.general.filesystem
The official documentation on the community.general.filesystem module.
- community.general.lvol
The official documentation on the community.general.lvol module.
- community.general.parted
The official documentation on the community.general.parted module.
Examples¶
- name: Create a volume group on top of /dev/sda1 with physical extent size = 32MB
community.general.lvg:
vg: vg.services
pvs: /dev/sda1
pesize: 32
- name: Create a volume group on top of /dev/sdb with physical extent size = 128KiB
community.general.lvg:
vg: vg.services
pvs: /dev/sdb
pesize: 128K
# If, for example, we already have VG vg.services on top of /dev/sdb1,
# this VG will be extended by /dev/sdc5. Or if vg.services was created on
# top of /dev/sda5, we first extend it with /dev/sdb1 and /dev/sdc5,
# and then reduce by /dev/sda5.
- name: Create or resize a volume group on top of /dev/sdb1 and /dev/sdc5.
community.general.lvg:
vg: vg.services
pvs: /dev/sdb1,/dev/sdc5
- name: Remove a volume group with name vg.services
community.general.lvg:
vg: vg.services
state: absent
- name: Create a volume group on top of /dev/sda3 and resize the volume group /dev/sda3 to the maximum possible
community.general.lvg:
vg: resizableVG
pvs: /dev/sda3
pvresize: yes
Authors¶
Alexander Bulimov (@abulimov)