OpenVZ Forum


Home » General » Support » *SOLVED* OpenVZ mount script works incorrectly
*SOLVED* OpenVZ mount script works incorrectly [message #37789] Thu, 22 October 2009 13:58 Go to next message
cray is currently offline  cray
Messages: 11
Registered: October 2009
Junior Member
MySQL database works on host. I want to share /var/run/mysqld/ directory to guest system.

Here is my 101.mount script
#!/bin/bash
mount --bind -n /var/run/mysqld /home/vz/root/${VEID}/var/run/mysqld


When I run
vzctl start 101

it wipes whole host directory /var/run/mysqld, and mysql went down. So I have no '/var/run/mysqld' and no '/home/vz/root/${VEID}/var/run/mysqld'.

When I'm trying to mount this directory manually after the guest system was started - everything works fine.

What is wrong?

I'm running Debian Lenny Linux host 2.6.26-2-openvz-686 #1 SMP Wed Aug 19 07:30:34 UTC 2009 i686 GNU/Linux

vzctl --version
vzctl version 3.0.22

[Updated on: Thu, 22 October 2009 15:04] by Moderator

Report message to a moderator

Re: OpenVZ mount script works incorrectly [message #37790 is a reply to message #37789] Thu, 22 October 2009 14:05 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Why do you think it's vzctl that wipes /var/run/mysql? It can be anything else, such as in-container scripts.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ mount script works incorrectly [message #37792 is a reply to message #37790] Thu, 22 October 2009 14:46 Go to previous messageGo to next message
cray is currently offline  cray
Messages: 11
Registered: October 2009
Junior Member
I used the Debian template from openvz.org
http://download.openvz.org/template/precreated/debian-5.0-x8 6.tar.gz
I have grep'ed it, and didn't find anything strange on first glance. I will check more deeply.
Re: OpenVZ mount script works incorrectly [message #37793 is a reply to message #37789] Thu, 22 October 2009 14:48 Go to previous messageGo to next message
cray is currently offline  cray
Messages: 11
Registered: October 2009
Junior Member
Which scripts should I check?
/etc dir doesn't have anything strange with the mysqld word.
Re: OpenVZ mount script works incorrectly [message #37794 is a reply to message #37789] Thu, 22 October 2009 14:54 Go to previous message
cray is currently offline  cray
Messages: 11
Registered: October 2009
Junior Member
I have just found the following scripts:

/etc/init.d/mountall-bootclean.sh
/lib/init/bootclean.sh

First one run /lib/init/bootclean.sh and it cleans the /var/run dir.

Thanks for help =)
Previous Topic: Auditd and openz
Next Topic: Why umount script runs on VE start?
Goto Forum:
  


Current Time: Mon May 13 05:11:20 GMT 2024

Total time taken to generate the page: 0.01408 seconds