trapexit / mergerfs

a featureful union filesystem
http://spawn.link
Other
4.31k stars 174 forks source link

unable to create new files (touch: cannot touch 'test': Not a directory) #1316

Closed Betonhaus closed 8 months ago

Betonhaus commented 8 months ago

As of sometime this morning my mergerfs data pool will no longer let me create any files or move new files to it. I can rename, move, and delete existing files within the pool but attempting to move anything results in a "not a directory" error

data pool and the original folders have full read-write access

if i go to the data pool's root folder and execute "touch test", i get the error "touch: cannot touch 'test': Not a directory" if i run "mkdir test" i get the error "mkdir: cannot create directory ‘test’: Not a directory" if i go to each disk and do touch test in each one the operation is successful and the touch is visible in the pool i am able to move all files into any folder, rename the files, and delete them

i should be able to create files without issue

System information: Linux teresa 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux mergerfs v2.38.0

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/disk/by-uuid/8bae2d90-a810-4042-b45a-bef34a591824    /disk/1    ext4    defaults    0    0
/dev/disk/by-uuid/4bd1b514-4c93-48d6-a389-4f1380fa5765    /disk/0    ext4    defaults    0    0
/dev/disk/by-uuid/c548639a-b016-4864-bc27-37eada661c49    /disk/2    ext4    defaults    0    0
/dev/disk/by-uuid/dad0aa9b-33db-4631-9ace-64cecb056e0c    /disk/7    ext4    defaults    0    0

/disk/* /data fuse.mergerfs cache.files=auto-full,dropcacheonclose=true,category.create=mfs,moveonenospc=true,minfreespace=20G,fsname=mergerfsPool,nonempty 0 0

This was working yesterday as I was able to download a couple large collection of files and add them to the storage pool, i don't know what could've changed

trapexit commented 8 months ago

Please follow the instructions in the ticket template and the documentation: https://github.com/trapexit/mergerfs#support

I can not help you if you don't provide sufficient information.

Betonhaus commented 8 months ago

app.strace.txt unable to make the mergerfs strace

root@teresa:/data# strace -fvTtt -s 256 -p 260 -o /tmp/mergerfs.strace.txt
strace: Can't fopen '/tmp/mergerfs.strace.txt': Permission denied
root@teresa:/data# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.8G     0  7.8G   0% /dev
tmpfs           1.6G  2.3M  1.6G   1% /run
/dev/sde1       916G   25G  845G   3% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
mergerfsPool     16T   11T  3.7T  75% /data
/dev/sdb1       3.6T  2.7T  768G  78% /disk/1
/dev/sdc1       3.6T  2.7T  768G  78% /disk/0
/dev/sdd1       1.8T  1.1T  615G  65% /disk/7
/dev/sda1       5.5T  4.4T  764G  86% /disk/2
tmpfs           1.6G     0  1.6G   0% /run/user/1000

and the command that fails is literally "touch"

is there any oher information you need?

trapexit commented 8 months ago

if you are root and can't open a file on /tmp something is wrong with your setup.

the info I need is described in the docs. the point of them is for me not to need to repeat myself every support request.

Betonhaus commented 8 months ago

I figured out the issue as it was obvious in retrospect. in the /disk folder i had a README file that contained notes for how to add a new disk to the pool. it never caused an issue, until the free space of all the drives dropped below the free space of my boot drive that the /disk folder was in. I removed the README file and rebooted and everything is fine.

trapexit commented 8 months ago

Perhaps I can add a check evaluating the glob to ignore non-directories.

Betonhaus commented 8 months ago

I was advised that changing the line in fstab from /disk/ to /disk// should also fix that.