All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano-GANU6spQydw@public.gmane.org>
To: Dietmar Maurer <dietmar-YTcQvvOqK21BDgjK7y7TUQ@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: storage considerations
Date: Tue, 03 Feb 2009 17:38:31 +0100	[thread overview]
Message-ID: <49887307.1080105@free.fr> (raw)
In-Reply-To: <7B7881568CF40E4388B615CD06F87B980989E9-cHQ43lMKbBKenyD9vqZGNUEOCMrvLtNR@public.gmane.org>

Dietmar Maurer wrote:
> Hi Daniel,
>
> I think we should have several options for the root storage:
>
> 1.) simply use the host filesystem (like Openvz)
>
> 	- special quota support is needed (simfs?)
>
> 	- quota support depends on ext3 fs, so this only works for
> 	  local attached storage (does not work on NFS)
>
> 	- LVM snapshots are slow, because the snapshot includes all
> container
> 	  on that filesystem.
>
> 	- it is easy to expand/shrink storage
>
> 	- best storage consolidation (storage overcommit possible)
>   


> 2.) loop mounting an image (dm-loop)
>
> 	- quota works
>
> 	- works on any filesystem (even NFS)
>
> 	- don't know how to make snapshots?
>   
Perhaps we can use the future union mount or unionfs in order to make 
incremental snapshot ?
> 	- difficult to resize (but manageable)
>
> 	- slow
>
> 3.) use a block device
>
> 	- works great with LVM2 volumes 
>
> 	- quota works
>
> 	- best performance
>
> 	- works with shared block devices (incredible fast migrations)
>
> 	- snapshots works (at least when using an LVM2 volume)
>
> 	- it is difficult to resize block devices (but manageable)
>
> The question is: when do we mount the root block device?
>
> OpenVZ has one additional state, called 'mounted'. For example you can
> do:
>
> # vzctl mount VMID
> # vzctl umount VMID
>
> Or we simply mount the root when we create the container?
>
> What do you think?
>   
It is very interesting. Thanks for giving an overview of the available 
storage solutions.
You have a lot of idea and I need some time to compile them :)

At present lxc provides a rootfs which is symlink to the directory to 
chroot. It could be nice is to replace this by a directory and bind 
mount something on top of it. By "something" I mean one of the solutions 
you are proposing or something else.
I would prefer to find a generic solution, that is,  a configuration 
format which can be interpreted in a generic way by lxc.
The fstab file format is a good candidate :)
We can:
 1 - replace the fstab file by a new keyword lxc.mount = "a fstab line"
 2 - each time this keyword is found add a mntentry in a mount list of 
the configuration
 3 - automatically add the bind mount of the rootfs in this list when 
the lxc.rootfs is found

 From the point of view of the configuration / setup:

the lxc-create creates the fstab file (do not mount anything otherwise 
that will be lost at reboot).
the lxc-start/lxc-execute mount everything (it is up to the user to 
define the right order in the configuration file).

For example:

lxc.mount = myhost:/linux /linux nfs defaults 0 0
lxc.rootfs = /root/debian4

That will create the fstab file in the container configuration tree:

myhost:/mydistro /root/mydistro nfs defaults 0 0
/root/mydistro  /var/lxc/debian4/rootfs bind 0 0

This fstab can be used with a script for example to unshare the mount 
namespace, bind mount the fstab on top of /etc/fstab and call mount -a :)

In any case, the configuration file stays generic and a new fs support 
can be added without changing the lxc version.

Shall this fit your needs ?

       reply	other threads:[~2009-02-03 16:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7B7881568CF40E4388B615CD06F87B980989E9@clara.maurer-it.com>
     [not found] ` <7B7881568CF40E4388B615CD06F87B980989E9-cHQ43lMKbBKenyD9vqZGNUEOCMrvLtNR@public.gmane.org>
2009-02-03 16:38   ` Daniel Lezcano [this message]
     [not found]     ` <49887307.1080105-GANU6spQydw@public.gmane.org>
2009-02-03 17:14       ` storage considerations Dietmar Maurer
2009-02-04 16:05       ` Serge E. Hallyn
     [not found]         ` <20090204160518.GC2039-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-02-04 16:52           ` Daniel Lezcano
     [not found]             ` <4989C7C0.6060906-GANU6spQydw@public.gmane.org>
2009-02-04 17:09               ` Serge E. Hallyn
2009-02-04 23:04               ` Oren Laadan
     [not found]                 ` <498A1EE6.3000204-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-02-05  7:01                   ` Dietmar Maurer
     [not found]                     ` <7B7881568CF40E4388B615CD06F87B98098A12-cHQ43lMKbBKenyD9vqZGNUEOCMrvLtNR@public.gmane.org>
2009-02-05 10:56                       ` [Devel] " Dietmar Maurer
2009-02-05 15:36                       ` Serge E. Hallyn
     [not found]                         ` <20090205153638.GD27410-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-02-05 15:45                           ` Dietmar Maurer
     [not found]                             ` <7B7881568CF40E4388B615CD06F87B98098A22-cHQ43lMKbBKenyD9vqZGNUEOCMrvLtNR@public.gmane.org>
2009-02-05 16:04                               ` Serge E. Hallyn
     [not found]                                 ` <20090205160402.GE27410-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-02-05 16:18                                   ` Dietmar Maurer
2009-02-05  7:08       ` Dietmar Maurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49887307.1080105@free.fr \
    --to=daniel.lezcano-ganu6spqydw@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=dietmar-YTcQvvOqK21BDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.