Skip to content

Instantly share code, notes, and snippets.

@jaytaylor
Last active February 24, 2018 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaytaylor/a83ad9a1a6965c78407dbe551bd3f56e to your computer and use it in GitHub Desktop.
Save jaytaylor/a83ad9a1a6965c78407dbe551bd3f56e to your computer and use it in GitHub Desktop.
LXC / LXD 2.0 Mount Permission Denied Errors

LXC / LXD 2.0 Mount Errors

2018-02-23

Symptom

root@ip-1-2-3-4:~# lxc list
cannot perform operation: mount /var/lib/snapd/hostfs/var/lib/lxd /var/lib/lxd -o nosuid,nodev,noexec,rbind,rslave: Permission denied

OS: Ubuntu 16.04

LXC installed via snap

Fix

systemctl stop snap.lxd.daemon
test -h /var/lib/lxd && unlink /var/lib/lxd
mkdir /var/lib/lxd
mount --bind /var/snap/lxd/common/lxd /var/lib/lxd
systemctl start snap.lxd.daemon

Appears to work fine. Not yet clear on how things got into this broken state.

Source of fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment