OpenVZ Forum - RDF feed
type: channel
items: How to share a folder between containers
items: Re: How to share a folder between containers

How to share a folder between containers
type: item
description: I want to share a directory from an OpenVZ container to another container, how I could do that? 1. do a symlink from /vz/private/109/common-stuff to /vz/private/108/common-stuff ? 2. bind mount /vz/private/109/common-stuff to /vz/root/108/common-stuff ? 3. Share the directory with samba from the container, mount on the host, then bind mount to /vz/root/108/common-stuff ?
creator: Tipika
date: 2011-03-02T20:38:48-00:00

Re: How to share a folder between containers
type: item
description: Easiest and best way to do this is to do like this : - create some folder on your host filesystem - bind this folder in your containers To do that, the best way is to create a <CTID>.mount in your /etc/vz/conf directory which will look like this : ============================================================ === #!/bin/bash source /etc/vz/vz.conf source ${VE_CONFFILE} mount -n --bind /common-stuff ${VE_ROOT}/common-stuff ============================================================ === Off course, /common-stuff must exist in your container but with this, /common-stuff will be automatically binded when you start your container. Regards,
creator: hybrid512
date: 2011-03-14T13:00:33-00:00