OpenVZ Forum


Home » General » Support » Socket sharing, bind mounting, mount scripts: directory gets wiped?
Socket sharing, bind mounting, mount scripts: directory gets wiped? [message #27708] Sat, 23 February 2008 16:43 Go to previous message
miracle2k is currently offline  miracle2k
Messages: 1
Registered: February 2008
Junior Member
I'm trying to share a mysql socket from one VE with multiple others. All VEs and HN running Debian etch.

On the host:

> mkdir /var/lib/vz/shared
> mkdir /var/lib/vz/shared/var_run_mysqld
> cat > /etc/vz/conf/900.mount
#!/bin/sh
mount -n --bind /var/lib/vz/shared/var_run_mysqld /var/lib/vz/root/$VEID/var/run/mysqld
# set owner/group to mysql
chown 101:103 /var/lib/vz/root/$VEID/var/run/mysqld

> ln -s /etc/vz/conf/900.mount /etc/vz/conf/101.mount
> ln -s /etc/vz/conf/900.mount /etc/vz/conf/102.mount
> ln -s /etc/vz/conf/900.mount /etc/vz/conf/103.mount
...


This seems to work just fine mostly: The scripts run, the directories are mounted; With one minor detail: Everytime I boot a VE (with a mount script enabled) the contents of the directory (/var/lib/vz/shared/var_run_mysqld) are wiped out. It is still mounted in all the running VEs - if I create a file there, it'll appear everywhere. Except that all files disappear on any VE boot.

Meaning of course that if the Mysql VE is already running, it's socket will be gone and everything breaks down.

Any ideas?

[Updated on: Sat, 23 February 2008 16:45]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: *SOLVED* Numflock UBC error - Pls help!
Next Topic: Networking Problem...
Goto Forum:
  


Current Time: Fri Aug 01 14:50:19 GMT 2025

Total time taken to generate the page: 0.65805 seconds