MergerFS policy change in OMV GUI does not remount active pool, leaving runtime configuration inconsistent

  • When changing the MergerFS Create policy in the OpenMediaVault GUI and clicking Apply, OMV updates its stored configuration and generated mount configuration, but an already-running MergerFS pool may continue running with the previous policy.

    This results in a discrepancy between what the OMV GUI reports as configured and what the active MergerFS filesystem is actually using.

    In my case, the MergerFS pool was originally configured with:

    Code
    Create policy: Existing path, most free space (epmfs)

    I later changed the policy in the OMV GUI to:

    Code
    Create policy: Most free space (mfs)

    The OMV configuration correctly showed mfs, but the already-running MergerFS process continued using epmfs.

    Environment

    • OpenMediaVault 8
    • Raspberry Pi 4
    • MergerFS 2.42.0
    • Five-drive MergerFS pool
    • Pool name: 5bay

    What happened

    After changing the MergerFS Create policy from epmfs to mfs in the OMV GUI and clicking Apply, the GUI showed the new mfs configuration.

    The OMV configuration database also showed:

    Code
    "createpolicy": "mfs"

    /etc/openmediavault/config.xml likewise showed:

    Code
    <createpolicy>mfs</createpolicy>

    The generated systemd mount unit also eventually contained:

    Code
    category.create=mfs

    However, the currently running MergerFS process was still using:

    Code
    category.create=epmfs

    This was confirmed directly from the running process:

    Code
    sudo tr '\0' ' ' < /proc/$(pgrep -f 'mergerfs 5bay:' | head -n1)/cmdline

    which returned, among other options:

    Code
    category.create=epmfs

    Therefore, the GUI and stored configuration indicated mfs, while the active filesystem was still operating with epmfs.

    Why this is a problem

    This is particularly significant for MergerFS because the Create policy directly affects which underlying filesystem receives newly created files.

    An administrator can therefore:

    1. Change the policy in the OMV GUI.
    2. Click Apply.
    3. See the new policy displayed in OMV.
    4. Reasonably assume the pool is now operating with that policy.
    5. Continue a large data migration.
    6. Actually have the migration running under the previous policy.

    This can result in data being physically distributed across the underlying disks differently from what the administrator intended.

    In a storage-management system, this discrepancy is especially difficult to detect because the GUI appears to indicate that the change has already been applied successfully.

    Expected behavior

    When the user changes a MergerFS pool configuration and clicks Apply, OMV should ensure that the active MergerFS mount is recreated/remounted with the new configuration.

    For example:

    Code
    GUI configuration change        ↓
    Click Apply        ↓
    Update OMV configuration        ↓
    Regenerate MergerFS mount configuration        ↓
    Safely unmount affected MergerFS pool        ↓
    Remount pool using new options        ↓
    Verify mount is active

    After clicking Apply, the running MergerFS process should use the same policy shown by OMV.

    In this particular case, changing:

    Code
    epmfs → mfs

    should have resulted in the active MergerFS process immediately using:

    Code
    category.create=mfs

    Suggested behavior for busy pools

    I understand that automatically remounting a filesystem can be unsafe if the pool is currently in use.

    If OMV cannot safely remount the pool because it is busy, it should instead explicitly report that the configuration change has not yet been applied to the active mount, rather than silently leaving the old policy running.

    For example:

    Quote
    "The MergerFS configuration has been changed, but the active pool could not be remounted because it is currently in use. The new configuration will not take effect until the pool is remounted."

    An explicit "Remount required" state would also be acceptable.

    Workaround discovered

    In my case, manually stopping and starting the generated systemd mount caused the running MergerFS process to finally adopt the correct policy:

    Code
    sudo systemctl stop srv-mergerfs-5bay.mount
    sudo systemctl start srv-mergerfs-5bay.mount

    After restarting the mount, the active process correctly reported:

    Code
    category.create=mfs

    The generated mount unit also contained:

    Code
    category.create=mfs

    We then performed an actual file-creation test through the MergerFS mount and confirmed that the file was created on the expected underlying filesystem.

    Proposed fix

    I believe the most appropriate fix is for Apply on the MergerFS configuration page to automatically reconcile the active MergerFS pool with the newly applied configuration.

    At minimum, OMV should detect when a configuration change affects the active MergerFS mount and either:

    1. Automatically remount the affected pool, or
    2. Clearly indicate that the configuration is pending and that the pool must be remounted before the change is active.

    The important point is that the OMV GUI should not present the new MergerFS policy as fully applied while the active MergerFS process is still operating under the previous policy.

    Additional note

    I believe this is primarily a configuration/runtime synchronization issue, rather than a MergerFS bug itself. MergerFS correctly continued operating according to the options with which its existing process had been started.

    The issue is that OMV allowed the persistent configuration, generated configuration, and GUI state to diverge from the active runtime state without clearly communicating that the existing MergerFS process had not adopted the new settings.

    Because this can affect actual file placement on a storage pool, I believe it warrants consideration as a bug or usability/safety issue in OMV's MergerFS integration.



    im unsure if this is intended behavior but i wanted to make this known so others were aware not to depend on the GUI if you change the policy in the pool after already having one set.

  • chente

    Approved the thread.
    • New
    • Official Post

    When changing the MergerFS Create policy in the OpenMediaVault GUI and clicking Apply, OMV updates its stored configuration and generated mount configuration, but an already-running MergerFS pool may continue running with the previous policy.

    I don't think reporting this issue needed this very long AI post. And this is a known issue since a pool in use can't easily be restarted. The plugin tells you this on the form


    omv 8.5.8-1 synchrony | 7.0 proxmox kernel

    plugins:

    omvextrasorg 8.0.3 | kvm 8.3.2 | compose 8.1.24 | cterm 8.0.3 | borgbackup 8.2.1 | tempmon 8.0.5 |

    mergerfs 8.0.2 | scripts 8.0.6 | writecache 8.2.4 | backup 8.1 | kernel 8.0.16


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I don't think reporting this issue needed this very long AI post. And this is a known issue since a pool in use can't easily be restarted. The plugin tells you this on the form


    yes i had an ai type it up and I've been using the ai to help me with setting up my stuff. i know its not ideal but it is quicker than going out and doing trial and error on my own and trying to follow a bunch of documentation that i don't completely understand myself either.

    • New
    • Official Post

    yes i had an ai type it up and I've been using the ai to help me with setting up my stuff.

    The problem is I don't want to read a book. If you are going to use AI, have it summarize to a short response.


    i know its not ideal but it is quicker than going out and doing trial and error on my own and trying to follow a bunch of documentation that i don't completely understand myself either.

    Why do you need documentation for this? The plugin tells you to reboot if you make changes. No trial and error needed.

    omv 8.5.8-1 synchrony | 7.0 proxmox kernel

    plugins:

    omvextrasorg 8.0.3 | kvm 8.3.2 | compose 8.1.24 | cterm 8.0.3 | borgbackup 8.2.1 | tempmon 8.0.5 |

    mergerfs 8.0.2 | scripts 8.0.6 | writecache 8.2.4 | backup 8.1 | kernel 8.0.16


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • es i had an ai type it up and I've been using the ai to help me with setting up my stuff.

    And they'll go into extreme nit picking detail every time. If you don't know how to manage them (AI), and keep them on what's relevant, they'll walk you into a blind alley.

    The problem is I don't want to read a book.

    This is EXACTLY why I stopped reading the first post. The shear length of it makes the eyes glaze over.
    No one wants to read a Doctoral Thesis on what happens if one doesn't "read" the simple solution - REBOOT.

    it is quicker than going out and doing trial and error on my own and trying to follow a bunch of documentation that i don't completely understand myself either.

    The issue with this is:
    AI may be able to sort out a minor technical detail, here and there, but it CAN NOT give you understanding. If documentation exists, that should be your "go-to". AI should be the absolute last resort (to potentially solve an overlooked detail) but, even at that, it's important to learn "the lesson". Otherwise, you'll end up at the same place over and over again.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!