[Lxc-users] LVM in LXC

Serge Hallyn serge.hallyn at canonical.com
Fri May 13 22:27:41 UTC 2011


Quoting Daniel Lezcano (dlezcano at fr.ibm.com):
> On 05/13/2011 12:13 AM, Benjamin Kiessling wrote:
> >Hi,
> >
> >under Debian (and in general I think) LVM requires udev to work
> >at all which makes it unusable in a container environment. Has
> >anybody tried to get it working in a container?
> 
> You can use udev inside a container. It is not optimal because that
> trigger events everywhere but it is possible.

What is your host?  Which OS/release and which kernel version?

> >My setup consists of a logical volume that's mapped in the container
> >which the container user should be able to subdivide into partitions
> >(i.e. in the end I'd have a chain like pg-vg-lv-pg-vg-lv or LVM on
> >an logical volume if that's more clear). Is there another way to
> >achieve this kind of setup? I thought about letting users just partition
> >the raw logical volume like any other hard disk but this doesn't seem
> >to be supported by the kernel.
> 
> Maybe Serge can help you on that.

It works fine for me.  I've got a natty host with natty guest (itself
backed on an lvm partition :).  I did  apt-get install lvm2, powered
down, edit /var/lib/lvmtest/config and deleted all lxc.cgroup.devices
lines, started the container back up, and all my lvm partitions
appeared under /dev/lxc/.

-serge




More information about the lxc-users mailing list