NFS shares appear as empty on client

  • While I was writing this up, I believe I figured out the cause of my issue, but alas, I have no clue how to fix it.


    I had to reboot my Hypervisor, and so I did. And then I blindly booted up all of my VMs. I completely forgot that all of my drives in OMV are encrypted, so they are not initially available upon boot. So after my other VMs booted up, autofs worked like a charm, and they dutifully tried writing to the NFS shares. It appears that they created data in the /exports/ folder on OMV, essentially breaking the NFS shares of OMV. I'll note that SMB is still working great, so this issue is specifically with NFS. But when I mount an NFS share, I see an empty folder, and the available space reported by the client-side file browser always shows as the amount of local storage on OMV, rather than the available space on the drive share. So what would be the procedure at this point to empty the /exports/ folder on OMV. I'm guessing I'd first disable NFS, and then run a command to wipe the folder contents (not sure where I'd perform this, or what the command would be), and then I could re-enable NFS on OMV and then turn autofs back on client-side.

  • ok, I think I figured this out. There might have been a better way, but this is what I did:


    1. Turn off NFS
    2. log into the OMV shell directly on the VM (rather than through the gui)
    3. Add my user to the sudo group
    4. empty the exports folder with sudo rm -r /export/*
    5. exit the shell, and go back to the web gui
    6. Remove and re-create all of my NFS shares
    7. Turn NFS back on

    Again, there may have been a faster way, but this worked. I'll need to set up auto-decrypting of the drives at OMV startup, because I can easily see this happening again the next time I reboot OMV.

  • Hi,

    I've got same problem here (data HDD encrypted with LUKS, reboot, NFS shares empty but SMB working great), and your workaround solved it, thanks.

    I hope there is a more convenient solution to this.

  • I just rebooted OMV while all my other servers were off, unlocked all the LUKS drives, and all my folders in /export/ are empty. I turned off NFS and then turned it back on, and they are still empty. This can't possibly be something that I need to do every time...?


    Revised and abbreviated solution can be done entirely from the web GUI:

    1. Unlock all LUKS drives
    2. Turn off NFS
    3. Remove and re-create all NFS shares
    4. Turn NFS back on

    I do wish that someone with further knowledge could assist. Because it appears that this is something I'll need to do after every reboot of OMV until I have a moment to tackle auto-decrypting drives at boot.

  • I don’t use LUKS but I thought there was an auto unlock setting in the plugin.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

  • Not that I know of. I believe the LUKS addon only adds the Encryption tab under Storage. I see no option for auto decrypting.


    I managed to find this guide at one point while browsing this forum for how to auto-decrypt at startup.

  • Not that I know of. I believe the LUKS addon only adds the Encryption tab under Storage. I see no option for auto decrypting.


    I managed to find this guide at one point while browsing this forum for how to auto-decrypt at startup.

    I'm doing something similar on my computers but the system volume is encrypted so the keyfile is not readable without entering my passphrase (on boot sequence). On a server it's not a viable solution to me because I can't encrypt system volume (otherwise I won't be able to boot remotely) and auto unlocking remove the interest of using encryption.

    A solution that would work for me is not trying to mount NFS shares if volume is not present and mounting the shares only when encrypted volume is decrypted.

Participate now!

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