Page 1 of 1
Solved: TRASH not working for second drive
Posted: Sun Apr 10, 2022 5:58 am
by mehargags
Hi all,
If I mount a second drive (/mnt/2nd) to my Linux machine, the TRASH doesn't work for it. If I delete anything on the /mnt/2nd, it shows a warning (screen attached)
Code: Select all
Some files cannot be moved to trash because the underlying file system doesn't support this operation. Do you want to delete them instead?
The second drive is formatted with ext4 just as the first one with /boot and /home.
in my fstab the 2nd drive is mounted as
Code: Select all
UUID=9bfc50ed-edab-4ea6-9497-a506e3aa0202 /mnt/2nd ext4 errors=remount-ro,nofail,x-gvfs-show,x-gvfs-name=2nd 0 3
Ideally both drives should use their 'respective' .Trash and when I EMPTY TRASH it should empty for both drives.
Please help me configure this as required.
Thanks
Re: TRASH not working for second drive
Posted: Sun Apr 10, 2022 8:04 am
by drooly
Ah yes, that's a very old discussion. There are reasons for or against doing it like that.
FWIW, it _should_ work on an ext4 drive, so check this:
https://unix.stackexchange.com/a/448886
or this:
https://www.reddit.com/r/Ubuntu/comment ... rnal_hard/
Also look at this:
https://wiki.archlinux.org/title/Trash_ ... nal_drives
and ultimately this:
https://manpages.ubuntu.com/manpages/tr ... ash.1.html
and this:
https://specifications.freedesktop.org/ ... atest.html
mehargags wrote: ↑Sun Apr 10, 2022 5:58 amIf I mount a second drive (/mnt/2nd) to my Linux machine, the TRASH doesn't work for it. If I delete anything on the /mnt/2nd, it shows a warning (screen attached)
Code: Select all
Some files cannot be moved to trash because the underlying file system doesn't support this operation. Do you want to delete them instead?
The second drive is formatted with ext4 just as the first one with /boot and /home.
in my fstab the 2nd drive is mounted as
Code: Select all
UUID=9bfc50ed-edab-4ea6-9497-a506e3aa0202 /mnt/2nd ext4 errors=remount-ro,nofail,x-gvfs-show,x-gvfs-name=2nd 0 3
Ideally both drives should use their 'respective' .Trash and when I EMPTY TRASH it should empty for both drives.
Please help me configure this as required.
Re: Solved: TRASH not working for second drive
Posted: Sun Apr 10, 2022 11:22 am
by mehargags
Thanks @drooly for all the pointers. I had gone through heeps but knew it would be something stupidly simple. I just removed all the extra parameters from fstab and mounted my second partition like the first one was, rebooted and TRASH works absolutely fine. I guess the internet copy/paste I had been using is old and obsolete.
Here is new fstab that works great now:
Code: Select all
proc /proc proc defaults 0 0
# /dev/nvme0n1p1
UUID=ab2951ce-5bd5-4b8d-82a1-d8bdd4c832ed none swap sw 0 0
# /dev/nvme0n1p2
UUID=2fcac883-3ba5-4670-9445-f519974f9e31 /boot ext3 defaults 0 0
# /dev/nvme0n1p3
UUID=f63e8882-7e5b-4cc8-99fe-d3a1e7781ca4 / ext4 defaults 0 0
# 2nd 1TB Drive
UUID=9bfc50ed-edab-4ea6-9497-a506e3aa0202 /mnt/2nd ext4 defaults 0 0
Re: Solved: TRASH not working for second drive
Posted: Wed Apr 13, 2022 4:52 am
by drooly
Great, thanks for sharing the solution!