NFS is creating folders on ZFS mountpoint before device is mounted

  • Hello to all!


    I am not certain if this topic belongs to Plugins, NFS or Storage subforum. Please forgive if this place isn't appropriate.


    So, after reboot I can't import my zpool using the GUI because the mountpoint (/mnt/tank) isn't empty. After SSHing, I can see this structure present (only empty folders):


    /mnt/tank/dataset1/folderA

    /mnt/tank/dataset2/folderB

    /mnt/tank/dataset2/folderC


    folderA, folderB and folderC are my NFS shares, mapped using the Shared Folders functionality present in OMV GUI.


    To solve that I login into the box and execute # rm -r /mnt/tank/. After that I can successfully import (and mount) the zpool.


    It seems the culprit is NFS, which creates empty folders under this subtree before the zpool is mounted. I have other shared folders inside this zpool which do not create this problem (I share them with SMB):


    /mnt/tank/dataset2/folderD

    /mnt/tank/dataset3/folderE


    I could force a mount on top of a nonempty directory using # zfs mount -O tank, but this is currently unavailable using the ZFS plugin (besides not being the cleanest solution). I wish to somehow prevent NFS from creating the shared folders paths under /mnt/tank before the zpool was imported. Is there any way I could do that using the current version of OMV? I can code, so changing stuff using CLI or contributing changes either to OMV core or ZFS plugin are doable.


    zpool 'tank' is on top of a luks wholly encrypted device, so I must 1st unlock the disk and then import the pool (after every reboot).


    Setup:

Jetzt mitmachen!

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