I run Ubuntu on BTRFS. I also mount other BTRFS volumes regularly.
I typically use nautilus to delete files. I tap the delete button which, on the local filesystem, typically moves the file to /.local/share/Trash. The non-empty state of the trash bin is visually indicated (the Unity launcher full bin icon in 16.04 or the top bar icon of the Trash Gnome shell extension in 17.10). I can then empty trash easily at the end of my session.
This process is the same when deleting files from mounted FAT32, EXT4 and NTFS flash drives or hard disk drives. As expected, these files are typically moved to the hidden trash folder created in the root directory of the device. Again, visual indication is given for the non-empty state and emptying is easy.
BTRFS subvolumes behave a little differently. See, when deleting a file on a mounted BTRFS filesystem with multiple subvolumes, the file is moved to a hidden trash folder within each individual subvolume.
Now, this in itself is not a problem (is this something to do with subvolume ID level?). What is mildly irritating is that there is no visual indication of a non-empty state for trash on mounted BTRFS subvoumes. No notification. No icon. Nothing.
Here’s an example: take a mounted BTRFS filesystem called ‘VIDEO’. Within ‘VIDEO’ there are two subvolumes named ‘1080p’ and ‘720p’. Tap delete on a file from ‘1080p’ and it would move to /VIDEO/1080p/.Trash. The same action on a file from ‘720p’ would go into /VIDEO/720p/.Trash. Okay, no big deal. The issue is that neither of the above actions will present the user with any visual indication (whether fleeting or persistent) as to the non-empty state of their trash. Which in turn means that a disk can quickly and unwittingly be filled with unwanted files.
My current method of working around this is through the use of regular snapshots (what a tremendous feature of modern filesystems) alongside a per-subvolume trash folder removal script. Obviously, I’d prefer if I could simply empty trash, like I do with other filesystems. So I’ll finish rambling and get to the point:
- Is there anything I can do that would provide visual indication of a non-empty state on BTRFS subvolumes?
- Am I right to assume that visual indication of a non-empty state is provided by monitoring a list of expected trash directories?
- If so, what is preventing the trash folders from detected BTRFS subvolumes from showing up?