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

2014-11-25 Thread Claudio Kuenzler
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 T

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

2014-11-25 Thread Serge Hallyn
Quoting Claudio Kuenzler (c...@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: > > # c

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

2014-11-25 Thread Claudio Kuenzler
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" wrote: > Quoting Clau

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

2014-11-26 Thread Claudio Kuenzler
I applied the patch but it does not work for the read only mount. lxc-start 1416993491.172 INFO lxc_conf - conf.c:check_autodev:3821 - Autodev not required. lxc-start 1416993491.172 ERRORlxc_conf - conf.c:mount_entry:1916 - Device or resource busy - failed to mount '/dev/vglxc/

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

2014-11-26 Thread Claudio Kuenzler
I made a couple of mistakes in my modified patch - so please ignore that.But the basic idea of it was to handle special mount flags (in this case RDONLY) before it hits if (mount(fsname, target, fstype, mountflags & ~MS_REMOUNT, data)) Will be glad to test additional patches for you. On Wed, Nov

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

2014-11-26 Thread Fajar A. Nugraha
I'm pretty sure it's NOT lxc's fault. For starters, have you tried testing the same (i.e. mount rw, and then mount again ro) in normal, non-lxc setup? That does not work, and does indeed fail with a message like this mount: /dev/zd208 already mounted or /mnt/tmp2 busy mount: according to mtab, /d

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

2014-11-27 Thread Claudio Kuenzler
Fajar, thanks for your response and you're right. I did some testing on the physical host before I wrote to the mailing list but mounted twice the same LV as rw. Now I just did as you said and tried to do a rw mount followed by a ro mount. Indeed the same behavior: # mount /dev/mapper/vglxc-apps