BTRFS Pool Mounting Issue

  • Hey there,


    I have a wonky situation here. I was having some issues with my OMV 3 install and I decided that it's a good time to start fresh on the latest OMV 4.
    I have 4 BTRFS filesystems, one RAID and 3 pools (all of them are on 2 devices respectively). There were no issues under OMV3.


    Since the install of 4 (again, fresh install), I've mounted the RAID using the GUI, but, when I try to mount the pools, the "Please confirm to save" message appears, I click on OK, and nothing else happens in the GUI. They appear in FSTAB and I can see them mounted, but the GUI shows them as unmounted. I can even access the /srv/... locations and everything looks good on that end. The OMV config file shows them all.


    But, since the GUI doesn't show them as mounted, I can't see them in the Shared Folders. And it spirals from there (SMB, services... )


    Any suggestion would be greatly appreciated at this point!


    Thanks!

  • This far, I've tried clearing the browser cache and the Web Control Cache (with omv-firstaid).
    Then I've removed all mounts (except for the OS one) via CLI from both config.xml and fstab, and only re-added one of the pools via the GUI. No success here either.


    Anyone has any suggestion?


    Thanks!

  • I think I know what's happening....


    There is a mismatch in terms of devices between what gets mounted via fstab and what /dev/disk/by-label lists.
    In my case, one pool (call it "POOL.01") is /dev/sdc + /dev/sdd. FSTAB mounts it from /dev/sdd, but /dev/disk/by-label has a symlink to /dev/sdc. And "findmnt -cnrv -o SOURCE" lists it as /dev/sdd.


    This causes OMV not to recognize the fact that the filesystem is mounted.


    I wish I knew how to fix it. :)

  • Alright... So, I took matters into my own hands and I think I've "fixed" the issues I've had.
    I've modified 2 php classes and they seem to do the trick.


    /usr/share/php/openmediavault/system/filesystem/filesystem.inc
    and
    /usr/share/php/openmediavault/system/filesystem/btrfs.inc


    What I've done is this:
    In the parent class (in filesystem.inc), I've added a new method to execute "findmnt" (with some of it's variants) ... simply for code reusability.
    In the child class, I've overridden isMounted and getMountPoint to account for the presence of multiple devices per filesystem.
    There may be some other things that I'd need to consider (mounting, unmounting... stuff like that), but, for now, this does the trick for me.


    Can anyone suggest me a clean method of sending my changes to the developers, so they can review them?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!