Insifficient support for LVM in Ansible (2.9+)

The LVM related modules filesystem and lvol

are unable to manage xfs and swap filesystems on RHEL 7/8

When trying to grow an xfs filesystem using the filesystem module, an error occurs.
Underneath it’s using xfs_growfs, but that command required a mountpoint. The module however provides the /dev path which isn’t supported anymore

RHEL 8

Failure

xfs_growfs /dev/vg.appl/lv.taopt

xfs_growfs: /dev/vg.appl/lv.taopt is not a mounted XFS filesystem

Working fine

xfs_growfs /opt/testapp

meta-data=/dev/mapper/vg.appl-lv.taopt isize=512 agcount=6, agsize=32768 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=196608, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=1368, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

I was able to use the lvol module and the resizefs option, but filesystem clearly states in the documentation that it support xfs too

RHEL 7/8

The 2nd issue is resizing a swap partition. There seems to be no workaround as both filesystem and lvol module can’t resize swap
Using filesystem to resize will display the message
“msg”: “module does not support resizing swap filesystem yet.”

and using lvol reports
“msg”: “Unable to resize lv.paging00 to 4g”, “rc”: 5

Logged a support ticket at Red Hat, but they replied these are community managed modules and should therefore be fixed by the community.

Kind regards,

René

tis 2020-02-25 klockan 04:00 -0800 skrev Rene van der Linden:

...
Logged a support ticket at Red Hat, but they replied these are
community managed modules and should therefore be fixed by the
community.

Did Red Hat support actually use those words, that the modules *should*
be fixed by the community? Also, is there anything preventing Red Hat
from contributing to community managed modules?

// Andreas

"filesystem module is a community-based module that is not authored or directly supported by Red Hat"

Together with a link to this community.

I'll pick it up with Red Hat, as I find the answer a little too easy :slight_smile: