Bind Mount to move /snap folder not working

Hello,

I am trying to relocate my /snap folder to another partition and set up a bind mount on the original location. For some reason when I do this I am unable to load any snap applications. Moving back the old folder allowed it to work again but I’m not sure why it doesn’t work with the mount. Anyone know how I might be able to get it working? I don’t have much space left on my Linux drive so would like to move my folder.

Thanks

you dont really want to move the /snap folder if you are after actually freeing up space, /snap only contains the mountpoints where the snap squashfs filesystems get loop mounted. the actual payload of snap packages lives in /var/lib/snapd/snaps and their (system) data in /var/snap …

there is some info in the two answers here:

For me my /snap folder was very large (around 5gb). It’s only around 3gb now as I had to re-install snap due to another error I had, but it’s still definitely all in the /snap folder like /snap/opera that’s taking up space. My snapd folder in /var/lib/snapd is not that big it just contains a bunch of .snap files and my /var/snap folder has almost all the same directories as /snap but they’re all empty. Are you saying the files I’m seeing in /snap are actually mounted somewhere else?

what you were seeing in /snap are the uncopressed sizes of the snap packages in /var/lib/snapd/snaps that get mounted under /snap/<snapname>/<version> … this space is not actually used anywhere on a physical disk …

these are like compressed cdroms where the physically used space is actually somewhere on /dev/sr0 which is an 800MB silver disk sitting in your CDROM tray, but if it is mounted on /media/cdrom you see 3GB used space …

in the /snap dir there is only a few kilobytes of physical space occupied on your disk for holding the directory structure of mount points. the things that make up the actual physical diskspace used are in /var/lib/snapd/snaps.

for more details i recommend:

mount |grep \\.snap

Ah, that explains a lot. I thought I was going crazy when the other day I deleted the snap folder and I went and checked my space and it hadn’t changed at all. Thanks for the help.