Recommended way to shrink a logical volume?

I have an ext4 path that is mounted on a logical volume. How do I shrink this without damaging the ext4 filesystem? I’m using community.general.lvol and noticed it has parameters shrink, resizefs and force. Can I just create one task like this:

  • name: Shrink
    community.general.lvol:
    vg: “{{ vg_name }}”
    lv: “{{ lv_name }}”
    size: “{{ size }}”
    shrink: true
    resizefs: true
    force: true

Or do I need to create one task each for unmounting the ext4 filesystem, run e2fsck -p -f ext4, shrink ext4 using resize2fs, resize the LV using lvol module with resizefs parameter set to no?

I haven’t actually used this, but thinking about how the tasks break down, I’d absolutely do this as multiple tasks to unmount, resize the filesystem, then resize the LV volume once the filesystem has been shrunk.

That lets you ensure that each previous task was successful before doing the next operation.