I would like to mount a host mount point on a guest os eery tiime it is restarted have found some scripts by googling around, and on these forums here http://wiki.openvz.org/Bind_mounts and http://newpush.com/2010/02/openvz-shared-directory-mounting-from-host-to-guest-systems/ here.
I have manual mounting working like this but of course i need this to stick each time the virtual machine is restarted.
mount --bind /usr/local/backups/backuppc /var/lib/vz/root/202/var/lib/backuppc
Here is a preposed 202.mount script edited to my needs think??? (im confused about the variables or if i need them) for one machine will it work and where do i put it?
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
echo "Starting ${VEID}.mount..."
mount --bind /usr/local/backups/backuppc ${VE_ROOT}/var/lib/backuppc
echo "...${VEID}.mount complete"
Also this author suggests a 202.umount script
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
echo "Starting ${VEID}.umount..."
umount ${VE_ROOT}/var/lib/backuppc
echo "...${VEID}.umount done"
PS i have started a post here http://computerking.ca/node/611 about making this work with a ct and backuppc here if anyone is interested hoever it is not finished yet. I will probably make it a seperate blog in the end too
I have manual mounting working like this but of course i need this to stick each time the virtual machine is restarted.
mount --bind /usr/local/backups/backuppc /var/lib/vz/root/202/var/lib/backuppc
Here is a preposed 202.mount script edited to my needs think??? (im confused about the variables or if i need them) for one machine will it work and where do i put it?
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
echo "Starting ${VEID}.mount..."
mount --bind /usr/local/backups/backuppc ${VE_ROOT}/var/lib/backuppc
echo "...${VEID}.mount complete"
Also this author suggests a 202.umount script
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
echo "Starting ${VEID}.umount..."
umount ${VE_ROOT}/var/lib/backuppc
echo "...${VEID}.umount done"
PS i have started a post here http://computerking.ca/node/611 about making this work with a ct and backuppc here if anyone is interested hoever it is not finished yet. I will probably make it a seperate blog in the end too