OpenVZ Forum


Home » General » Support » mount problem
mount problem [message #42701] Thu, 12 May 2011 17:54
williamt is currently offline  williamt
Messages: 5
Registered: April 2011
Junior Member
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 stuff it only runs that script on stop:
# vzctl stop 1
Stopping container ...
Container was stopped
RTNETLINK answers: Network is unreachable
UMOUNT IS RUNNING
Container is unmounted
_[/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 ...
Container is mounted
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...


My NFS Mount is there.

So if I comment out the 1.umount script everything works.
Im pretty sure I want to be able to umount things on shutdown.
Any ideas whats going on?


# rpm -qa |grep vzctl
vzctl-3.0.26.3-1.x86_64
vzctl-lib-3.0.26.3-1.x86_64

# rpm -qa |grep vzkernel
vzkernel-2.6.32-042test012.1.x86_64

# cat /etc/redhat-release
Scientific Linux release 6.0 (Carbon)

Thanks,
William
 
Read Message
Previous Topic: How does OpenVZ manage memory?
Next Topic: Centos5 CT has no networking
Goto Forum:
  


Current Time: Mon Nov 04 11:00:48 GMT 2024

Total time taken to generate the page: 0.03421 seconds