trash is not working on mounted btrfs subvol (internal system mounts message)
Greetings,
Maybe related:
It looks like the issue might be related to this commit. There was an arch bug filed (closed as upstream) and at least a couple of forum posts on the same issue.
I want to open this for a fundamental and practical inquiry.
-
Fundamental: I don't understand listing /mnt and /media as not relevant to the casual user. I see loads of tutorials suggesting /media/foo and /mnt/bar as reasonable mount points. Granted, I don't know the full implications of that function and what else relies on it, but deciding that a user can't trash files from one of these locations seems... odd. Maybe the others, sure, but I think /mnt and /media are fair game, assuming the right permissions exist. And for my use-case, I'm not prevented from deleting, just trashing. So doing this for "protection" doesn't seem to make sense.
-
Practical: why is this happening?
Background on my system, running arch linux. Trash works fine in ~, but was forcing full on deletion for /mnt/vault, symlinked to ~/vault.
# fdisk -l
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 1050623 1048576 512M EFI System /boot/efi)
/dev/nvme1n1p2 1050624 3147775 2097152 1G Linux filesystem /boot)
/dev/nvme1n1p3 3147776 488397134 485249359 231.4G Linux filesystem cryptsetup root, formatted btrfs
$ mount
/dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 on / type btrfs (rw,relatime,compress=lzo,ssd,discard,space_cache,subvolid=266,subvol=/arch)
/dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 on /home/jwhendy type btrfs (rw,relatime,compress=lzo,ssd,discard,space_cache,subvolid=267,subvol=/jwhendy)
/dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 on /mnt/vault type btrfs (rw,relatime,compress=lzo,ssd,discard,space_cache,subvolid=268,subvol=/vault)
$ ls -l /mnt
drwxr-xr-x 1 jwhendy jwhendy 114 Jul 31 14:02 vault
$ ls -la /mnt/vault
drwxrwxrwt 1 jwhendy jwhendy 34 Jul 31 13:52 .Trash-1000
$ id
uid=1000(jwhendy) gid=1000(jwhendy) groups=1000(jwhendy),54(lock),973(realtime),987(uucp),991(lp),993(input),995(audio),998(wheel)
$ pacman -Ss gvfs
extra/gvfs 1.40.2-1 (gnome) [installed]
Virtual filesystem implementation for GIO
Once I found the system internal error, I tried this and don't understand.
$ cd ~
$ sudo umount /mnt/vault
$ rm ./vault
$ mkdir ./vault
$ sudo mount -o subvol=vault /dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 ./vault
$ touch home-dir-test.txt
$ gio trash ./home-dir-test.txt # shows up in ~/.local/share/Trash
$ touch ./vault/vault-test.txt
$ gio trash ./vault/vault-test.txt
gio: file:///home/jwhendy/vault/vault-test.txt: Trashing on system internal mounts is not supported
$ mount
/dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 on /home/jwhendy type btrfs (rw,relatime,compress=lzo,ssd,discard,space_cache,subvolid=267,subvol=/jwhendy)
/dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 on /home/jwhendy/vault type btrfs (rw,relatime,compress=lzo,ssd,discard,space_cache,subvolid=268,subvol=/vault)
What's going on here? If It were just an issue with /mnt
, I'd have changed my mountpoint and gone on with life, but it seems something else is awry.
For what it's worth, someone suggested dolphin, which I tried. It trashes from /mnt/vault/foo.txt
to ~/.local/share/Trash
with no issues.