Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report invalid branches #1360

Open
sprat opened this issue Oct 1, 2024 · 3 comments
Open

Report invalid branches #1360

sprat opened this issue Oct 1, 2024 · 3 comments

Comments

@sprat
Copy link

sprat commented Oct 1, 2024

Is your feature request related to a problem? Please describe.

I had a hard time troubleshooting a problem that was due to a mistake from me where I had no valid branch in my mergerfs call:

$ mkdir /mnt/storage
$ mergerfs /nonexistent1:/nonexistent2 /mnt/storage
mergerfs[9]: threadpool (fuse.read): spawning 8 threads w/ max queue depth 8
mergerfs[9]: running basic garbage collection
$ mergerfs[9]: read-thread-count=8; process-thread-count=-1; process-thread-queue-depth=-1; pin-threads=false;

$ ls /mnt/
ls: /mnt/storage: No such file or directory
$ mkdir /mnt/storage
mkdir: can't create directory '/mnt/storage': File exists

Note that it's easy to get into this situation when we use wildcard in branches (/media/data* in my case) but nothing matches the wildcard expression

Describe the solution you'd like

Ideally, I would like to get an error message (or a warning at least!) when I call the mount command with invalid branches directories.

Describe alternatives you've considered

None

Additional context

mergerfs v2.40.2

@trapexit
Copy link
Owner

trapexit commented Oct 1, 2024

No branches is technically not invalid but I can add a warning.

@sprat
Copy link
Author

sprat commented Oct 1, 2024

Yes, I understand that it may be a use case to have nonexistent directories at first, and have those directories created and mounted after mergerfs is started, that's why I suggested a warning at least ;)

@sprat
Copy link
Author

sprat commented Oct 1, 2024

I would say:

  • for /media/data*: report a warning if there are no matches
  • for /nonexistent1:/nonexistent2:/mnt: report a warning for any branch that does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@trapexit @sprat and others