# Insifficient support for LVM in Ansible (2.9+)

**URL:** <https://forum.ansible.com/t/insifficient-support-for-lvm-in-ansible-2-9/32321>\
**Category:** Ansible Developer\
**Tags:** rhel\
**Created:** [February 25, 2020, 12:00pm UTC](https://forum.ansible.com/t/insifficient-support-for-lvm-in-ansible-2-9/32321 "2020-02-25T12:00:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_van\_der\_Linden](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@Rene\_van\_der\_Linden](https://forum.ansible.com/u/Rene_van_der_Linden)\
**Post date:** [February 25, 2020, 12:00pm UTC](https://forum.ansible.com/t/insifficient-support-for-lvm-in-ansible-2-9/32321/1 "2020-02-25T12:00:27Z")

</div>

The LVM related modules filesystem and lvol

- [https://docs.ansible.com/ansible/latest/modules/filesystem\_module.html](https://docs.ansible.com/ansible/latest/modules/filesystem_module.html)
- [https://docs.ansible.com/ansible/latest/modules/lvol\_module.html](https://docs.ansible.com/ansible/latest/modules/lvol_module.html)

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é

---

<div class="post-metadata">

**Author:** ![Andreas\_Olsson](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Andreas\_Olsson](https://forum.ansible.com/u/Andreas_Olsson)\
**Post date:** [February 25, 2020, 2:45pm UTC](https://forum.ansible.com/t/insifficient-support-for-lvm-in-ansible-2-9/32321/2 "2020-02-25T14:45:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rene\_van\_der\_Linden](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@Rene\_van\_der\_Linden](https://forum.ansible.com/u/Rene_van_der_Linden)\
**Post date:** [February 25, 2020, 10:04pm UTC](https://forum.ansible.com/t/insifficient-support-for-lvm-in-ansible-2-9/32321/3 "2020-02-25T22:04:28Z")

</div>

"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 🙂
