OpenVZ Forum - RDF feed
type: channel
items: mount problem

mount problem
type: item
description: We are trying to make a NFS mount from the HN appear within a container. We got it working by adding mount and umount scripts. However we are having some issues. 1.mount #!/bin/sh source /etc/vz/vz.conf source ${VE_CONFFILE} mount -n --bind /nfs/apps/wiki ${VE_ROOT}/nfs/webroot 1.umount #!/bin/sh echo "UMOUNT IS RUNNING" <-- for testing see below source /etc/vz/vz.conf source ${VE_CONFFILE} umount ${VE_ROOT}/nfs/webroot The problem I am seeing is that the umount script is sometimes getting called on startup and I believe it's causing the mount to not appear in the container. Whats weird is if I comment out the umount line I never see my echo statement ran on startup. However with umount uncommented I always see the echo statement. This seems like strange behavior that I can't explain. I was hoping someone else had some ideas. Normal stop start with mount/umount scripts: # vzctl stop 1 Stopping container ... Container was stopped RTNETLINK answers: Network is unreachable UMOUNT IS RUNNING umount: /vz/root/1/nfs/webroot: not mounted Error executing umount script /etc/vz/conf/1.umount _[/etc/vz/conf]_(root@a.apps)_ # _[/etc/vz/conf]_(root@a.apps)_ # vzctl start 1 Warning: configuration file for distribution SL-6.0-x86_64-minimal not found, using defaults from /etc/vz/dists/default Starting container ... UMOUNT IS RUNNING umount: /vz/root/1/nfs/webroot: not mounted Error executing umount script /etc/vz/conf/1.umount Adding IP address(es): 64.142.109.98 69.12.208.32 RTNETLINK answers: Network is unreachable RTNETLINK answers: Network is unreachable Setting CPU units: 1000 Setting devices Set hostname: wiki.a.apps.sonic.net File resolv.conf was modified Container start in progress... _[/etc/vz/conf]_(root@a.apps)_ NFS mount will only be there if I do a sevice vz restart. After that a stop/start will not mount my NFS mount in the container From the "UMOUNT IS RUNNING" you can see that it is running the 1.umount script on start and stop However, If I comment out the umount …
creator: williamt
date: 2011-05-12T17:54:43-00:00