I want to share a directory from an OpenVZ container to another container, how I could do that?
- do a symlink from /vz/private/109/common-stuff to /vz/private/108/common-stuff ?
- bind mount /vz/private/109/common-stuff to /vz/root/108/common-stuff ?
- Share the directory with samba from the container, mount on the host, then bind mount to /vz/root/108/common-stuff ?
Best Answer
OpenVZ is great at letting you share directories without the need for Samba or NFS overhead.
To see how it works do a bind mount to root (not private) when the container is running:
To make the share persistent over container reboots:
chmod +x /etc/vz/conf/108.mount
Script A
Reference: http://wiki.openvz.org/Bind_mounts