Best way to solve unproper mounting issue in LXD (snap related)

EROR[11-03|00:15:41] Failed to start the daemon: Failed initializing storage pool “store_lxd”: Failed to mount ‘/var/lib/snapd/hostfs/srv/lxd’ on ‘/var/snap/lxd/common/lxd/storage-pools/store_lxd’: no such file or directory
INFO[11-03|00:15:41] Starting shutdown sequence
INFO[11-03|00:15:41] Closing the database
INFO[11-03|00:15:41] Stop database gateway
INFO[11-03|00:15:41] Stopping REST API handler:
INFO[11-03|00:15:41] - closing socket socket=/var/snap/lxd/common/lxd/unix.socket
INFO[11-03|00:15:41] Stopping /dev/lxd handler:
INFO[11-03|00:15:41] - closing socket socket=/var/snap/lxd/common/lxd/devlxd/sock
DBUG[11-03|00:15:41] Not unmounting temporary filesystems (containers are still running)
Error: Failed initializing storage pool “store_lxd”: Failed to mount ‘/var/lib/snapd/hostfs/srv/lxd’ on ‘/var/snap/lxd/common/lxd/storage-pools/store_lxd’: no such file or directory

Can you show ls -lh /srv and ls -lh /var/snap/lxd/common/lxd/storage-pools/ ?

[root@centoslxc ~]# ls -lh /srv
total 0
drwxr-xr-x. 2 root root 6 Oct 19 23:14 lxc
drwxr-xr-x. 9 root root 162 Oct 13 15:11 lxd
drwxr-xr-x. 9 root root 162 Oct 14 16:28 store
[root@centoslxc ~]# ls -lh /var/snap/lxd/common/lxd/storage-pools/
total 0
drwx–x--x. 2 root root 6 Oct 13 15:49 storage
drwx–x--x. 2 root root 6 Nov 2 20:31 store_lxd

Can you show ls -lh /var/snap/lxd/common/lxd/ too?

[root@centoslxc ~]# ls -lh /var/snap/lxd/common/lxd
total 12K
drwx------. 4 root root 37 Oct 19 23:13 backups
drwx------. 3 root root 105 Oct 13 15:11 cache
drwx–x--x. 2 root root 214 Oct 19 13:42 containers
drwx------. 4 root root 54 Nov 2 23:21 database
drwx–x--x. 16 root root 214 Nov 3 00:15 devices
drwxr-xr-x. 2 root root 6 Oct 13 15:06 devlxd
drwx------. 2 root root 6 Oct 13 15:06 disks
drwx------. 2 root root 157 Oct 30 11:18 images
drwxr-xr-x 2 root root 214 Nov 2 20:24 justincase
drwx------. 16 root root 4.0K Nov 3 00:15 logs
drwx–x--x. 2 root root 6 Oct 13 15:06 networks
drwx------. 4 root root 37 Oct 13 15:06 security
-rw-r–r--. 1 root root 822 Oct 13 15:06 server.crt
-rw-------. 1 root root 288 Oct 13 15:06 server.key
lrwxrwxrwx 1 root root 39 Oct 23 12:39 shmounts -> /var/snap/lxd/common/shmounts/instances
drwx------. 2 root root 6 Oct 13 15:06 snapshots
drwx–x--x. 4 root root 38 Oct 13 15:49 storage-pools
drwx–x--x. 2 root root 6 Oct 13 15:06 virtual-machines
drwx------. 2 root root 6 Oct 13 15:06 virtual-machines-snapshots

Ok, not seeing anything obviously wrong at that point.
Try:

  • umount -l /run/snapd/ns/lxd.mnt
  • rm /run/snapd/ns/lxd.mnt
  • systemctl start snap.lxd.daemon
  • journalctl -u snap.lxd.daemon -n 30

ITTT WOOOOORKED I CANT THANK YOU ENOUGH
These last commands + the database script life saviours !
You are a life saviour thank you so much !

Excellent :slight_smile:

I’ve confirmed that a clean LXD still will not let you use a relative source, so hopefully this won’t be a problem again :slight_smile: