<div dir="ltr"><div>I've added local dir (lxc config device add) to running (unprvileged, default profile) containter and it just works, but after container stop, it cannot start again with "<span style="font-family:monospace,monospace">Permission denied - Failed to mount". </span>Any fix?<br><br></div><div><span style="font-family:monospace,monospace">$ lxc start pld<br></span></div><div><span style="font-family:monospace,monospace"> lxc 20160926115846.879 ERROR lxc_utils - utils.c:safe_mount:1692 - Permission denied - Failed to mount /var/lib/lxd/devices/pld/disk.var-host onto /usr/lib64/lxc/rootfs/var/host<br>  lxc 20160926115846.879 ERROR lxc_conf - conf.c:mount_entry:1650 - Permission denied - failed to mount '/ ' on '/usr/lib64/lxc/rootfs/var/host'<br>  lxc 20160926115846.879 ERROR lxc_conf - conf.c:lxc_setup:3742 - failed to setup the mount entries for 'pld'<br>  lxc 20160926115846.879 ERROR lxc_start - start.c:do_start:834 - failed to setup the container<br></span><br></div><div>Local dir exists and has been mounted by lxd under /var/lib/lxd:<br></div><div>$ ls -ld /<span style="font-family:monospace,monospace">var/lib/lxd/devices/pld/disk.var-host<br>drwxr-xr-x 2 root root 4096 Sep 26 09:57 /var/lib/lxd/devices/pld/disk.var-host<br><br></span></div><div><span style="font-family:monospace,monospace">$ mount | grep 'var/lib'<br></span></div><div><span style="font-family:monospace,monospace">/dev/sdb on /var/lib/lxd type ext4 (rw,relatime,data=ordered)<br>/dev/sdb on /var/lib/lxd/shmounts type ext4 (rw,relatime,data=ordered)<br>/dev/sda on /var/lib/lxd/devices/pld/disk.var-host type ext4 (rw,relatime,data=ordered)<br><br></span></div><div><br>Container config:</div><div></div><span style="font-family:monospace,monospace">$ lxc config show pld <br></span><div><div><span style="font-family:monospace,monospace">name: pld<br>profiles:<br>- default<br>config:<br>  volatile.base_image: 95847b2a6d2b14caf4ce8147f8848e361eb04f6fa860502e9f78e275dd14e8d5<br>  volatile.eth0.hwaddr: 00:16:3e:44:85:f0<br>  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":100000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":100000}]'<br>devices:<br>  hostshare:<br>    path: /var/host<br>    source: /var/covar/pld<br>    type: disk<br>  root:<br>    path: /<br>    type: disk<br>ephemeral: false<br><br></span></div><div><span style="font-family:monospace,monospace">And lxc info:<br></span></div><div><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace">$ lxc info<br></span><div><span style="font-family:monospace,monospace">environment:<br>  addresses: []<br>  architectures:<br>  - x86_64<br>  - i686<br>driver: lxc<br>driverversion: 2.0.4<br>kernel: Linux<br>kernelarchitecture: x86_64<br>kernelversion: 4.4.19-1<br>server: lxd<br>serverversion: "2.2"<br>storage: dir</span></div><div><br></div></div></div></div>