<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I think you would need to allow access
from your LXC to DRBD's major/minor device numbers, and maybe the
low-level devices' ones too (not sure about that last one).<br>
<br>
Out of curiosity, may I ask for some details about what you're
trying to achieve?<br>
In case it helps to kown that, we've been doing it the other way
round (LXCs inside DRBD containers) with little difficulty.<br>
<br>
Lionel Sausin.<br>
<br>
Le 20/01/2014 16:08, Jeremiah Snapp a écrit :<br>
</div>
<blockquote
cite="mid:CAPUrO3KkdOtuZ4-5vVWWsSWxymyjGPfuu2oKTMqdb6sGXFyuLw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><font face="arial, sans-serif">Can DRBD
work in LXC Container?</font><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
I already asked this in LXC-Users but they weren't sure.</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
I saw the following message which gave me the vague impression
DRBD could be done in a container.</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
<a moz-do-not-send="true"
href="http://lists.linbit.com/pipermail/drbd-dev/2011-March/001426.html"
target="_blank">http://lists.linbit.com/pipermail/drbd-dev/2011-March/001426.html</a></div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
<br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">I have the
DRBD module loaded in the host.</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">But when I
try to attach the resource it says it can't connnect to 'drbd'
generic netlink family.</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
Can someone please explain to me what it the 'drbd' generic
netlink family even is?</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">And how to
get access to it from inside an LXC container?</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">As you can
see in my LXCX container's config I have app armor unconfined
and no lxc.devices entries so I'm hoping that I've removed as
many restrictions that might block access.</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">The
following was run from inside the container.</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
<br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
<div class="gmail_extra">root@saucy:~# service drbd status</div>
<div class="gmail_extra">drbd driver loaded OK; device status:</div>
<div class="gmail_extra">
version: 8.4.3 (api:1/proto:86-101)</div>
<div class="gmail_extra">srcversion: 5CF35A4122BF8D21CC12AE2</div>
<div class="gmail_extra">m:res cs ro ds p mounted fstype</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">
<div class="gmail_extra">
<div class="gmail_extra">root@saucy:~# drbdadm attach pc0</div>
<div class="im">
<div class="gmail_extra">Could not connect to 'drbd'
generic netlink family</div>
</div>
<div class="gmail_extra">
Command 'drbdsetup attach 0 /dev/loop1 /dev/loop1
internal --resync-rate=40M' terminated with exit code 20</div>
</div>
</div>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">Here's the
container's LXC config.</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div class="gmail_extra"
style="font-family:arial,sans-serif;font-size:13px">
<div class="gmail_extra">lxc.aa_profile = unconfined</div>
<div class="gmail_extra">lxc.mount = /var/lib/lxc/saucy/fstab</div>
<div class="gmail_extra">lxc.mount.entry = proc proc proc
nodev,noexec,nosuid 0 0</div>
<div class="gmail_extra">
lxc.mount.entry = sysfs sys sysfs defaults 0 0</div>
<div class="gmail_extra">lxc.mount.entry =
/sys/fs/fuse/connections sys/fs/fuse/connections none
bind,optional 0 0</div>
<div class="gmail_extra">lxc.mount.entry = /sys/kernel/debug
sys/kernel/debug none bind,optional 0 0</div>
<div class="gmail_extra">lxc.mount.entry =
/sys/kernel/security sys/kernel/security none bind,optional
0 0</div>
<div class="gmail_extra">lxc.mount.entry = /sys/fs/pstore
sys/fs/pstore none bind,optional 0 0</div>
<div class="gmail_extra">
lxc.tty = 4</div>
<div class="gmail_extra">lxc.pts = 1024</div>
<div class="gmail_extra">lxc.devttydir = lxc</div>
<div class="gmail_extra">lxc.arch = x86_64</div>
<div class="gmail_extra">lxc.utsname = saucy</div>
<div class="gmail_extra">
lxc.network.type = veth</div>
<div class="gmail_extra">lxc.network.flags = up</div>
<div class="gmail_extra">lxc.network.link = lxcbr0</div>
<div class="gmail_extra">lxc.network.hwaddr =
00:16:3e:f8:ca:e6</div>
<div class="gmail_extra">
lxc.cap.drop = sys_module</div>
<div class="gmail_extra">lxc.cap.drop = mac_admin</div>
<div class="gmail_extra">lxc.cap.drop = mac_override</div>
<div class="gmail_extra">lxc.cap.drop = sys_time</div>
<div class="gmail_extra">
lxc.rootfs = /var/lib/lxc/saucy/rootfs<br>
</div>
<div class="gmail_extra">lxc.pivotdir = lxc_putold</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Thanks in advance,</div>
<div class="gmail_extra">Jeremiah</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
drbd-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a>
<a class="moz-txt-link-freetext" href="http://lists.linbit.com/mailman/listinfo/drbd-user">http://lists.linbit.com/mailman/listinfo/drbd-user</a>
</pre>
</blockquote>
<br>
</body>
</html>