Container NFS simfs mounts not coming up on reboot.

wawawawa

Member
Mar 8, 2014
17
0
21
Hi All

I am using (and loving) the latest proxmox on an Intel NUC with an NFS mount to a NAS.

I use mount and umount scripts per container in /etc/pve/openvz using simfs to bind to the main host mounts.

This all works well and NFS mounts are available in the containers. However, if I restart the whole system then the containers start and are unable to access NFS mounts. The mount is simply not there...

If I then restart the container using "vzctl restart " then the NFS mounts inside the container start to work as expected.
I guess this could be due to a timing issue on boot where the containers are started before the main host NFS mount is available, but this is conjecture.

Has anyone else seen this problem?
I can think of two different approaches to fix this:
- Is there a simple way to add a short delay to the start of the containers?
- Change the service start order to make sure that the NFS mounts are complete before any of the pve-* services are started.

Many thanks in advance for any suggestions
 
Last edited:
I just managed to fix the layout of this post. I'm not sure what happened! Maybe someone has a comment or suggestion now it's readable!

Thanks.
 
I just managed to fix the layout of this post. I'm not sure what happened! Maybe someone has a comment or suggestion now it's readable!

Thanks.

I have the same problem, but I haven't solved it yet. Did you ever manage to do so?
 
I have the same problem, but I haven't solved it yet. Did you ever manage to do so?

Sorry, I didn't look into it any further as I restart once in a blue moon when I do a kernel upgrade...

On second thoughts, maybe some code in /etc/rc.local that restarts containers at the end of the boot process?

Code:
VMIDS="100 101 102 104" # These containers use simfs NFS mounts and will need to be restarted

sleep 30 # make sure everything else has come up

# We're using /bin/sh so no fancy arrays or any other fun...
OLDIFS=$IFS
IFS=" "
for i in $VMIDS
    do vzctl restart $i
done
IFS=$OLDIFS

exit 0


Or something like that...

EDIT - Just tested and this works. I will implement this now as a workaround.

Cheers