Okay, I think it's all figured out. I made the change you suggested to my test container and it mounted my LV to /mnt successfully in the container. I then took another look at my other container and it looks like I had a bad lxc.mount.entry entry (knew it had to be something simple). I had:

root@reaver:~# cat /var/lib/lxc/ldap_baneling/config | grep lxc.mount.entry
lxc.mount.entry = proc /var/lib/lxc/dns_defiler/rootfs/proc proc nodev,noexec,nosuid 0 0 lxc.mount.entry = devpts /var/lib/lxc/dns_defiler/rootfs/dev/pts devptsdefaults00 lxc.mount.entry = sysfs /var/lib/lxc/dns_defiler/rootfs/syssysfsdefaults0 0 lxc.mount.entry = /mnt/lxc/ldap/tmp /var/lib/lxc/ldap_baneling/rootfs/tmpnonedefaults 00

I'm not sure where I pulled "none" from for the fstype, but when you mentioned that you didn't specify that in your config line either it made me check mine (mine is xfs not ext4 but the point is the same). I also changed thefile system line to "/dev/vg_lxc1/lv_ldap_tmp1" and changed the mount point to just "tmp". Now I have:

lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0 lxc.mount.entry = devpts dev/pts devpts defaults 0 0 lxc.mount.entry = sysfs sys sysfs defaults 0 0 lxc.mount.entry = /dev/vg_lxc1/lv_ldap_var1 var xfs defaults 0 0 lxc.mount.entry = /dev/vg_lxc1/lv_ldap_tmp1 tmp xfs defaults 0 0

Everything seems to be working correctly now. Thanks for all your help,
Josh

On 02/17/2014 10:30 PM, Serge Hallyn wrote:
Quoting Serge Hallyn ([email protected]):
Quoting Joshua Schaeffer ([email protected]):
Yes it failed to start:

1. lxc-create -n testme1 -t debian
2. root@reaver:~# cat /var/lib/lxc/testme1/config | grep lxc.mount.entry
     lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
     lxc.mount.entry = sysfs sys sysfs defaults  0 0
     lxc.mount.entry = /dev/vg_lxc1/lv_ldap_tmp1 lv_ldap
defaults,create=dir 0 0
Wait a sec.  I mistyped.  There's no fstype in there :)

That should be

     lxc.mount.entry = /dev/vg_lxc1/lv_ldap_tmp1 lv_ldap ext4 
defaults,create=dir 0 0

or whatever fstype it is in place of ext4.  Sorry.
Actually I see that will fail too, because 'create=dir' has a
slight problem.  We need to remove create=dir from the mount
options which we pass along to the mount syscall.

so for the sake of testing just do

     lxc.mount.entry = /dev/vg_lxc1/lv_ldap_tmp1 mnt ext4 defaults 0 0

-serge

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to