Hi there, as a non-developer, I hope this is the right place to ask it, because I obviousely wasn’t able to find it on the interweb.
- On a, lets say, typical ubuntu, where are installed snaps stored / saved?
- Another thing is, that pains me, is that old package management systems depend on the developer to either hard code the destination for the insall into it or make extra effort to enable the user to select that destination. As far as I understand it. Therefore I have hope, this might have been considered for snappy.
Thank you very much jzimm. Unfortunately this topic wasn’t considered in snappy either. Thus I still haven’t found any chance or way to place different applications on different drives / volumens.
After all that years with GNU/Linux, I am still astounded, that people wonder, why that could be usefull. Most power users comming from windows wonder how that simple thing does not work on Linux.
So to answer your question: This is usefull to people who use a lot of large applications with lots of data. A simple example are gamers, where games can ammount to several terrabytes.
Or is there a linux typical work around that I do not know of? No need to answer that, since that does not apply this forums topic.
But I had wished for snappy to be more versatile, like having interchangeable locations for snaps.
To move the snap storage to a separate disc you would set a mount point to your alternative location for either
/var/lib/snapd/snaps or one of the parent components of that chain, e.g.
/var. The compressed file-system of each snap is stored in that folder in a squashfs file, one for each snap.
To move the user-level storage to a separate disc, which is useful if a snap downloads a large data chunk like steam would do, then you would need to set a mount point to your alternative location for either
/home/your-user/snap or a parent component of that chain, e.g.
Note that you can’t use a symbolic link in place of the
$HOME/snap because the apparmor confinement cannot automatically update itself to point to the target of that link, as that would open a security hole.
Wow, cool!, Thanks, daniel! Well that helps me, and thanks for the advice about apparmor. My last hope is, that this will become as easy as windows users are used to it, scince I hope for more migrants to Linux. That goes right into my Tomboy’s clever Tipps section.
May I use mount --bind instead of symlinks as a way to “simulate” them and relocate snap directories in existing filesystems? Should that work?
yes, bind mounting instead of symlinking will work fine
Just thinking, there is another possibility too, using OverlayFS you could keep your snaps between multiple volumes or locations, and just make them “appear” under /var/lib/snapd/snaps. Same thing for the data directories.
Disclaimer: I haven’t actually tried this so I’m not sure whether AppArmor would be fine with that.