<div dir="ltr">Hi Serge,<div><br></div><div>any update on this? Are you able to mount 2nd LVM volumes in a container?</div><div><br></div><div>Regards,</div><div>Flo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Feb 4, 2014 at 8:47 AM, Flo <span dir="ltr"><<a href="mailto:florian.engelmann@gmail.com" target="_blank">florian.engelmann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra">Hi Serge<br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 10:09 PM, Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Quoting Flo (<a href="mailto:florian.engelmann@gmail.com" target="_blank">florian.engelmann@gmail.com</a>):<br>
> Hi,<br>
><br>
> is it possible to mount a 2nd logical volume into a LVM based container?<br>
><br>
> I tried:<br>
><br>
> /dev/lxc2/glusterfs-test srv/glusterfs ext4 defaults 0 0<br>
<br>
lxc2 is vgname and glusterfs-test is lvname?<br></blockquote><div><br></div><div>Sorry there was a typo - "lvs" looks like this:</div><div><div><br></div><div> LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert</div>
<div> thin_pool lxc1 twi-a-tz- 800.00g 0.00 </div><div> glusterfs lxc2 Vwi-aotz- 300.00g thin_pool 1.61 </div><div> glusterfs-test lxc2 Vwi-a-tz- 10.00g thin_pool 1.28 </div>
<div> storage01-jobs2-prod lxc2 Vwi-a-tz- 30.00g thin_pool 3.99 </div><div> thin_pool lxc2 twi-a-tz- 800.00g 0.77 </div><div> home system -wi-ao--- 4.77g </div>
<div> opt system -wi-ao--- 1.91g </div><div> root system -wi-ao--- 9.54g </div><div> srv system -wi-ao--- 1.91g </div>
<div> swap system -wi-ao--- 61.04g </div><div> temp system -wi-ao--- 3.81g </div><div> var system -wi-ao--- 7.63g </div>
<div> var_log system -wi-ao--- 3.81g </div></div><div><br></div><div>here is my fstab:</div><div><div>#> cat /var/lib/lxc/storage01-jobs2-prod/fstab</div><div>/srv/glusterfs srv/glusterfs none bind 0 0<br>
</div><div>/dev/mapper/lxc1-glusterfs--test srv/glusterfs-test ext4 0 2</div></div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
> and<br>
><br>
> /dev/lxc2/glusterfs-test srv/glusterfs none defaults 0 0<br>
><br>
> or<br>
><br>
> /dev/mapper/lxc2-glusterfs--test .....<br>
><br>
><br>
> into my /var/lib/lxc/<containername>/fstab<br>
><br>
> but none did work. A bind mount does work:<br>
><br>
> /srv/glusterfs srv/glusterfs none bind 0 0<br>
><br>
> but I don't want the FS mounted on the global host.<br>
><br>
> Do I have to allow access to the device?<br>
><br>
> lxc.cgroup.devices.allow = ????<br>
<br>
Can you do 'lxc-start -n cname -l info -o debug.out' and show<br>
us the debug.out?<br></blockquote><div><br></div><div>#> lxc-start -d -n storage01-jobs2-prod -l debug -o /tmp/2d</div><div>lxc-start: command get_cgroup failed to receive response</div><div>#> cat /tmp/2d</div><div>
lxc-start 1391499461.367 INFO lxc_start_ui - using rcfile /var/lib/lxc/storage01-jobs2-prod/config</div><div> lxc-start 1391499461.369 WARN lxc_log - lxc_log_init called with log already initialized</div>
<div> lxc-start 1391499461.374 INFO lxc_lsm - LSM security driver AppArmor</div><div> lxc-start 1391499461.375 DEBUG lxc_conf - allocated pty '/dev/pts/0' (5/6)</div><div> lxc-start 1391499461.375 DEBUG lxc_conf - allocated pty '/dev/pts/1' (7/8)</div>
<div> lxc-start 1391499461.375 DEBUG lxc_conf - allocated pty '/dev/pts/2' (9/10)</div><div> lxc-start 1391499461.375 DEBUG lxc_conf - allocated pty '/dev/pts/4' (11/12)</div><div> lxc-start 1391499461.375 INFO lxc_conf - tty's configured</div>
<div> lxc-start 1391499461.375 DEBUG lxc_start - sigchild handler set</div><div> lxc-start 1391499461.375 DEBUG lxc_console - opening /var/lib/lxc/storage01-jobs2-prod/console.out for console peer</div><div>
lxc-start 1391499461.376 DEBUG lxc_console - using '/var/lib/lxc/storage01-jobs2-prod/console.out' as console</div><div> lxc-start 1391499461.376 INFO lxc_start - 'storage01-jobs2-prod' is initialized</div>
<div> lxc-start 1391499461.378 INFO lxc_monitor - using monitor sock name lxc/ad055575fe28ddd5//var/lib/lxc</div><div> lxc-start 1391499461.388 DEBUG lxc_start - Not dropping cap_sys_boot or watching utmp</div>
<div><br></div><div> lxc-start 1391499461.393 DEBUG lxc_conf - instanciated veth 'vethCMC65T/vethE9KCCQ', index is '167'</div><div> lxc-start 1391499461.398 DEBUG lxc_conf - instanciated veth 'veth90WWTD/vethNPY8DI', index is '169'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.deny' set to 'a'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c *:* m'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'b *:* m'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 1:3 rwm'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 1:5 rwm'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 5:0 rwm'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 5:1 rwm'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 1:8 rwm'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 1:9 rwm'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 5:2 rwm'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 136:* rwm'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 254:0 rm'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 10:229 rwm'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 10:200 rwm'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 1:7 rwm'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 10:228 rwm'</div>
<div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'devices.allow' set to 'c 10:232 rwm'</div><div> lxc-start 1391499461.402 DEBUG lxc_cgroup - cgroup 'memory.limit_in_bytes' set to '16G'</div>
<div> lxc-start 1391499461.403 DEBUG lxc_cgroup - cgroup 'memory.soft_limit_in_bytes' set to '15G'</div><div> lxc-start 1391499461.403 INFO lxc_cgroup - cgroup has been setup</div><div> lxc-start 1391499461.420 DEBUG lxc_conf - move 'front' to '14739'</div>
<div> lxc-start 1391499461.445 DEBUG lxc_conf - move 'back' to '14739'</div><div> lxc-start 1391499461.445 INFO lxc_conf - 'storage01-jobs2-prod' hostname has been setup</div><div>
lxc-start 1391499461.468 DEBUG lxc_conf - mac address '00:16:3f:ae:ee:f5' on 'front' has been setup</div><div> lxc-start 1391499461.468 DEBUG lxc_conf - 'front' has been setup</div>
<div> lxc-start 1391499461.500 DEBUG lxc_conf - mac address '00:16:3b:83:b6:a7' on 'back' has been setup</div><div> lxc-start 1391499461.500 DEBUG lxc_conf - 'back' has been setup</div>
<div> lxc-start 1391499461.500 INFO lxc_conf - network has been setup</div><div> lxc-start 1391499461.502 DEBUG bdev - trying to mount '/dev/lxc2/storage01-jobs2-prod'->'/usr/lib/x86_64-linux-gnu/lxc' with fstype 'ext3'</div>
<div> lxc-start 1391499461.503 INFO bdev - mounted '/dev/lxc2/storage01-jobs2-prod' on '/usr/lib/x86_64-linux-gnu/lxc', with fstype 'ext3'</div><div> lxc-start 1391499461.504 DEBUG lxc_conf - mounted '/dev/lxc2/storage01-jobs2-prod' on '/usr/lib/x86_64-linux-gnu/lxc'</div>
<div> lxc-start 1391499461.504 DEBUG lxc_conf - Set exec command to /sbin/init</div><div><br></div><div> lxc-start 1391499461.512 INFO lxc_conf - Autodev not required.</div><div> lxc-start 1391499461.521 DEBUG lxc_conf - remounting /srv/glusterfs on /usr/lib/x86_64-linux-gnu/lxc/srv/glusterfs to respect bind or remount options</div>
<div> lxc-start 1391499461.521 DEBUG lxc_conf - mounted '/srv/glusterfs' on '/usr/lib/x86_64-linux-gnu/lxc/srv/glusterfs', type 'none'</div><div> lxc-start 1391499461.521 ERROR lxc_conf - Invalid argument - failed to mount '/dev/mapper/lxc1-glusterfs--test' on '/usr/lib/x86_64-linux-gnu/lxc/srv/glusterfs-test'</div>
<div> lxc-start 1391499461.521 ERROR lxc_conf - failed to setup the mounts for 'storage01-jobs2-prod'</div><div> lxc-start 1391499461.521 ERROR lxc_start - failed to setup the container</div><div>
lxc-start 1391499461.521 ERROR lxc_sync - invalid sequence number 1. expected 2</div>
<div> lxc-start 1391499461.521 WARN lxc_conf - failed to remove interface 'front'</div><div> lxc-start 1391499461.521 WARN lxc_conf - failed to remove interface 'back'</div><div> lxc-start 1391499461.596 ERROR lxc_start - failed to spawn 'storage01-jobs2-prod'</div>
<div> lxc-start 1391499461.597 ERROR lxc_commands - command get_cgroup failed to receive response</div><div><br></div><div><br></div><div>Regards,</div><div>Florian</div></div></div></div>
</blockquote></div><br></div>