Hi
I have an urgent issue with snap/lxd on my server.
After a reboot almost none of my snaps are available.
If I run “lxc --list” i get:
cannot perform operation: mount --rbind /dev /tmp/snap.rootfs_iqH9Cy//dev: No such file or directory
If I run “snap list --all” I get:
Name Version Rev Tracking Publisher Notes
canonical-livepatch 9.6.1 98 latest/stable canonical✓ disabled
canonical-livepatch 9.6.2 99 latest/stable canonical✓ -
core 16-2.50.1 11167 latest/stable canonical✓ core,disabled
core 16-2.51 11187 latest/stable canonical✓ core
core18 20210309 1997 latest/stable canonical✓ base,disabled
core18 20210507 2066 latest/stable canonical✓ base
lxd 4.0.5 19647 4.0/stable/… canonical✓ disabled
lxd 4.0.6 20326 4.0/stable/… canonical✓ -
thelounge 4.1.0 200 latest/stable snapcrafters disabled
thelounge 4.2.0 280 latest/stable snapcrafters -
How Can I recover from this without reinstalling everything?
Why would you want to enable the older revisions?
Surely you want to fix the mount problem, not the fact that previous releases are disabled - which is perfectly normal?
I did not see that the disabled snaps where the old versions. Then that is not the issue. Can you help me with the mount issue?
I get a similar issue when I try to install any snaps.
I get this:
Jun 23 15:56:27 aa-srv3 systemd[2468]: Started snap.lxd.lxc.24915465-9651-44cb-a75d-a7354c6da5fb.scope.
Jun 23 15:56:27 aa-srv3 systemd[2468]: snap.lxd.lxc.24915465-9651-44cb-a75d-a7354c6da5fb.scope: Succeeded.
hmm, that log looks like you have some weird systemd things going on there with the systemd-sysv-generator, not really sure what to make out of this …
if you uninstall snapd to get to a pristine state, make sure to use apt remove --purge snapd, that should remove all snaps and all of their data alongside …
I ended up removing (purging) snapd and reinstalling lxd. I am in the process of manually reinstalling my containers. If this where to happen again. Is there any way of manually copying my containers and import them after the reinstall of lxd?
i’'m not sure where exactly lxd stores its containers but snaps come with a builtin backup mechanism via snap save ... (see the other snapshot options in snap --help) and i would expect you to be able to save your container setup this way …
That’s the thing… If snapd get’s destroyed again I will have no way of recovering my lxc containers if there is no way of copying them before I --purge snapd and lxc… Is it not possible to copy them? Or am I thinking wrong?
Sorry for the delay. I did not try the snap snapshots as they would not help me in this situation. If snap is not working I would not be able to recover without removing snapd anyway. I will be looking into snapshots for other reasons. Thank you for the help!