Odd cannot bind-mount the mount namespace file error


#1

So basically I decided to rearrange my snap set up by making a new separate Logical Volume and mounted it it on /var/lib/snapd.

/dev/mapper/vg_ssd-snap on /var/lib/snapd type xfs (rw,relatime,attr2,inode64,noquota)

All seems good. Snaps install fine. No boot errors or anything but I am unable to run any snaps. There error I get is:

castersoundboard 
cannot bind-mount the mount namespace file /proc/4830/ns/mnt -> castersoundboard.mnt: Permission denied
support process for mount namespace capture exited abnormally

or

brave
cannot bind-mount the mount namespace file /proc/5039/ns/mnt -> brave.mnt: Permission denied
support process for mount namespace capture exited abnormally

Is this something to do with the mounted lv? Is it because it is a xfs volume something is not working?

Any help would be appreciated.


How to get snapd to work with external mounts?
#2

Hi,
Would like to ask how did this go? I’m having a similar problem.
Thanks.


#3

It was fixed in a newer version of snapd

I just have this in my fstab now. Seems to work.

/dev/mapper/vg_ssd-snap  /var/lib/snapd  xfs rw   0 1
/dev/mapper/vg_ssd-flatpak  /var/lib/flatpak  xfs rw,relatime,attr2,inode64,noquota  0 1

FTR I am using snapd

snap --version
snap    2.36.3
snapd   2.36.3
series  16
debian  9
kernel  4.19.0-1-amd64