[Users] Binding HVN directory to container
Aleksey Cheusov
cheusov at tut.by
Tue Nov 27 04:51:22 EST 2012
Hi. I'm trying to bind a HVM directory to container
with a help of VE mount and umount scripts.
These script are below.
I use this documentation http://wiki.openvz.org/Bind_mounts
/etc/vz/conf/103.mount:
#!/bin/sh
. /etc/vz/vz.conf
. ${VE_CONFFILE}
while read src dst; do
mount -n -t simfs "$src" "$VE_ROOT$dst" -o "$src"
done < ${VE_CONFFILE%.conf}.fslist
/etc/vz/conf/103.umount:
#!/bin/sh
. /etc/vz/vz.conf
. ${VE_CONFFILE}
while read src dst; do
umount "$VE_ROOT$dst"
done < ${VE_CONFFILE%.conf}.fslist
/etc/vz/conf/103.fslist:
/shared/syntagma3 /var/local/syntagma3
"vzctl start 103" starts my container and runs the mount script
and appropriate directory (/vz/private/103/var/local/syntagma3/)
is mounted. So, I see its new content on HVM.
However, inside container /var/local/syntagma3 is empty.
Can anybody explain what's happening?
More information about the Users
mailing list