Hi Michal,

This is how snippets from my XML looks like. Full XML at the end of the mail.. 
    <emulator>/usr/sbin/libvirt_lxc</emulator>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/vol/usb1/iox/repo-lxc/utd/rootfs_mnt'/>
      <target dir='/'/>
    </filesystem>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/flash/dir'/>
      <target dir='/flash/dir'/>
    </filesystem>

The issue I am facing is, my container doesnt start. Fails at mounting this /flash/dir  with below message.

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


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
But durig pivot root, this path /flash/dir is unaccessible and hence we don't seem to create this .oldroot/flash/dir. 
Later on, during lxcContainerMountFSBind(), /.oldroot/flash/dir bind mount fails.

Any thoughts?

Thanks
Priyanka

====
Full XML
====

<domain type='lxc'>
  <name>try</name>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/sbin/init</init>
  </os>
  <devices>
    <emulator>/usr/sbin/libvirt_lxc</emulator>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/vol/usb1/iox/repo-lxc/utd/rootfs_mnt'/>
      <target dir='/'/>
    </filesystem>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/flash/dir'/>
      <target dir='/flash/dir'/>
    </filesystem>
    <console type='pty'>
      <target type='lxc' port='2'/>
    </console>
  </devices>
</domain>

On Wed, Jun 23, 2021 at 1:46 PM Michal Prívozník <mprivozn@redhat.com> wrote:
On 6/22/21 6:17 PM, Priyanka Gupta wrote:
> Hi,
>
> Could someone pls let me know when this condition could possibly arise?
> lxcContainerResolveSymlinks:621 : Skipped unaccessible '/flash/dir'
>
> The code seems to call access('/flash/dir', F_OK) which shall only check
> for existence of this directory '/flash/dir'. I have this directory
> created on my host. Is there anything that I am missing?
>

Hey, looking into the code the function is ran from a mount namespace
thus the path may not exist. But is there a problem you are seeing? If
so, can you share your LXC XML and describe the problem? I mean, the
message you mention is just a debug printing, harmless.

Michal