OpenVZ Forum


Home » General » Support » How to share a folder between containers
Re: How to share a folder between containers [message #42168 is a reply to message #42129] Mon, 14 March 2011 13:00 Go to previous message
hybrid512 is currently offline  hybrid512
Messages: 4
Registered: December 2010
Location: France
Junior Member
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,

 
Read Message
Read Message
Previous Topic: Kernel Panic on vzctl stop
Next Topic: Bind IPs?
Goto Forum:
  


Current Time: Sat Sep 06 18:56:55 GMT 2025

Total time taken to generate the page: 0.09220 seconds