1

If you need to run your databases in lxc, what happen to your data files? Do you have access to the data file on the host os? I guess the processes show up in the gust os process but who about the the files given that lxc has its own file system?

Any other consideration to run your db inside lxc?

1 Answer 1

2

LXC is similar to OpenVZ (OS level virtualization), in short LXC uses host OS file system directly. So the containers' file system (database data files) is accessible from the host anyway (Btrfs is recommended to take advantage of snapshot features).

If you consider using LXC, definitely take a look at Docker which is a nice wrapper for LXC (like Vagrant for VirtualBox) which makes it a lot easier and user-friendly. in addition, there are plenty of pre-built container templates ready for use.

3
  • Thanks. So if the container is stopped, the data disappear on the host os?
    – iCode
    Sep 21, 2013 at 12:39
  • No, data will be on the host file system unless you destroy or remove the container.
    – Terry Wang
    Sep 22, 2013 at 2:31
  • I'm wondering if could possibly bind mount DB data partition directly into underlying LXC filesystem using something like: lxc.mount.entry which will stick the mount into LXCs fstab and mount it on start ? Oct 28, 2013 at 0:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .