remote mount plugin with offline drives

  • Hi Folks,

    I have been using the remote mount plugin to mount drives attached to a computer.
    These drives are set as destinations for my Rsync backups.
    I only need them for that task, so, once I am done with them, I turn them off.

    I would like to mount and unmount them when I want (after power them), what is the best way to achieve that?

    Right now, I get a missing a “status failed mountpoint” email for each drive if I reboot OMV.
    I also can’t see any disk usage information under performance statistics (system information), even for the drives that are still online.
    These are minor problems, but I just wonder if there is a way to solve these 2 issues.
    I could remove the remote mount entries and reenter them each time, but I am hoping there is a better way.


    Asrock J3455 - 8GB ram - 1x4TB WD RED + 1x2TB WD Green
    OMV 4.1.26-1 - Kernel 4.19

  • There is. It is autofs.

    I use it exclusively for my remote mounts with nfs and rsync backups. But it should work with SMB/CIFS as well, I think. I have only tried with nfs. SMB/CIFS is very, very different. Not at all as I describe for nfs below.

    Autofs is fully self healing and handle offline shares and rebooted or offline servers gracefully.

    I even use it for my laptop. When the laptop is in the home network I can use the autofs mount points to connect to my OMV NAS. When I'm not in the network I can't. But when I'm back in the network I can again. I don't have to do anything and no error messages.

    Short description. Of how I set it up.


    There is a remote NFS share you want to mount with autofs. Or shares. Perhaps a share on a OMV NAS?
    You have installed nfs-common on the client you want to use autofs with nfs.

    1. Install autofs: sudo apt install autofs
    2. Create a mount point base for autofs to use: sudo mkdir /srv/nfs
    3. Edit /etc/auto.master.

    It should specify the mount base and auto.nfs - see example in

    4. Edit /etc/auto.nfs. There should be one line per remote mount, similar to what you would put in fstab.

    The files auto.master and auto.nfs are very finicky and it is easy to miss something. I just carefully edit existing copies of auto.master and auto.nfs and copy paste them into /etc. If anything at all is wrong, autofs won't work. This includes the details of the remotes exports in auto.nfs.

    5. Reboot.

    6. Enjoy autofs.

    There should now be subfolders for each remote share under /srv/nfs. As soon as you try to use one of these subfolders autofs will attempt to mount the remote share there. It is automagical!

    Note: You must edit auto.nfs. My remote shares are not the same as your shares.

    Note 2: Naturally you need to have the correct access rights configured and use the correct user accounts on both the local client and the remote share. Between servers that is, most likely, root. Between my laptop and my OMV servers I use a normal user account that is identical on all my servers and all my client computers.



      (868 Byte, downloaded 118 times, last: )

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited once, last by Adoby ().

  • Thank Adoby for your reply!
    Installing and setting up autofs on OMV seems to be pretty straight forward. I should be able to adapt your auto.master and auto.nfs to my use case.

    What is less clear for me is how I present the remote shares to OMV. You mention I would need to install nfs-common on the client. The drives I want OMV to mount are on a Mac running MacOS Catalina. I can't find any online resources that tell me how to install nfs-common on a Mac. I assume this is only for linux machines. What's the best way then to share drives over NFS with a Mac..? My google searches didn't lead me anywhere. It could be that I am not phrasing things correctly!
    MacOS makes it easy to share drives or folders over SMB, you just need to head over to System Preferences > Sharing > File Sharing. No option for NFS as far as I can see.

    Asrock J3455 - 8GB ram - 1x4TB WD RED + 1x2TB WD Green
    OMV 4.1.26-1 - Kernel 4.19

Participate now!

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