mirror of https://github.com/trapexit/mergerfs.git
Browse Source
Merge pull request #1441 from trapexit/docs
Merge pull request #1441 from trapexit/docs
Add doc pages for minfreespace and moveonenospc + other misc updatespull/1443/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 170 additions and 70 deletions
-
7mkdocs/docs/config/branches.md
-
36mkdocs/docs/config/functions_categories_policies.md
-
20mkdocs/docs/config/minfreespace.md
-
46mkdocs/docs/config/moveonenospc.md
-
17mkdocs/docs/config/options.md
-
22mkdocs/docs/faq/have_you_considered.md
-
33mkdocs/docs/faq/technical_behavior_and_limitations.md
-
56mkdocs/docs/faq/why_isnt_it_working.md
-
3mkdocs/mkdocs.yml
@ -0,0 +1,20 @@ |
|||||
|
# minfreespace |
||||
|
|
||||
|
default: `4G` |
||||
|
|
||||
|
`minfreespace` is used to set a minimum free space threshold when |
||||
|
running create [policies](functions_categories_policies.md). Any |
||||
|
branch with free space less than the `minfreespace` value will be |
||||
|
skipped. This is the global default but individual branches can [have |
||||
|
their own value.](branches.md#minfreespace). |
||||
|
|
||||
|
This is useful for a couple reasons. |
||||
|
|
||||
|
* Since mergerfs does not split files across branches it is best to |
||||
|
leave space to write a newly created file on a branch to minimize |
||||
|
the risk of running out of space and needing |
||||
|
[moveonenospc](moveonenospc.md). |
||||
|
* Some filesystems' performance degrades when filled. `minfreespace` |
||||
|
provides a buffer so they are less likely to be filled. |
||||
|
* Similar to `ext4`'s reserved space option it minimizes the problems |
||||
|
that come from running out of space. |
@ -0,0 +1,46 @@ |
|||||
|
# moveonenospc |
||||
|
|
||||
|
When writing to a file a [number of |
||||
|
errors](https://man7.org/linux/man-pages/man2/write.2.html#ERRORS) are |
||||
|
possible. The `ENOSPC` error indicates their is no room for the |
||||
|
data. That could be true due to the filesystem having actually no |
||||
|
available space for data, or because a secondary resource (such as |
||||
|
inodes) has been used up, or the filesystem might have a quota feature |
||||
|
that is limiting how much storage a particular user may use, or (as on |
||||
|
`ext4` there might be a feature which reserves space for privileged |
||||
|
processes. |
||||
|
|
||||
|
Since mergerfs [does not offer](../index.md#non-features) splitting of |
||||
|
files across filesystems there are situations where a file is opened |
||||
|
or created on a filesystem which is nearly full and eventually |
||||
|
receives a `ENOSPC` error despite the pool having capacity. The |
||||
|
`moveonenospc` feature allows the user to have some control over this |
||||
|
situation. |
||||
|
|
||||
|
When enabled and a `write` fails with `ENOSPC` or `EDQUOT` mergerfs |
||||
|
will: |
||||
|
|
||||
|
1. Run the policy defined by `moveonenospc` to find a target branch. |
||||
|
2. ["Move"](../faq/technical_behavior_and_limitations.md#how-does-mergerfs-handle-moving-and-copying-of-files) |
||||
|
the file from the source branch to the target branch. |
||||
|
3. Retry the `write` and continue on as normal. |
||||
|
|
||||
|
If at any point something fails the progress so far will be cleaned up |
||||
|
as appropriate and the original error returned. |
||||
|
|
||||
|
If `moveonenospc` is disabled the underlying error will be returned. |
||||
|
|
||||
|
NOTE: This feature has NO affect on policies. It ONLY applies to the |
||||
|
literal write function. If the create function returns `ENOSPC` or the |
||||
|
[policy returns `ENOSPC`](functions_categories_policies.md#filtering) |
||||
|
that error will be returned back to the application making the |
||||
|
`create` request. |
||||
|
|
||||
|
|
||||
|
## Additional Reading |
||||
|
|
||||
|
* [Functions, Categories, Policies](functions_categories_policies.md) |
||||
|
* [Why do I get an "out of space" / "no space left on device" / ENOSPC |
||||
|
error even though there appears to be lots of space |
||||
|
available?](../faq/why_isnt_it_working.md#why-do-i-get-an-out-of-space-no-space-left-on-device-enospc-error-even-though-there-appears-to-be-lots-of-space-available) |
||||
|
|
@ -0,0 +1,22 @@ |
|||||
|
# "Have You Considered?" |
||||
|
|
||||
|
## Have you considered limiting drive spinup? |
||||
|
|
||||
|
Yes. See [Limiting Drive Spinup](limit_drive_spinup.md). |
||||
|
|
||||
|
|
||||
|
## Have you considered porting to MacOS? |
||||
|
|
||||
|
Yes, but the FUSE implementation on MacOS has gotten a bit complicated |
||||
|
and fragmented. I'm not opposed to supporting it but given the low |
||||
|
demand, lack of the author having a modern MacOS system, the fact |
||||
|
mergerfs does not use standard |
||||
|
[libfuse](https://github.com/libfuse/libfuse) API, and MacOS FUSE |
||||
|
situation it is unlikely. |
||||
|
|
||||
|
|
||||
|
## Have you considered porting mergerfs to Windows (WinFsp)? |
||||
|
|
||||
|
Similar to MacOS the demand is very low and mergerfs does not use the |
||||
|
[libfuse](https://github.com/libfuse/libfuse) library so porting to |
||||
|
WinFsp would first mean porting it to `libfuse`. |
Write
Preview
Loading…
Cancel
Save
Reference in new issue