Michal Prívozník
2021-Jun-23 09:16 UTC
unaccessible directory in lxcContainerResolveSymlinks
On 6/23/21 11:08 AM, Priyanka Gupta wrote:> 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 directoryYeah, the lxc driver thinks that /flash/dir doesn't exist. Unfortunately, I am unable to reproduce - when I mkdir -p /flash/dir and add corresponding <filesystem/> to one of my containers it boots up just fine. What's your libvirt version? Michal
Priyanka Gupta
2021-Jun-23 09:28 UTC
unaccessible directory in lxcContainerResolveSymlinks
Hi, If I try to add only /flash (without dir subdirerctory) into the XML, it works fine for me. Does it matter what sort of permissions(user/grp) /flash/dir has? Thanks Priyanka On Wed, Jun 23, 2021 at 2:46 PM Michal Pr?vozn?k <mprivozn at redhat.com> wrote:> On 6/23/21 11:08 AM, Priyanka Gupta wrote: > > 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 > > Yeah, the lxc driver thinks that /flash/dir doesn't exist. > Unfortunately, I am unable to reproduce - when I mkdir -p /flash/dir > and add corresponding <filesystem/> to one of my containers it boots up > just fine. What's your libvirt version? > > Michal > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20210623/7fe7b7fb/attachment.htm>
Michal Prívozník
2021-Jun-23 09:34 UTC
unaccessible directory in lxcContainerResolveSymlinks
On 6/23/21 11:28 AM, Priyanka Gupta wrote:> Hi, > > If I try to add only /flash (without dir subdirerctory) into the XML, it > works fine for me. > Does it matter what sort of permissions(user/grp) /flash/dir has?A-ha! It can happen that root can't access some directories even though a regular user can. Typically, fuse mounts (unless explicitly allowed when mounting). So it does matter, yeah. Michal