<div dir="ltr"><div>1. Yes, use_lvmetad is 0, and its systemd units for it are stopped/disabled.</div><div>2. Yes, everything on the host machine i.e(/proc, /sys etc) are getting mounted on the pod.</div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(219,219,219);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(47,180,29)"><b>ubuntu@ip-172-31-89-47</b></span><span style="font-variant-ligatures:no-common-ligatures">:</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,218)"><b>~</b></span><span style="font-variant-ligatures:no-common-ligatures">$ kubectl exec -it openebs-lvm-node-v6jrb -c openebs-lvm-plugin<span class="gmail-Apple-converted-space">  </span>-n kube-system -- sh</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(219,219,219);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"># ls<span class="gmail-Apple-converted-space">     </span></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(219,219,219);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">bin<span class="gmail-Apple-converted-space">  </span>boot<span class="gmail-Apple-converted-space">  </span>dev<span class="gmail-Apple-tab-span" style="white-space:pre">   </span>etc<span class="gmail-Apple-converted-space">  </span>home<span class="gmail-Apple-converted-space">  </span>host<span class="gmail-Apple-converted-space">  </span>lib<span class="gmail-Apple-converted-space">  </span>lib32<span class="gmail-Apple-converted-space">  </span>lib64<span class="gmail-Apple-converted-space">  </span>libx32<span class="gmail-Apple-converted-space">  </span>media<span class="gmail-Apple-converted-space">  </span>mnt<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>opt<span class="gmail-Apple-converted-space">  </span>plugin<span class="gmail-Apple-converted-space">  </span>proc<span class="gmail-Apple-converted-space">  </span>root<span class="gmail-Apple-converted-space">  </span>run<span class="gmail-Apple-converted-space">  </span>sbin<span class="gmail-Apple-converted-space">  </span>srv<span class="gmail-Apple-converted-space">  </span>sys<span class="gmail-Apple-converted-space">  </span>tmp<span class="gmail-Apple-converted-space">  </span>usr<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>var</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(219,219,219);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"># cd /host</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(219,219,219);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"># ls</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(219,219,219);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">bin<span class="gmail-Apple-converted-space">  </span>boot<span class="gmail-Apple-converted-space">  </span>dev<span class="gmail-Apple-tab-span" style="white-space:pre">   </span>etc<span class="gmail-Apple-converted-space">  </span>home<span class="gmail-Apple-converted-space">  </span>lib<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>lib32<span class="gmail-Apple-converted-space">  </span>lib64<span class="gmail-Apple-converted-space">  </span>libx32<span class="gmail-Apple-converted-space">  </span>lost+found<span class="gmail-Apple-converted-space">  </span>media<span class="gmail-Apple-converted-space">  </span>mnt<span class="gmail-Apple-converted-space">  </span>opt<span class="gmail-Apple-converted-space">  </span>proc<span class="gmail-Apple-converted-space">  </span>root<span class="gmail-Apple-converted-space">  </span>run<span class="gmail-Apple-converted-space">  </span>sbin<span class="gmail-Apple-converted-space">  </span>snap<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>srv<span class="gmail-Apple-converted-space">  </span>sys<span class="gmail-Apple-converted-space">  </span>tmp<span class="gmail-Apple-converted-space">  </span>usr<span class="gmail-Apple-converted-space">  </span>var</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(219,219,219);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">#</span></p></div>3. The detail output of `strace -f -ttt` command: <a href="https://pastebin.com/raw/VFyXLNaC">https://pastebin.com/raw/VFyXLNaC</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 3 Jun 2022 at 12:48, Roger Heflin <<a href="mailto:rogerheflin@gmail.com">rogerheflin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Random thoughts.</div><div><br></div><div>Make sure  use_lvmetad is 0, and its systemd units for it are stopped/disabled.</div><div><br></div><div>Are you mounting /proc and /sys and /dev into the /host chroot?</div><div><br></div><div>/run may also be needed.</div><div><br></div><div>you might add a "-ttt" to the strace command to give timing data.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 2, 2022 at 1:41 AM Abhishek Agarwal <<a href="mailto:mragarwal.developer@gmail.com" target="_blank">mragarwal.developer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">These are not different LVM processes. The container process is using the LVM binary that the node itself has. We have achieved this by using scripts that point to the same lvm binary that is used by the node.<div><br></div><div>Configmap(~shell script) used for the same has the following contents where `/host` refers to the root directory of the node:</div><div><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(204,120,50)">get_bin_path</span>: |<br>  #!/bin/sh<br>  bin_name=$1<br>  if [ -x /host/bin/which ]; then<br>    echo $(chroot /host /bin/which $bin_name | cut -d ' ' -f 1)<br>  elif [ -x /host/usr/bin/which ]; then<br>    echo $(chroot /host /usr/bin/which $bin_name | cut -d ' ' -f 1)<br>  else<br>    $(chroot /host which $bin_name | cut -d ' ' -f 1)<br>  fi</pre></div><div><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(204,120,50)">lvcreate</span>: |<br>  #!/bin/sh<br>  path=$(/sbin/lvm-eg/get_bin_path "lvcreate")<br>  chroot /host $path "$@"</pre></div><div>Also, the above logs in the pastebin link have errors because the vg lock has not been acquired and hence creation commands will fail. Once the lock is acquired, the `strace -f` command gives the following output being stuck. Check out this link for full details -> <a href="https://pastebin.com/raw/DwQfdmr8" target="_blank">https://pastebin.com/raw/DwQfdmr8</a></div><div><br></div><div>P.S: We at OpenEBS are trying to provide lvm storage to cloud native workloads with the help of kubernetes CSI drivers and since all these drivers run as pods and help dynamic provisioning of kubernetes volumes(storage) for the application, the lvm commands needs to be run from inside the pod. Reference -> <a href="https://github.com/openebs/lvm-localpv" target="_blank">https://github.com/openebs/lvm-localpv</a></div><div><br></div><div>Regards</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 1 Jun 2022 at 13:06, Demi Marie Obenour <<a href="mailto:demi@invisiblethingslab.com" target="_blank">demi@invisiblethingslab.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Wed, Jun 01, 2022 at 12:20:32AM +0530, Abhishek Agarwal wrote:<br>
> Hi Roger. Thanks for your reply. I have rerun the command with `strace -f`<br>
> as you suggested. Here is the pastebin link containing the detailed output<br>
> of the command: <a href="https://pastebin.com/raw/VRuBbHBc" rel="noreferrer" target="_blank">https://pastebin.com/raw/VRuBbHBc</a><br>
<br>
Even if you can get LVM “working”, it is still likely to cause data<br>
corruption at some point, as there is no guarantee that different LVM<br>
processes in different namespaces will see each others’ locks.<br>
<br>
Why do you need to run LVM in a container?  What are you trying to<br>
accomplish?<br>
-- <br>
Sincerely,<br>
Demi Marie Obenour (she/her/hers)<br>
Invisible Things Lab<br>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://listman.redhat.com/mailman/listinfo/linux-lvm" rel="noreferrer" target="_blank">https://listman.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" rel="noreferrer" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
</blockquote></div>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://listman.redhat.com/mailman/listinfo/linux-lvm" rel="noreferrer" target="_blank">https://listman.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" rel="noreferrer" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
</blockquote></div>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://listman.redhat.com/mailman/listinfo/linux-lvm" rel="noreferrer" target="_blank">https://listman.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" rel="noreferrer" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
</blockquote></div>