Why umount script runs on VE start? [message #37795] |
Thu, 22 October 2009 15:15  |
cray
Messages: 11 Registered: October 2009
|
Junior Member |
|
|
I have followed the instruction from wiki (http://wiki.openvz.org/Bind_mounts) and set up the mount and umount scripts. When I start the system I see the following error message:
vzctl start 101
Starting VE ...
umount: /home/vz/root/101/mnt: not mounted
Error executing umount script /etc/vz/conf/101.umount
Here are my scripts:
cat 101.mount
#!/bin/bash
mount --bind /test /home/vz/root/$VEID/mnt
cat 101.umount
#!/bin/bash
umount /home/vz/root/$VEID/mnt
Thanks for helping.
|
|
|
|
|
|
|
|
|
|
Re: Why umount script runs on VE start? [message #37803 is a reply to message #37802] |
Thu, 22 October 2009 16:56  |
cray
Messages: 11 Registered: October 2009
|
Junior Member |
|
|
kir wrote on Thu, 22 October 2009 12:47 | cray wrote on Thu, 22 October 2009 20:42 | What about the -n option, I doesn't use it in both scripts.
|
From another topic by you I see that you have used it, see this message.
|
I have removed -n key, as I didn't see the mounts.
kir wrote on Thu, 22 October 2009 12:47 |
Quote: | exit 0 didn't help me.
|
host:~# vzctl start 101
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.0.101
Setting CPU units: 1000
Configure meminfo: 65536
File resolv.conf was modified
VE start in progress...
host:~# vzctl stop 101
Stopping VE ...
VE was stopped
umount: /test: not mounted
umount: /test: not mounted
VE is unmounted
host:~#
|
here is the cat of mount/umount scripts:
cat 101.mount
#!/bin/bash
mount --bind /test /home/vz/root/$VEID/mnt
cat 101.umount
#!/bin/bash
umount /home/vz/root/$VEID/mnt
exit 0
kir wrote on Thu, 22 October 2009 12:47 | What do you mean «didn't help»? Can you describe one more time what problem are you having?
Quote: | I assume that mount/umount scripts should work this way:
start VE
mount /path/from /path/to
-------------------------
umount /path/to
stop VE
|
They do not work this way -- mount is happening *before* CT start, while umount is happening *after* CT stop. Plus, as I described above, umount is run on start if CT is mounted.
|
Well, if umount script starts when the VE is stoped, so it can not unmount the path, as root directory of the VE is unmounted. Am I right?
P.S. What is CT? Is it VE (virtual environment)?
[Updated on: Thu, 22 October 2009 16:59] Report message to a moderator
|
|
|