I discovered that 4.0.0 had been released because some of my LXD hosts wouldn’t start correctly. Looking in /var/snap/lxd/common/lxd/logs/lxd.log a common error was
t=2020-04-03T08:47:04+1000 lvl=eror msg="Failed to start the daemon: Failed to mount images storage: Failed to mount storage volume \"default/images\":
Failed to run: zfs mount default/custom/default_images: cannot mount 'default/custom/default_images': filesystem already mounted"
Any way to fix this w/o rebooting the host?
The solution was:
Find where that zfs volume is mounted inside the namespace:
Then try snap start lxd and it should start working. If not, check for more errors in /var/snap/lxd/common/lxd/logs/lxd.log - on one of my LXD hosts, I had to umount both default_images and default_backups before lxd would start.
I’m having a look now. The oldest entry is here, and I’ll go through and try to find anything different after that (edits to come).
-- Logs begin at Sat 2018-10-27 14:19:07 AEST, end at Fri 2020-04-03 11:32:56 AEST. --
Feb 18 06:27:40 lxc-10 systemd[1]: Stopping Service for snap application lxd.daemon...
Feb 18 06:27:42 lxc-10 lxd.daemon[111999]: => Stop reason is: snap refresh
Feb 18 06:27:42 lxc-10 lxd.daemon[111999]: => Stopping LXD
Feb 18 06:27:43 lxc-10 systemd[1]: Stopped Service for snap application lxd.daemon.
Feb 18 06:27:49 lxc-10 systemd[1]: Started Service for snap application lxd.daemon.
Feb 18 06:27:49 lxc-10 lxd.daemon[112469]: => Preparing the system (13390)
Feb 18 06:27:49 lxc-10 lxd.daemon[112469]: ==> Loading snap configuration
Feb 18 06:27:49 lxc-10 lxd.daemon[112469]: ==> Setting up mntns symlink (mnt:[4026532868])
Feb 18 06:27:49 lxc-10 lxd.daemon[112469]: ==> Setting up mount propagation on /var/snap/lxd/common/lxd/storage-pools
Feb 18 06:27:49 lxc-10 lxd.daemon[112469]: ==> Setting up mount propagation on /var/snap/lxd/common/lxd/devices
Feb 18 06:27:49 lxc-10 lxd.daemon[112469]: ==> Setting up persistent shmounts path
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: Failed to mount new mntns: Invalid argument
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ====> Failed to setup shmounts, continuing without
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ====> Making LXD shmounts use the persistent path
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ====> Making LXCFS use the persistent path
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Setting up kmod wrapper
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Preparing /boot
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Preparing a clean copy of /run
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Preparing a clean copy of /etc
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Setting up ceph configuration
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Setting up LVM configuration
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Rotating logs
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Setting up ZFS (0.7)
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Escaping the systemd cgroups
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ====> Detected cgroup V1
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Escaping the systemd process resource limits
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: ==> Disabling shiftfs on this kernel (auto)
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: => Starting LXCFS
Feb 18 06:27:50 lxc-10 lxd.daemon[112469]: => Starting LXD
It looked like I rebooted the machine after that, and that error wasn’t there after the reboot
Feb 20 20:48:09 lxc-10 lxd.daemon[66081]: => Stopping LXCFS
Feb 20 20:48:11 lxc-10 systemd[1]: Stopped Service for snap application lxd.daemon.
-- Reboot --
Feb 20 20:48:51 lxc-10 systemd[1]: Started Service for snap application lxd.daemon.
Feb 20 20:48:51 lxc-10 lxd.daemon[1733]: => Preparing the system (13439)
Feb 20 20:48:51 lxc-10 lxd.daemon[1733]: ==> Loading snap configuration
Feb 20 20:48:51 lxc-10 lxd.daemon[1733]: ==> Setting up mntns symlink (mnt:[4026532685])
Feb 20 20:48:51 lxc-10 lxd.daemon[1733]: ==> Setting up mount propagation on /var/snap/lxd/common/lxd/storage-pools
Feb 20 20:48:51 lxc-10 lxd.daemon[1733]: ==> Setting up mount propagation on /var/snap/lxd/common/lxd/devices
Feb 20 20:48:52 lxc-10 lxd.daemon[1733]: ==> Setting up persistent shmounts path
Feb 20 20:48:52 lxc-10 lxd.daemon[1733]: ====> Making LXD shmounts use the persistent path
Feb 20 20:48:52 lxc-10 lxd.daemon[1733]: ====> Making LXCFS use the persistent path
Feb 20 20:48:52 lxc-10 lxd.daemon[1733]: ==> Setting up kmod wrapper
Feb 20 20:48:52 lxc-10 lxd.daemon[1733]: ==> Preparing /boot
Feb 20 20:48:52 lxc-10 lxd.daemon[1733]: ==> Preparing a clean copy of /run
I’ve sent you a PM with the complete journalctl output, and I was hoping to find something in /var/snap/lxd/common/lxd/logs but it looks like they get rotated every time lxd starts, instead of when they’re over a certain size - you’re missing a ‘size’ in etc/logrotate.conf.
Sadly, because of that, all I have is 7 files from this morning that all are tiny and all say pretty much the same thing