[lxc-users] LXC not starting with already mounted LV as read-only mount

Claudio Kuenzler ck at claudiokuenzler.com
Wed Nov 26 06:31:12 UTC 2014


I've read that mailing list post yesterday, too and was actually hoping
this could solve the mount issue. When I looked at it, it seems that this
patch hasnt been merged into the github repo yet, correct?

Will try it and let you know.
On Nov 26, 2014 6:35 AM, "Serge Hallyn" <serge.hallyn at ubuntu.com> wrote:

> Quoting Claudio Kuenzler (ck at claudiokuenzler.com):
> > Hello all,
> >
> > OS: Ubuntu 14.04.1 LTS
> > LXC Version: 1.0.6-0ubuntu0.1
> >
> > Experienced a weird issue when I tried to launch a container which mounts
> > an additional logical volume (ext4 formatted) through the container's
> fstab
> > file:
> >
> > # cat /var/lib/lxc/mycontainer/fstab
> > /dev/vglxc/apps mnt/apps ext4 ro 0 0
> >
> > This LV is already mounted on the physical host:
> >
> > # mount /dev/vglxc/apps /mnt
> >
> > Now when I try to launch the container, I get the following error:
> >
> > # lxc-start -n mycontainer -l trace -o mycontainer.out
> > lxc-start: Device or resource busy - failed to mount '/dev/vglxc/apps' on
> > '/usr/lib/x86_64-linux-gnu/lxc/mnt/apps'
> > lxc-start: failed to setup the mounts for 'mycontainer'
> > lxc-start: failed to setup the container
> > lxc-start: invalid sequence number 1. expected 2
> > lxc-start: failed to spawn 'mycontainer'
> > lxc-start: The container failed to start.
> > lxc-start: Additional information can be obtained by setting the
> --logfile
> > and --logpriority options.
> >
> > In the output file the following information is shown:
> >
> >       lxc-start 1416921918.699 INFO     lxc_conf - Autodev not required.
> >       lxc-start 1416921918.699 ERROR    lxc_conf - Device or resource
> busy
> > - failed to mount '/dev/vglxc/apps' on
> > '/usr/lib/x86_64-linux-gnu/lxc/mnt/apps'
> >       lxc-start 1416921918.699 ERROR    lxc_conf - failed to setup the
> > mounts for 'mycontainer'
> >
> > When I change the mount option in the container's fstab file from "ro" to
> > "defaults"  (or basically "rw"), the container starts up:
> >
> > # cat /var/lib/lxc/mycontainer/fstab
> > /dev/vglxc/apps mnt/apps ext4 defaults 0 0
> >
> > # lxc-start -n mycontainer -l trace -o mycontainer.out
> >
> >       lxc-start 1416921799.912 INFO     lxc_conf - Autodev not required.
> >       lxc-start 1416921799.912 DEBUG    lxc_conf - mounted
> > '/dev/vglxc/apps' on '/usr/lib/x86_64-linux-gnu/lxc/mnt/apps', type
> 'ext4'
> >
> > If the LV /dev/vglxc/apps is nowhere mounted yet, the container starts
> up -
> > with the read only mount option, too.
> >
> > Is this a (known) bug I ran into?
>
> I think it is.  Can you please try with this patch:
>
>
> https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-November/010876.html
>
> applied?
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20141126/147bf958/attachment.html>


More information about the lxc-users mailing list