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 next 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

Re: Socket sharing, bind mounting, mount scripts: directory gets wiped? [message #27748 is a reply to message #27708] Tue, 26 February 2008 08:04 Go to previous message
xemul is currently offline  xemul
Messages: 248
Registered: November 2005
Senior Member
Some VE's startup script wipes it out?

http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: *SOLVED* Numflock UBC error - Pls help!
Next Topic: Networking Problem...
Goto Forum:
  


Current Time: Sun Nov 27 17:55:07 GMT 2022

Total time taken to generate the page: 0.00904 seconds