<div dir="ltr">Hi Michal,<div><br></div><div>This is how snippets from my XML looks like. Full XML at the end of the mail.. </div><div>    <emulator>/usr/sbin/libvirt_lxc</emulator><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/vol/usb1/iox/repo-lxc/utd/rootfs_mnt'/><br>      <target dir='/'/><br>    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/flash/dir'/></div><div>      <target dir='/flash/dir'/><br>    </filesystem><br></div><div><br></div><div>The issue I am facing is, my container doesnt start. Fails at mounting this /flash/dir  with below message.</div><div><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Helvetica">2021-06-09 06:52:55.548+0000: 1: error : lxcContainerMountFSBind:1223 : Failed to bind mount directory /.oldroot/flash/dir to /flash/dir: No such file or directory</p></div><div><br></div><div>I see that .oldroot is added to this path and figured out that lxcContainerPivotRoot is creating and mounting all folders under rootfs to rootfs/.oldroot</div><div>But durig pivot root, this path /flash/dir is unaccessible and hence we don't seem to create this .oldroot/flash/dir. </div><div>Later on, during lxcContainerMountFSBind(), /.oldroot/flash/dir bind mount fails.</div><div><br></div><div>Any thoughts?</div><div><br></div><div>Thanks</div><div>Priyanka</div><div><br></div><div>====</div><div>Full XML</div><div>====</div><div><br></div><div><domain type='lxc'><br>  <name>try</name><br>  <memory>1048576</memory><br>  <currentMemory>1048576</currentMemory><br>  <vcpu placement='static'>1</vcpu><br>  <os><br>    <type arch='x86_64'>exe</type><br>    <init>/sbin/init</init><br>  </os><br>  <devices><br>    <emulator>/usr/sbin/libvirt_lxc</emulator><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/vol/usb1/iox/repo-lxc/utd/rootfs_mnt'/><br>      <target dir='/'/><br>    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/flash/dir'/><br>      <target dir='/flash/dir'/><br>    </filesystem><br>    <console type='pty'><br>      <target type='lxc' port='2'/><br>    </console><br>  </devices><br></domain></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 23, 2021 at 1:46 PM Michal Prívozník <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/22/21 6:17 PM, Priyanka Gupta wrote:<br>
> Hi,<br>
> <br>
> Could someone pls let me know when this condition could possibly arise?<br>
> lxcContainerResolveSymlinks:621 : Skipped unaccessible '/flash/dir'<br>
> <br>
> The code seems to call access('/flash/dir', F_OK) which shall only check<br>
> for existence of this directory '/flash/dir'. I have this directory<br>
> created on my host. Is there anything that I am missing?<br>
> <br>
<br>
Hey, looking into the code the function is ran from a mount namespace<br>
thus the path may not exist. But is there a problem you are seeing? If<br>
so, can you share your LXC XML and describe the problem? I mean, the<br>
message you mention is just a debug printing, harmless.<br>
<br>
Michal<br>
<br>
</blockquote></div>