Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have debian box with big database.

I want to do a lot of risky operation with this database.

Its about updating the sofware which works with this db.

I can stop database for 5 min, but not for more time.

Db files is innodb files on lvm logical volume.

When I doing backup, I do it with lvm snapshots.

I am pretty sure, that I need more then one try for updating, something always going bad.

My idea is: What if I do lvm snapshot (with big size), mount it, start another mysql instance and do all risky work on this instance.

If problem occurs, I just remove snapshot and start again.

If all be correct, and all test will be passed (it probably take 1-2 days) - I do backup from second instance, and move it to first instance.

I need something for start second instance without touch my first instance. What I can use?

  • Do debootstrap and chroot?
  • Install kvm ?

I need your advices.

share|improve this question
up vote 1 down vote accepted

FreeBSD-like jail for Linux is named LXC ( I consider It to fit well here.

You will get dedicated system enviroment with transparently accessible filesystem and negligable performance penalty.

share|improve this answer

The simplest approach to start second mysql instance would be to use separate my.cnf with different data dir, port numbers etc

Than you just mount your snapshot under new data dir and start up mysql with a new my.cnf config file ie:

/usr/sbin/mysqld --defaults-file=/etc/my-blabla.cnf --basedir=/usr --datadir=/data/blabla --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --open-files-limit=1024 --pid-file=/data/blabla/ --socket=/data/blabla/mysql.blabla.sock --port=3307

Something along these lines...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.