Plugin remote-mount - Auto mount & reload shared folder after network failure

    • OMV 4.x
    • scarabaeus wrote:

      If i can try something to help yu
      Sorry, I don't have a solution.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Adoby wrote:

      my autofs method outside OMV still works fine...
      So change the plugin to use autofs.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • the problem is not on the mount, remotemount plugin works fine, the problem is the sharefolder is empty. if i update the sharefolder (changin comment for exemple) with the web admin in sharedfolder menu, all is become good.
      does somedy know which command "links the sharedfolder to the remotemount" ? just to try to "re-launch" it

      sorry for my poor english, i am french
    • Assume remote server R with share r. Local server L with share l.

      So, are you saying that you, on L, mount r from R using remote mount and then from L share the remote mount r again as l? That is you share a shared folder?

      I didn't think that was possible. You can't share a share again. Not using NFS at least. But I may be wrong? Is it possible with SMB/CIFS?
      OMV 4, 7 x ODROID HC2, 1 x ODROID HC1, 5 x 12TB, 1 x 8TB, 1 x 2TB SSHD, 1 x 500GB SSD, GbE, WiFi mesh
    • If it did work in OMV3, and sometimes works in OMV4, then I suspect that it is a bug.

      It should not work. I believe it breaks the rules for a POSIX filesystem. And it might even cause problems and data loss. But perhaps SMB/CIFS is special?

      I believe it is possible to do this but it involves things like rebinds/binds and redirections so that r is shared as r from L, and still directly accessed only from R. Not as l on L. And I never got it to work. It makes my head hurt even to think about it. Inception shared shares shared sharing.

      I doubt that OMV by default do rebinds/binds to allow sharing a mounted share like this.

      It would be VERY interesting if I am wrong. It would mean that I could restructure my setup so that all shares on all my OMV servers are shared again from one server. Perhaps using NFS caching on a SSD using fs-cache.
      OMV 4, 7 x ODROID HC2, 1 x ODROID HC1, 5 x 12TB, 1 x 8TB, 1 x 2TB SSHD, 1 x 500GB SSD, GbE, WiFi mesh
    • i find the command
      just after the boot i have to launch

      Source Code

      1. sudo systemctl start sharedfolders-JOSEPH.mount
      and the shrefolder is well link to the remote mount.
      in syslog at boot, i found that


      Source Code

      1. Apr 25 20:31:37 openmediavault kernel: [ 24.599695] FS-Cache: Netfs 'cifs' registered for caching
      2. Apr 25 20:31:37 openmediavault kernel: [ 24.599822] Key type cifs.spnego registered
      3. Apr 25 20:31:37 openmediavault kernel: [ 24.599826] Key type cifs.idmap registered
      4. Apr 25 20:31:37 openmediavault systemd[1]: Started OpenBSD Secure Shell server.
      5. Apr 25 20:31:37 openmediavault kernel: [ 24.700817] CIFS VFS: Error connecting to socket. Aborting operation.
      6. Apr 25 20:31:37 openmediavault kernel: [ 24.702027] CIFS VFS: cifs_mount failed w/return code = -101
      7. Apr 25 20:31:37 openmediavault kernel: [ 24.702277] CIFS VFS: Error connecting to socket. Aborting operation.
      8. Apr 25 20:31:37 openmediavault kernel: [ 24.704295] CIFS VFS: cifs_mount failed w/return code = -101
      9. Apr 25 20:31:37 openmediavault systemd[1]: srv-fe9d3aa7\x2d7096\x2d4bbe\x2db304\x2d177d68c961ef.mount: Mount process exited, code=exited status=32
      10. Apr 25 20:31:37 openmediavault systemd[1]: Failed to mount /srv/fe9d3aa7-7096-4bbe-b304-177d68c961ef.
      11. Apr 25 20:31:37 openmediavault systemd[1]: Dependency failed for Remote File Systems.
      12. Apr 25 20:31:37 openmediavault systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
      13. Apr 25 20:31:37 openmediavault systemd[1]: Dependency failed for Mount shared folder ABRAHAM to /sharedfolders/ABRAHAM.
      14. Apr 25 20:31:37 openmediavault systemd[1]: sharedfolders-ABRAHAM.mount: Job sharedfolders-ABRAHAM.mount/start failed with result 'dependency'.
      15. Apr 25 20:31:37 openmediavault systemd[1]: srv-fe9d3aa7\x2d7096\x2d4bbe\x2db304\x2d177d68c961ef.mount: Unit entered failed state.
      16. Apr 25 20:31:37 openmediavault systemd[1]: srv-76271169\x2dc010\x2d45b4\x2db710\x2d1461078eec04.mount: Mount process exited, code=exited status=32
      17. Apr 25 20:31:37 openmediavault systemd[1]: Failed to mount /srv/76271169-c010-45b4-b710-1461078eec04.
      18. Apr 25 20:31:37 openmediavault systemd[1]: Dependency failed for Mount shared folder JOSEPH to /sharedfolders/JOSEPH.
      19. Apr 25 20:31:37 openmediavault systemd[1]: sharedfolders-JOSEPH.mount: Job sharedfolders-JOSEPH.mount/start failed with result 'dependency'.
      20. Apr 25 20:31:37 openmediavault systemd[1]: srv-76271169\x2dc010\x2d45b4\x2db710\x2d1461078eec04.mount: Unit entered failed state.
      Display All
    • I

      neeqkowlah wrote:

      i find the command
      just after the boot i have to launch

      Source Code

      1. sudo systemctl start sharedfolders-JOSEPH.mount
      and the sharefolder is well link to the remote mount.
      in syslog at boot, i found that


      Source Code

      1. Apr 25 20:31:37 openmediavault kernel: [ 24.599695] FS-Cache: Netfs 'cifs' registered for caching
      2. Apr 25 20:31:37 openmediavault kernel: [ 24.599822] Key type cifs.spnego registered
      3. Apr 25 20:31:37 openmediavault kernel: [ 24.599826] Key type cifs.idmap registered
      4. Apr 25 20:31:37 openmediavault systemd[1]: Started OpenBSD Secure Shell server.
      5. Apr 25 20:31:37 openmediavault kernel: [ 24.700817] CIFS VFS: Error connecting to socket. Aborting operation.
      6. Apr 25 20:31:37 openmediavault kernel: [ 24.702027] CIFS VFS: cifs_mount failed w/return code = -101
      7. Apr 25 20:31:37 openmediavault kernel: [ 24.702277] CIFS VFS: Error connecting to socket. Aborting operation.
      8. Apr 25 20:31:37 openmediavault kernel: [ 24.704295] CIFS VFS: cifs_mount failed w/return code = -101
      9. Apr 25 20:31:37 openmediavault systemd[1]: srv-fe9d3aa7\x2d7096\x2d4bbe\x2db304\x2d177d68c961ef.mount: Mount process exited, code=exited status=32
      10. Apr 25 20:31:37 openmediavault systemd[1]: Failed to mount /srv/fe9d3aa7-7096-4bbe-b304-177d68c961ef.
      11. Apr 25 20:31:37 openmediavault systemd[1]: Dependency failed for Remote File Systems.
      12. Apr 25 20:31:37 openmediavault systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
      13. Apr 25 20:31:37 openmediavault systemd[1]: Dependency failed for Mount shared folder ABRAHAM to /sharedfolders/ABRAHAM.
      14. Apr 25 20:31:37 openmediavault systemd[1]: sharedfolders-ABRAHAM.mount: Job sharedfolders-ABRAHAM.mount/start failed with result 'dependency'.
      15. Apr 25 20:31:37 openmediavault systemd[1]: srv-fe9d3aa7\x2d7096\x2d4bbe\x2db304\x2d177d68c961ef.mount: Unit entered failed state.
      16. Apr 25 20:31:37 openmediavault systemd[1]: srv-76271169\x2dc010\x2d45b4\x2db710\x2d1461078eec04.mount: Mount process exited, code=exited status=32
      17. Apr 25 20:31:37 openmediavault systemd[1]: Failed to mount /srv/76271169-c010-45b4-b710-1461078eec04.
      18. Apr 25 20:31:37 openmediavault systemd[1]: Dependency failed for Mount shared folder JOSEPH to /sharedfolders/JOSEPH.
      19. Apr 25 20:31:37 openmediavault systemd[1]: sharedfolders-JOSEPH.mount: Job sharedfolders-JOSEPH.mount/start failed with result 'dependency'.
      20. Apr 25 20:31:37 openmediavault systemd[1]: srv-76271169\x2dc010\x2d45b4\x2db710\x2d1461078eec04.mount: Unit entered failed state.
      Display All
      I have the exact same issue described by the OP.

      I currently am using the remote-mount plugin to mount a network share on my router. I then make a shared folder based on this remote-mount and use rsnapshot to sync backups across it.

      Occasionally, if the router reboots or there is some time of network interruption, the there will be a mounting error.


      The only way I’ve found to recover from it is rebooting the OMV server. I run these rsnapshot backups nightly and I’ve had to setup a scheduled task to reboot the OMV server each night prior to backups. I’d really like to stop needing to fully reboot the server.

      Is there any potential solutions for this?

      The post was edited 1 time, last by Mikey32230 ().

    • Nevermind, it appears this may have been fixed at some point recently?

      Now it seems to auto reconnect the remote mount point when interruptions occur.

      I'm not sure if it does this by default or of this is because I ran the following command like @neeqkowlah mentioned above.

      sudo systemctl start sharedfolders-backup.mount

      ^The name of the shared folder obviously depends on what you named yours.