Moved /var/lib/snapd into /home/snapd and symlicked back. Snaps fail to start

AFAIK you should use a bind mount to do that. I suggest trying with the following mount unit:

# /etc/systemd/system/var-lib-snapd.mount
[Unit]
Description=bind mount snapd from /home to /var/lib/snapd

[Mount]
What=/home/snapd
Where=/var/lib/snapd
Options=bind

[Install]
WantedBy=multi-user.target
RequiredBy=snapd.service

Save it to /etc/systemd/system/var-lib-snapd.mount, then:

# remove the symlink
$ rm -f /var/lib/snapd` symlink
$ systemctl daemon-reload
# enable the mount unit
$ systemctl enable var-lib-snapd.mount

and lastly reboot.

@zyga-snapd may also have some suggestions here.

1 Like