Ran into an odd situation on #Proxmox with NFS. I'm running #TrueNAS Core in a VM on it with the physical disks in the #ZFS pool handed directly to it. But I also wanted to use a subpool for storage in Nextcloud, so #Nextcloud and other storage usage can all take part in the 8TB total pool.
Can't mount NFS in the Nextcloud #LXC container since I run it unprivileged and refuse to run it privileged. So instead: #bindmounts from the host! Easy solution, except... I need those NFS mounts to mount when the VM's booted enough.
Copied the default hookscript and modified it to, after starting VM, wait a few seconds, and then try mounting one of the NFS shares to the host. If successful, it mounts the others, and then starts Nextcloud's container. Otherwise, it retries.
Works like a charm! Now if Proxmox shuts down because of a power outage (which has happened multiple times recently) it'll bring the apps back up properly without weird out-of-order nonsense!
#proxmox #truenas #zfs #nextcloud #lxc #bindmounts