mergerfs
mergerfs copied to clipboard
delte a file , delete more than once
Describe the bug
assume that i got 2 files with same name on mount1 and mount2 , if i put one of them in the trash , the two files are deleted .
The master branch is not to be considered production ready. Feel free to file bug reports but do so indicating clearly that you are testing unreleased code.
To Reproduce
create 2 files on two mount points and delete only one . the 2 are deleted .
Expected behavior
it would be wondefull if , in the case of , there are 2 files with same name , to rename them with mountpoint . exemple : file_name_mountpoint1 and file_name_mountpoint2 so we can delete only one , or the 2 files if necessary .
System information:
-
OS, kernel version: `Linux iznobe-PC 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
-
mergerfs version:
iznobe@iznobe-PC:~$ mergerfs -V mergerfs version: 2.33.5-14-g83d7886 iznobe@iznobe-PC:~$
-
mergerfs settings
-
List of drives, filesystems, & sizes:
iznobe@iznobe-PC:~$ df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
tmpfs 3,2G 12M 3,2G 1% /run
/dev/nvme0n1p5 30G 23G 6,1G 79% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
mergerfsPool 14T 5,9T 8,1T 42% /Vidéos
/dev/nvme0n1p3 96M 37M 60M 38% /boot/efi
/dev/sdd1 7,3T 685G 6,6T 10% /media/WD8PRO1
/dev/sdb1 6,7T 5,5T 1,2T 83% /mnt/DATAS/Vidéos/WD8
/dev/sde1 7,3T 314G 7,0T 5% /mnt/DATAS/Vidéos/WD8PRO2
tmpfs 1,0G 34M 991M 4% /home/iznobe/.cache
tmpfs 28G 0 28G 0% /media/ramdisk
tmpfs 12G 8,0K 12G 1% /tmp
tmpfs 1,0G 504K 1,0G 1% /var/log
tmpfs 12G 0 12G 0% /var/tmp
/dev/sdc3 2,7T 710G 2,0T 27% /datas
tmpfs 3,2G 1,7M 3,2G 1% /run/user/1000
iznobe@iznobe-PC:~$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 ext4 1.0 Seagate_4T 4f8cc284-cd84-4eeb-b412-7539f81664c4
└─sda4 ext3 1.0 ubuntu_22.10 89f71135-b459-4c74-bfa3-e9d27df4369d
sdb
├─sdb1 ext4 1.0 WD8 1db8a5b3-ff12-4d31-9463-b188ffefe43b 1,2T 82% /mnt/DATAS/Vidéos/WD8
└─sdb2 ext4 1.0 SAUV d9dc9f4e-a24a-4573-9465-13711480f272
sdc
├─sdc3 ext4 1.0 datas 01c9b796-0869-4ff9-a2a1-6c0f56ed5257 2T 26% /datas
└─sdc4 swap 1 61218fe2-0bd1-4ada-9dd3-5ec996a02456 [SWAP]
sdd
└─sdd1 ext4 1.0 WD8PRO1 6298e7b7-7e63-4f5c-8216-ab1f70a1876d 6,6T 9% /media/WD8PRO1
sde
└─sde1 ext4 1.0 WD8PRO2 084604bc-1b9e-4cdd-bae4-ac9a9fe1303f 6,9T 4% /mnt/DATAS/Vidéos/WD8PRO2
zram0 [SWAP]
nvme0n1
├─nvme0n1p1 ntfs windows_10 08CCB0D8CCB0C0EC
├─nvme0n1p2 ntfs E49A115A9A112B16
├─nvme0n1p3 vfat FAT32 SSD_EFI_WIN C071-9050 59,6M 38% /boot/efi
├─nvme0n1p4 ntfs 0E52DDB352DD9FAF
├─nvme0n1p5 ext4 1.0 LM_21_SSD eb18366b-2ac9-4a7e-8f93-ba2caa30e90e 6,1G 75% /
├─nvme0n1p6 ext4 1.0 ubuntu_18_SSD 06bc0f51-50e8-4ed4-8090-903acdb7df3f
├─nvme0n1p7 ext4 1.0 budgie_SSD 8ab22881-60b3-47aa-a0bf-54c292afae81
├─nvme0n1p8 ext4 1.0 ubuntu_20.04_SSD dca54497-1ab2-4c12-bc82-53b817300288
└─nvme0n1p9 ext4 1.0 LM_SSD_NEW df3cd676-80e7-46ef-a28e-5dbe3ea5ddf7
iznobe@iznobe-PC:~$ strace -fvTtt -s 256 -o /tmp/app.strace.txt
strace: must have PROG [ARGS] or -p PID
Try 'strace -h' for more information.
iznobe@iznobe-PC:~$
iznobe@iznobe-PC:~$ grep -v ^# /etc/fstab
UUID=eb18366b-2ac9-4a7e-8f93-ba2caa30e90e / ext4 noatime,errors=remount-ro 0 1
UUID=C071-9050 /boot/efi vfat defaults 0 0
UUID=61218fe2-0bd1-4ada-9dd3-5ec996a02456 none swap sw,pri=1 0 0
UUID=01c9b796-0869-4ff9-a2a1-6c0f56ed5257 /datas ext4 defaults 0 0
LABEL=WD8 /mnt/DATAS/Vidéos/WD8 ext4 defaults 0 0
LABEL=WD8PRO2 /mnt/DATAS/Vidéos/WD8PRO2 ext4 defaults 0 0
LABEL=Seagate_4T /media/Seagate_4T ext4 defaults,noauto 0 0
LABEL=WD8PRO1 /media/WD8PRO1 ext4 defaults 0 0
/mnt/DATAS/Vidéos/* /Vidéos fuse.mergerfs threads=16,allow_other,use_ino,cache.files=off,dropcacheonclose=true,category.create=mfs,moveonenospc=true,minfreespace=20G,fsname=mergerfsPool,nonempty 0 0
tmpfs /tmp tmpfs defaults,noatime,size=12G 0 0
tmpfs /var/tmp tmpfs defaults,noatime,size=12G 0 0
tmpfs /var/log tmpfs defaults,nosuid,nodev,noatime,mode=0755,size=1g
tmpfs /home/iznobe/.cache tmpfs defaults,uid=1000,gid=1000,size=1g,noatime 0 0
tmpfs /media/ramdisk tmpfs rw,noatime,size=28G 0 0
iznobe@iznobe-PC:~$
I'm sorry but I don't know what you're talking about.
ok , so i create 2 files " txt.txt " in each mount point :
iznobe@iznobe-PC:~$ ls -l /mnt/DATAS/Vidéos/WD8/films | grep txt
-rw-rw-r-- 1 iznobe iznobe 0 sept. 14 16:07 txt.txt
iznobe@iznobe-PC:~$ ls -l /mnt/DATAS/Vidéos/WD8PRO2/films | grep txt
-rw-rw-r-- 1 iznobe iznobe 0 sept. 14 16:07 txt.txt
iznobe@iznobe-PC:~$ ls -l /Vidéos/films | grep txt
-rw-rw-r-- 1 iznobe iznobe 0 sept. 14 16:07 txt.txt
iznobe@iznobe-PC:~$ grep mergerfs /etc/fstab
# montage mergerfs , voir : https://forum.ubuntu-fr.org/viewtopic.php?id=2075424
# https://github.com/trapexit/mergerfs https://zackreed.me/mergerfs-another-good-option-to-pool-your-snapraid-disks/
/mnt/DATAS/Vidéos/* /Vidéos fuse.mergerfs threads=16,allow_other,use_ino,cache.files=off,dropcacheonclose=true,category.create=mfs,moveonenospc=true,minfreespace=20G,fsname=mergerfsPool,nonempty 0 0
iznobe@iznobe-PC:~$
now in the mergerfs pool ( /Vidéos ) , i put the file " txt.txt " in the trash ( only one file ) , and result is :
iznobe@iznobe-PC:~$ ls -l /mnt/DATAS/Vidéos/WD8PRO2/films | grep txt
iznobe@iznobe-PC:~$ ls -l /mnt/DATAS/Vidéos/WD8/films | grep txt
iznobe@iznobe-PC:~$ ls -l /Vidéos/films | grep txt
iznobe@iznobe-PC:~$
iznobe@iznobe-PC:~$ ls -l /mnt/DATAS/Vidéos/WD8/.Trash-1000/files
total 0
-rw-rw-r-- 1 iznobe iznobe 0 sept. 14 16:07 txt.txt
iznobe@iznobe-PC:~$ ls -l /mnt/DATAS/Vidéos/WD8PRO2/.Trash-1000/files
total 0
-rw-rw-r-- 1 iznobe iznobe 0 sept. 14 16:07 txt.txt
iznobe@iznobe-PC:~$ ls -l /Vidéos/.Trash-1000/files
total 0
-rw-rw-r-- 1 iznobe iznobe 0 sept. 14 16:07 txt.txt
iznobe@iznobe-PC:~$
two different files with same name are put in the trash and deleted , on in each mountpoint .
see what i have in trash : https://zupimages.net/up/22/47/phyn.png and what trash cli give :
iznobe@iznobe-PC:~$ trash-list
2022-11-24 22:52:09 /Vidéos/films/text
2022-11-24 22:52:09 /mnt/DATAS/Vidéos/WD8PRO2/films/text
iznobe@iznobe-PC:~$
i f i choose to empty trash , i lost the 3 files given in the screen shoot . so one file in the mergerfs pool , one file in each " real " mount point as i described before .
tested multiple times , each test give same result in my case , even if files have same name , but not identical .
The freedesktop trash standard works in a specific way. I don't know if that can be done without breaking it or very carefully tweaking behavior of everything happening in .Trash. And it's not that simple... I can't not rename something to the target.
https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html
Yeah. File names can be made unique but then custom .trashinfo files would have to be created. "trashing" a file is a custom combination of behaviors. All done slightly differently depending on the app doing the trashing.
Only thing I can think of is trying to notice a move to .Trash/files/
and if the policy finds multiple sources to rename implement my own trashinfo files. Maybe someday but there are a bunch of other things I'm working on right now.
In your example, are the txt.txt files in the same path relative to the mergerFS folder fuse mountpoint thing, or in completely different paths on each disk?
Same relative path. That's the only way it makes any sense.