Monday 1 June 2020

Re: Adjusting what fstypes df displays

On Thu, May 28, 2020 at 09:38:47PM -0700, Bryce Harrington wrote:
> These days, df displays a lot of mount points, due to the increased use
> of non-consumable filesystems such as tmpfs and squashfs. This clutter
> is particularly noticeable using df in Ubuntu, due to the increased
> popularity of snaps, but the general problem affects all Linux distros,
> and shows up in other commands such as lsblk, blkid, fdisk -l, and
> mount.

We had this problem on the desktop a while ago, and we worked with the
snapd team to solve it by introducing an extra option on the mounts
which snapd creates, called "x-gdu.hide". Parts of the GNOME desktop
respect this, and so user interfaces are not cluttered up with snap
mounts.

https://github.com/snapcore/snapd/blob/31b6deca70ddabbc86ab2793ddf16e500ae66fde/osutil/squashfs/fstype.go#L67

This feels to me to be a cleaner approach than saying that *all*
squashfs filesystems should be hidden by default - instead, the software
which creates the mounts is able to communicate this fact and if you've
created your own mounts then you carry on seeing them as normal.

There's still the question of creating an interface to hide based on
mount options and how to set the default. (Personally I agree with Seth
that the systemd style is a nice way to do it, if upstream are up for
that.) But this warrants consideration, I think.

Cheers,

--
Iain Lane [ iain@orangesquash.org.uk ]
Debian Developer [ laney@debian.org ]
Ubuntu Developer [ laney@ubuntu.com ]