This role is an extension of the most used lvm cookbook. It add the ability to create thinpools and their associated metadata
In addition to the usual variables, you can declare some more in order to configure thinpools
---
lvmetanames:
...
metadata: <another lvname> # declares the metadata logical volume
---
lvmetanames:
...
autoextendtreshold: <number> # threshold of the autoextend profile
autoextendpercent: <number> # percentage of the autoextend profile
Full example
---
vars:
lvm_groups:
- vgname: myvg
disks:
- /dev/sdb1
create: true
lvnames:
- lvname: notathinpool # original role
size: 40%VG
opts: ""
create: true
filesystem: xfs
mntp: /var/stuff
mount: true
lvmetanames:
- lvname: thinpool
size: 40%VG
opts: "--wipesignatures y"
create: true
metadata: myvg/thinpoolmeta
autoextendtreshold: 80
autoextendpercent: 20
filesystem: xfs
mntp: /var/lib/docker
mount: true
- lvname: thinpoolmeta
size: 10%VG
opts: "--wipesignatures y"
create: true
manage_lvm: true
Also configures NFS server, but only if the machine is protected by Kerberos (see tcharl.ansible_securehost in order to configure it)
As said, mrlesmithjr.ansible-manage-lvm
See the vars declared on the molecule test, as well as their impact
- Twitter @tcharl
- Github @tcharl
- LinkedIn Charlie Mordant