Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker volume mounts via NFS mounts are frequently unaccessible until container restart

Featured Replies

I have an NFS share via the Unassigned Devices plugin mounted at /mnt/remotes/192.168.0.2_mediabot

It is set to automount.

 

I also have docker containers (installed via Apps), using that as a bind mount, eg:

/mnt/remotes/192.168.0.2_mediabot/library/ from the host/unraid is mounted to /data/ in the container.

 

This all works fine, with one problem:

If the NFS share unmounts/remounts (eg if that device restarts), it will be broken in the container until I restart the docker container.

 

So, I'm looking for a way to either:

- prevent the docker mount from breaking at all

- automatically restart the container when the mount breaks

- any other suggestions

 

I suspect one approach that may work better is to actually use the docker nfs driver for the mount, rather than just relying on it being at that path on the host machine. I'm savvy with Docker, but less-so with unraid, and don't really know how to achieve that via the Docker container UI, so any tips are apprecaited.

image.png

Solved by Squid

  • Solution

Try editing the path and select Slave as the access mode.  EG: Read/Write: SLAVE

  • Author
6 minutes ago, Squid said:

Try editing the path and select Slave as the access mode.  EG: Read/Write: SLAVE


I just saw you your reply about this here, trying now. Thanks!

  • 2 weeks later...
  • Author

 

On 3/30/2024 at 11:30 AM, Squid said:

Try editing the path and select Slave as the access mode.  EG: Read/Write: SLAVE

 

@Squid Hmmm – I have the path set to Read/Write: Slave and I'm still seeing the behavior.

Today I lost power and all my mounts are empty, and back when I restart the containers.

 

Any other ideas?

 

 1950326328_CleanShot2024-04-09at21_29.16@2x.png.19a8c6aa285af3308ae294957c562ee8.png

  • 5 months later...

I'm in the same boat. I recently split up my Unraid media server into two machines, one returning to its original hardware, a SuperMicro motherboard and i3 7300, and the other machine with what was in the media server, an Asrock motherboard with a r5 3600. I am using a private NFS share mounted from machine 1 into machine 2, and containers routinely see the mount as empty until I restart the containers. I'm periodically doing maintenance on machine 1, juggling around drives, tinkering. I shouldn't have to stop and start all containers on machine 2.

 

Is there a script that can monitor the mount point every 5 or ten minutes from within a container and restart it if necessary?

  • 11 months later...
  • Author

@Squid Any other ideas to try is this doesn't work? I have all my volume mounts set to RW Slave, but a restore after power outtage always results in this:

  • Unraid comes back online

  • No matter how long I wait, when I log into Unraid, the NFS share will be unmounted, and the MOUNT button will be grayed out (FWIW, automount is enabled)

  • 10s or so later, the MOUNT button will be orange, and I click it

  • Now, in my containers, everywhere that is mounted (as RW Slave), I can cd into, but is empty.

  • Once I restart the container, everything is back as expected.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.