Automount Drive and Trash conflict

Hello everyone.

After a couple of decades of using windows, I found that Ms has more than crossed the line I feel comfortable with. I have been trying different distros for the last month and, to date, Garuda is the one I like the most. However, there are a couple of problems I haven't been able to fix myself nor find a solution online, so I am asking for help.

I use two drives: I one I keep the O.S., aps and games. The other holds my data I need to keep between installs and or in case of OS failure. I'd like to mount its folders as my user folders (Documents, downloads, videos, music...) as I had on Windows and KDE allows it. However the setting is lost between restarts as the drive must be manually mounted. To fix this, I modified "fstab" so the disk is automatically mounted during start up, witch indeed allowed me to keep my wished folder structure.

However that brought a VERY annoying problem: when I used to mount the drive manually, it had its own .Trash folder where deleted files were moved as expected. Now, deleted files are instead copied to my main drive which take a lot of time (I work often with videos of around 100 Gb) and will devastate its lifespan as it is an SSD.

I tryed mounting the drive in fstab with the lines:

"UUID="4CAA6027AA600FAE"      /home/antonio/Datos   ntfs   defaults   0   0"
and 
UUID="4CAA6027AA600FAE"      /run/media/antonio/WD10SPZX040SATA   ntfs   user

(this last one I write from memory so may not be 100% correct).

Both gibe me the same result (different mounting folders) the drive gets auto-mounted, my custom personal folders work, but the trashed files from the secondary drive are copied to the trash bin on the primary.

I even reinstalled clean today to no avail.

I beg for some help.

System:
Kernel: 5.18.6-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=810cddd0-3d54-45f7-88fa-84f8b12b1038 rw [email protected]
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
loglevel=3
Desktop: KDE Plasma v: 5.25.1 tk: Qt v: 5.15.5 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-I GAMING v: Rev 1.xx
serial: <superuser required> UEFI: American Megatrends v: 4602
date: 08/17/2021
CPU:
Info: model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2 gen: 3
built: 2020-22 process: TSMC n7 (7nm) family: 0x17 (23)
model-id: 0x71 (113) stepping: 0 microcode: 0x8701021
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 32 MiB desc: 2x16 MiB
Speed (MHz): avg: 4099 high: 4100 min/max: 2200/4426 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 4100 2: 4100
3: 4100 4: 4100 5: 4100 6: 4099 7: 4100 8: 4099 9: 4100 10: 4100 11: 4100
12: 4100 13: 4099 14: 4100 15: 4099 16: 4099 bogomips: 115198
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: mmio_stale_data status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Retpolines, IBPB: conditional, STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA 1
process: TSMC n7 (7nm) built: 2019-20 pcie: gen: 4 speed: 16 GT/s
lanes: 16 ports: active: DP-1,DP-3 empty: DP-2,HDMI-A-1 bus-ID: 09:00.0
chip-ID: 1002:731f class-ID: 0300
Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
bus-ID: 1-1:2 chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.2
compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting,radeon
alternate: fbdev,vesa gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 4480x1440 s-dpi: 96 s-size: 1185x381mm (46.65x15.00")
s-diag: 1245mm (49.01")
Monitor-1: DP-1 mapped: DisplayPort-0 pos: primary,top-right
model: MSI MAG274QRF-QD serial: <filter> built: 2021 res: 2560x1440
dpi: 109 gamma: 1.2 size: 597x336mm (23.5x13.23") diag: 685mm (27")
ratio: 16:9 modes: max: 2560x1440 min: 640x480
Monitor-2: DP-3 mapped: DisplayPort-2 pos: bottom-l model: AOC 2590G4
serial: <filter> built: 2019 res: 1920x1080 hz: 60 dpi: 90 gamma: 1.2
size: 544x303mm (21.42x11.93") diag: 623mm (24.5") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
OpenGL:
renderer: AMD Radeon RX 5700 (navi10 LLVM 13.0.1 DRM 3.46 5.18.6-zen1-1-zen)
v: 4.6 Mesa 22.1.2 direct render: Yes
Audio:
Device-1: AMD Navi 10 HDMI Audio driver: snd_hda_intel v: kernel
bus-ID: 1-1:2 pcie: chip-ID: 046d:0825 gen: 4 speed: 16 GT/s class-ID: 0102
lanes: 16 serial: <filter> bus-ID: 09:00.1 chip-ID: 1002:ab38
class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 0b:00.4 chip-ID: 1022:1487 class-ID: 0403
Device-3: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
Device-4: Logitech G432 Gaming Headset type: USB
driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-2:3 chip-ID: 046d:0a9c
class-ID: 0300 serial: <filter>
Sound Server-1: ALSA v: k5.18.6-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 16.1 running: no
Sound Server-3: PipeWire v: 0.3.52 running: yes
Network:
Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 04:00.0
chip-ID: 8086:1539 class-ID: 0200
IF: enp4s0 state: down mac: <filter>
Device-2: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter vendor: ASUSTeK
driver: rtw_8822be v: N/A modules: rtw88_8822be pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: c000 bus-ID: 05:00.0 chip-ID: 10ec:b822
class-ID: 0280
IF: wlp5s0 state: up mac: <filter>
Bluetooth:
Device-1: ASUSTek Bluetooth Radio type: USB driver: btusb v: 0.8
bus-ID: 1-8:5 chip-ID: 0b05:185c class-ID: e001 serial: <filter>
Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter>
Drives:
Local Storage: total: 1.84 TiB used: 902.26 GiB (47.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: A-Data model: SX8200PNP
size: 953.87 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: S0118C
temp: 35.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WD10SPZX-00Z10T0 size: 931.51 GiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
rev: 1A01 scheme: MBR
Partition:
ID-1: / raw-size: 953.57 GiB size: 953.57 GiB (100.00%)
used: 101.86 GiB (10.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 608 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 953.57 GiB size: 953.57 GiB (100.00%)
used: 101.86 GiB (10.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 953.57 GiB size: 953.57 GiB (100.00%)
used: 101.86 GiB (10.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 953.57 GiB size: 953.57 GiB (100.00%)
used: 101.86 GiB (10.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.54 GiB used: 1.85 GiB (11.9%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 45.0 C mobo: 56.0 C gpu: amdgpu temp: 50.0 C
mem: 58.0 C
Fan Speeds (RPM): cpu: 680 case-1: 707 gpu: amdgpu fan: 862
Power: 12v: 9.97 5v: N/A 3.3v: N/A vbat: 3.23 gpu: amdgpu watts: 39.00
Info:
Processes: 381 Uptime: 3h 19m wakeups: 0 Memory: 15.54 GiB
used: 6.24 GiB (40.1%) Init: systemd v: 251 default: graphical
tool: systemctl Compilers: gcc: 12.1.0 clang: 13.0.1 Packages: pacman: 1886
lib: 547 Shell: fish v: 3.4.1 default: Bash v: 5.1.16 running-in: konsole
inxi: 3.3.19
Garuda (2.6.4-2):
System install date:     2022-06-25
Last full system update: 2022-06-25
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Snapper
Failed units:

Welcome :slight_smile:

Please read

Check if gnome-disk-utility could help.

2 Likes

If the disk does not have a trash, you can make one. As long as it follows these standards, it should work: Trash specification

I have never made one--typically I find they are there automatically--but since it sounds like you don't have one, some key notes to bear in mine while you make it:

  • The specification calls for trash to be named/located as $topdir/.Trash-$uid. Typically a trash on an external drive would be named .Trash-1000
  • The "sticky bit" in the permissions must be applied, and all users who need to use the trash will obviously need write access
  • The trash directory itself should have two directories within, files/ and info/.

As long as you set up your trash directory correctly, according to the specifications, my impression is that it should work without additional configuration. Whatever file explorer you are using should be checking automatically for topdir/.Trash and using it according to the trash specifications if found.

Alternatively, you could look into one of these trash management programs to help you: Trash management - ArchWiki

2 Likes

Thank you very much for your answer.

That one was one of the possible solutions I tried before posting. You see, the Trash folder existed all the time. It worked before setting the auto-mount, didn't work with auto-mount enabled and once set back to manual, it worked again -some times-

Of course, it could be just me failing to apply the solution properly due to my noobness, so I'm not discrediting your method. It just didn't work for me.

Thanks for your answer.

It seems that gnome-disk-utility was what I needed. It also modified the fstab, but added a few more parameters that might be what was missing for the OS to apply the desired settings.

Best regards.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.