<p dir="ltr"><br>
On 03/06/2014 7:50 AM, &quot;Lars Ellenberg&quot; &lt;<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On Mon, Jun 02, 2014 at 11:07:56AM +1000, Igor Cicimov wrote:<br>
&gt; &gt; On 02/06/2014 6:14 AM, &quot;Lars Ellenberg&quot; &lt;<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>&gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Sat, May 31, 2014 at 10:48:09PM +1000, Igor Cicimov wrote:<br>
&gt; &gt; &gt; &gt; Hi all,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I&#39;ve been searching for a solution about this but couldn&#39;t find anything<br>
&gt; &gt; &gt; &gt; but couple of threads ending without any outcome.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I have drbd-8.4.4 installed in Ubuntu-12.04 container running on<br>
&gt; &gt; &gt; &gt; Ubuntu-12.04 host. I can only create the metadata and then the try to<br>
&gt; &gt; bring<br>
&gt; &gt; &gt; &gt; the resource up fails with the following message:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; root@lxc01:~# drbdadm up r0<br>
&gt; &gt; &gt; &gt; Could not connect to &#39;drbd&#39; generic netlink family<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; The kernel module loads fine and /proc/drbd directory exists. For sure<br>
&gt; &gt; this<br>
&gt; &gt; &gt; &gt; is not related to apparmor since I get the same issue with the service<br>
&gt; &gt; &gt; &gt; stopped on the host and rules teardown.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Has there been any solution for this or DRBD can&#39;t run inside linux<br>
&gt; &gt; &gt; &gt; container at all?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Possibly could be made to work.<br>
&gt; &gt; &gt; Or not.<br>
&gt; &gt; &gt; I don&#39;t know.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; There is a lot of things that would need to be abstracted<br>
&gt; &gt; &gt; into per container namespaces. I&#39;m not even sure if all<br>
&gt; &gt; &gt; the infrastructure to abstract device numbers is there yet,<br>
&gt; &gt; &gt; even in recent kernels.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; *IF* it can be made to work,<br>
&gt; &gt; &gt; properly isolating different containers against each other would<br>
&gt; &gt; &gt; require ... let&#39;s say &quot;code changes&quot; ... in the module<br>
&gt; &gt; &gt; (there is only one kernel, so just one instance of this kernel module,<br>
&gt; &gt; &gt;  there are many containers,<br>
&gt; &gt; &gt;  it would likely need to become &quot;container aware&quot; on various levels).<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Appart from that: I don&#39;t see the use case.<br>
&gt; &gt; &gt; Having DRBD on the host, outside the containers,<br>
&gt; &gt; &gt; and replicate the containers state and content<br>
&gt; &gt; &gt; is a known working use case.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; But what for would you want DRBD *inside* the container?<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Why not? Its working inside vm&#39;s why not inside containers too? They are<br>
&gt; &gt; becoming more popular as light virtualization solution so for sure this<br>
&gt; &gt; will become necessity down the road. Are you saying this should not be<br>
&gt; &gt; available on user level in case lets say someone wants to try a cluster of<br>
&gt; &gt; two containers with drbd replicated device?<br>
&gt;<br>
&gt; Each VM has its own &quot;kernel&quot;, its own &quot;drbd&quot; module.<br>
&gt; =&gt; works.<br>
&gt; But even there, usually you put the VM image on top of DRBD,<br>
&gt; not some DRBD inside the VM (even though that is possible).<br>
&gt;<br>
&gt; Container: does not work.<br>
&gt; Possibly could be made to work.<br>
&gt; Probably would not only require changes in DRBD module code,<br>
&gt; but in generic kernel as well. I don&#39;t know.<br>
&gt; I do not see that happening anytime soon.<br>
&gt;<br>
&gt; Maybe find someone who knows,<br>
&gt; and get them to explain to me<br>
&gt; what would be necessary to do in DRBD<br>
&gt; to make it play nice from within containers...<br>
&gt;<br>
&gt; But I really don&#39;t see why.<br>
&gt;<br>
&gt; If you create a container,<br>
&gt; you tell it what &quot;storage&quot; to use.<br>
&gt; Put that on top of DRBD.<br>
&gt; Done.<br>
&gt;<br>
Thanks Lars, sounds like a lots of work. The only difference is that the control over drbd is outside the container it self making the drbd invisible for the inside users. But it is what it is so we have to skip drbd from the cluster stack on container level.<br>

&gt;<br>
&gt; --<br>
&gt; : Lars Ellenberg<br>
&gt; : LINBIT | Your Way to High Availability<br>
&gt; : DRBD/HA support and consulting <a href="http://www.linbit.com">http://www.linbit.com</a><br>
&gt; _______________________________________________<br>
&gt; drbd-user mailing list<br>
&gt; <a href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a><br>
&gt; <a href="http://lists.linbit.com/mailman/listinfo/drbd-user">http://lists.linbit.com/mailman/listinfo/drbd-user</a><br>
</p>