How to get Dolphin/Plasma to use .Trash-1000 directory on zfs dataset

Hello,

Dolphin/Plasma (not sure where the fault lies) does not seem to recognize external mounted zfs volumes as removable media. They don’t appear in the sidebar nor in the trash settings. As such, if I try to move anything to the trash on a zfs volume, it tries to copy it to the trash in my home directory.

I set the zfs mountpoint to /media/myuser/myZFSvolume and created a .Trash-1000 directory (/media/myuser/myZFSvolume/.Trash-1000) with the correct permissions (chmod 700), but still no luck.

For comparison, nautilus recognizes this zfs volume as removable media and properly uses its .Trash-1000.

Can someone explain how to get Dolphin/Plasma to recognize a mountpoint as an external removable volume?

And apologies in advance if I’ve used any terminology here incorrectly.

That’s bugs.

Regarding the trash.

The bug must be somethere or in Kmountpoint:

Can you share the result of command mount

And about dolphin not showing in places panel, this is probably a bug in solid.

Could run solid-hardware6 list command (might be solid-hardware for your distro?).

Then in the output try to identify your partition, it should start with something like: /org/freedesktop/UDisks2/block_devices/

And copy the udi value for it and run
solid-hardware6 details <UDI>

For instance on my local partition, that is:

$ solid-hardware6 details /org/freedesktop/UDisks2/block_devices/nvme0n1p2
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p2'
  parent = '/org/freedesktop/UDisks2/drives/SKHynix_HFS002TEJ9X162N_ASCAN41151CA9AG08' (string)
  vendor = '' (string)
  product = 'SKHynix_HFS002TEJ9X162N' (string)
  description = 'Lecteur chiffré de 1,9 Tio' (string)
  icon = 'drive-harddisk' (string)
  Block.major = 259  (0x103)  (int)
  Block.minor = 2  (0x2)  (int)
  Block.device = '/dev/nvme0n1p2' (string)
  StorageAccess.accessible = false (bool)
  StorageAccess.filePath = '' (string)
  StorageAccess.ignored = true (bool)
  StorageAccess.encrypted = true (bool)
  StorageVolume.ignored = false (bool)
  StorageVolume.usage = 'Encrypted'  (0x5)  (enum)
  StorageVolume.fsType = 'crypto_LUKS' (string)
  StorageVolume.label = '' (string)
  StorageVolume.uuid = 'f0eb2a01-98e5-49cb-9fe8-81059d33c155' (string)
  StorageVolume.size = 2047333105664  (0x1dcae900000)  (qulonglong)

udisksctl dump

This should be good to qualify the bug.

I ran into the same issue; zfs volume doesn’t show up in dolphin and deleted files get moved to the root filesystem.

$ zpool status
  pool: LinuxData
 state: ONLINE
  scan: scrub repaired 0B in 01:16:02 with 0 errors on Thu Aug 29 20:41:19 2024
config:

        NAME                                       STATE     READ WRITE CKSUM
        LinuxData                                  ONLINE       0     0     0
          mirror-0                                 ONLINE       0     0     0
            ata-Verbatim_Vi550_S3_493553488990455  ONLINE       0     0     0
            ata-Verbatim_Vi550_S3_493554108891071  ONLINE       0     0     0
$ mount -l | grep LinuxData
LinuxData on /media/LinuxData type zfs (rw,xattr,noacl,casesensitive)

in solid-hardware only the physical devices and the zfs member partitions show up. nothing related to zfs volumes.

$ solid-hardware5 list | grep Disk
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p1'
udi = '/org/freedesktop/UDisks2/block_devices/loop5'
udi = '/org/freedesktop/UDisks2/block_devices/loop2'
udi = '/org/freedesktop/UDisks2/block_devices/loop7'
udi = '/org/freedesktop/UDisks2/block_devices/sda1'
udi = '/org/freedesktop/UDisks2/block_devices/sda'
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p3'
udi = '/org/freedesktop/UDisks2/block_devices/nvme1n1p1'
udi = '/org/freedesktop/UDisks2/block_devices/sda9'
udi = '/org/freedesktop/UDisks2/block_devices/loop4'
udi = '/org/freedesktop/UDisks2/block_devices/loop1'
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1'
udi = '/org/freedesktop/UDisks2/block_devices/sdb1'
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p5'
udi = '/org/freedesktop/UDisks2/block_devices/sdb9'
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p2'
udi = '/org/freedesktop/UDisks2/block_devices/loop6'
udi = '/org/freedesktop/UDisks2/block_devices/loop3'
udi = '/org/freedesktop/UDisks2/block_devices/loop0'
udi = '/org/freedesktop/UDisks2/block_devices/nvme1n1'
udi = '/org/freedesktop/UDisks2/block_devices/sdb'
udi = '/org/freedesktop/UDisks2/block_devices/nvme0n1p4'
udi = '/org/freedesktop/UDisks2/block_devices/nvme1n1p2'
udi = '/org/freedesktop/UDisks2/drives/WD_BLACK_SN850X_HS_2000GB_231702801571'
udi = '/org/freedesktop/UDisks2/drives/Samsung_SSD_960_EVO_1TB_S3ETNX0J208407W'
udi = '/org/freedesktop/UDisks2/drives/Verbatim_Vi550_S3_493553488990455'
udi = '/org/freedesktop/UDisks2/drives/Verbatim_Vi550_S3_493554108891071

I also have the issue of Dolphin refusing to use the trash on zfs, it moves files to the trash in my ext4 partition on another drive, so it takes ages to physically move big files.
We’re talking about files being deleted while browsing inside this mount with dolphin :

gaming_pool/gaming_fs on /gaming_pool/gaming_fs type zfs (rw,relatime,xattr,noacl,caseinsensitive)

The whole trash tree is here and has nice rights

_>find /gaming_pool/gaming_fs/.Trash-1000/ -type d -exec stat --format '%n %a' {} +
/gaming_pool/gaming_fs/.Trash-1000/ 700
/gaming_pool/gaming_fs/.Trash-1000/info 700
/gaming_pool/gaming_fs/.Trash-1000/files 700

And here is the result of mount

_>mount
/dev/nvme0n1p2 on / type ext4 (rw,noatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=4096k,nr_inodes=4068891,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=6537896k,nr_inodes=819200,mode=755,inode64)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16467)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-journald.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-udev-load-credentials.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-sysctl.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-tmpfiles-setup-dev-early.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-tmpfiles-setup-dev.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-vconsole-setup.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /tmp type tmpfs (rw,noatime,inode64)
/dev/nvme0n1p1 on /efi type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sdb2 on /run/media/WinE type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
tmpfs on /run/credentials/systemd-tmpfiles-setup.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3268944k,nr_inodes=817236,mode=700,uid=1000,gid=1000,inode64)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
gaming_pool on /gaming_pool type zfs (rw,relatime,xattr,noacl,casesensitive)
gaming_pool/gaming_fs on /gaming_pool/gaming_fs type zfs (rw,relatime,xattr,noacl,caseinsensitive)
kio-fuse on /run/user/1000/kio-fuse-TSCmXi type fuse.kio-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)