UNSOLVED NFS mount for Apps
I have a few NFS mounts on my server for videos, music, etc., which I pass on to apps (Jellyfin, Navidrome, etc.). I am curious as to how these mounts are passed to apps as they start to run. When I reboot Cloudron, these apps run but none of the mounts are available. I mean I can't see the videos or music shares. I have to reboot the app to get access to these folders. So, are the apps starting before the NFS shares get mounted? If so, is there a way to delay app start until the shares are available?
Are you using the volume feature of Cloudron for the NFS mounts and have you connected those volumes to that app?
@nebulon yes, I am using the volumes feature. I then, simply pass these mounts to apps in the Storage area as read only.
Hm then possibly we have a race at server bootup. Have to check if and how I can reproduce this.
@neurokrish next time you hit this, can you also check if the files are not visible in the volume's file manager as well (there is a file manager button next to the right of the volume in the Volumes UI) ? If it's visible, it indicates that there is a race between the mounting and the container getting created.
As an idea, the systemd mount points are created under
/etc/systemd/system/. Can you try editing the unit files there to have
Before=docker.serviceand see if that helps?
(Maybe we need to create "wait for" unit files like this - https://serverfault.com/questions/904421/docker-service-starts-before-zfs )
I have a similar issue with my sshfs mount for my Nextcloud instances (setup described here). On every reboot, I have to manually remove both subfolders from the where the mount should be (empty directories) and run mount -a manually to get the correct content online.
So the sshfs mount is at
/mnt/cloudand there are 2 volumes set up like this:
After reboot, there are those two empty mount points in there that block the actual mounting (
/mnt/cloud/cloud2). Those two I have to rm -r in order to get the mounts back. Hope that makes sense.
@girish sorry, as I mentioned in my other post "Can't access Cloudron", it appears that my ISP started blocking ports 80 and 443. So, I can't troubleshoot the NFS mount issue. I am, however, pretty sure that this problem exists!
Let me know if I can do anything to troubleshoot without access to my Cloudron dashboard, and I will.
@girish I am back online with Cloudron. Looks like I am caught in a bit of a crossfire with my ISP meddling with things. I checked in the file manager near the mounts in Volumes UI. There are no files over there. Have a look,
I will edit the files you suggested and report back!
@girish editing the unit files to add
Before=docker.servicedid not work for me. I can't see any of my files. However, if I try to mount these shares in the host system by editing fstab file, they are available on boot.
I can also confirm @msbt 's observations. If after boot, I go to the Volumes UI and delete, re-add shares, all these files become available. I then have to go the app (Jellyfin, Navidrome, etc.) and reboot the app to see the shares..