mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-02-01 07:05:32 +08:00
Merge pull request #240 from trapexit/readme
update readme with minfreespace and readonly details
This commit is contained in:
commit
ccd3b5d2d0
12
README.md
12
README.md
|
@ -74,16 +74,18 @@ All policies when used to create will ignore drives which are mounted readonly.
|
|||
| search | access, getattr, getxattr, ioctl, listxattr, open, readlink |
|
||||
| N/A | fallocate, fgetattr, fsync, ftruncate, ioctl, read, readdir, release, statfs, write |
|
||||
|
||||
**ioctl** behaves differently if its acting on a directory. It'll use the **getattr** policy to find and open the directory before issuing the **ioctl**. In other cases where something may be searched (to confirm a directory exists across all source mounts) then **getattr** will be used.
|
||||
Due to FUSE limitations **ioctl** behaves differently if its acting on a directory. It'll use the **getattr** policy to find and open the directory before issuing the **ioctl**. In other cases where something may be searched (to confirm a directory exists across all source mounts) then **getattr** will be used.
|
||||
|
||||
#### Policy descriptions ####
|
||||
|
||||
Generally speaking most policies when called to create will filter out drives which are readonly or have less than `minfreespace`.
|
||||
|
||||
| Policy | Description |
|
||||
|--------------|-------------|
|
||||
| all | Applies action to all found. For searches it will behave like first found **ff**. For `create` functions it will only apply to `mkdir`, `mkdnod`, and `symlink`. |
|
||||
| eplfs (existing path, least free space) | If the path exists on multiple drives use the one with the least free space and is greater than **minfreespace**. Falls back to **lfs**. |
|
||||
| epmfs (existing path, most free space) | If the path exists on multiple drives use the one with the most free space and is greater than **minfreespace**. Falls back to **mfs**. |
|
||||
| erofs | Exclusively return `-1` with `errno` set to EROFS. By setting `create` functions to this you can in effect turn the filesystem readonly. |
|
||||
| all | Search category: acts like **ff**. Action category: apply to all found. Create category: for **mkdir**, **mknod**, and **symlink** perform on all read/write drives with **minfreespace**. **create** filters the same way but acts like **ff**. |
|
||||
| eplfs (existing path, least free space) | If the path exists on multiple drives use the one with the least free space. Falls back to **lfs**. |
|
||||
| epmfs (existing path, most free space) | If the path exists on multiple drives use the one with the most free space. Falls back to **mfs**. |
|
||||
| erofs | Exclusively return **-1** with **errno** set to **EROFS**. By setting **create** functions to this you can in effect turn the filesystem readonly. |
|
||||
| ff (first found) | Given the order of the drives, as defined at mount time or when configured via xattr interface, act on the first one found. |
|
||||
| fwfs (first with free space) | Pick the first drive which has at least **minfreespace**. Falls back to **mfs**. |
|
||||
| lfs (least free space) | Pick the drive with the least available free space but more than **minfreespace**. Falls back to **mfs**. |
|
||||
|
|
|
@ -153,13 +153,17 @@ statfs, write
|
|||
T}
|
||||
.TE
|
||||
.PP
|
||||
\f[B]ioctl\f[] behaves differently if its acting on a directory.
|
||||
Due to FUSE limitations \f[B]ioctl\f[] behaves differently if its acting
|
||||
on a directory.
|
||||
It\[aq]ll use the \f[B]getattr\f[] policy to find and open the directory
|
||||
before issuing the \f[B]ioctl\f[].
|
||||
In other cases where something may be searched (to confirm a directory
|
||||
exists across all source mounts) then \f[B]getattr\f[] will be used.
|
||||
.SS Policy descriptions
|
||||
.PP
|
||||
Generally speaking most policies when called to create will filter out
|
||||
drives which are readonly or have less than \f[C]minfreespace\f[].
|
||||
.PP
|
||||
.TS
|
||||
tab(@);
|
||||
l l.
|
||||
|
@ -172,30 +176,33 @@ _
|
|||
T{
|
||||
all
|
||||
T}@T{
|
||||
Applies action to all found.
|
||||
For searches it will behave like first found \f[B]ff\f[].
|
||||
For \f[C]create\f[] functions it will only apply to \f[C]mkdir\f[],
|
||||
\f[C]mkdnod\f[], and \f[C]symlink\f[].
|
||||
Search category: acts like \f[B]ff\f[].
|
||||
Action category: apply to all found.
|
||||
Create category: for \f[B]mkdir\f[], \f[B]mknod\f[], and
|
||||
\f[B]symlink\f[] perform on all read/write drives with
|
||||
\f[B]minfreespace\f[].
|
||||
\f[B]create\f[] filters the same way but acts like \f[B]ff\f[].
|
||||
T}
|
||||
T{
|
||||
eplfs (existing path, least free space)
|
||||
T}@T{
|
||||
If the path exists on multiple drives use the one with the least free
|
||||
space and is greater than \f[B]minfreespace\f[].
|
||||
space.
|
||||
Falls back to \f[B]lfs\f[].
|
||||
T}
|
||||
T{
|
||||
epmfs (existing path, most free space)
|
||||
T}@T{
|
||||
If the path exists on multiple drives use the one with the most free
|
||||
space and is greater than \f[B]minfreespace\f[].
|
||||
space.
|
||||
Falls back to \f[B]mfs\f[].
|
||||
T}
|
||||
T{
|
||||
erofs
|
||||
T}@T{
|
||||
Exclusively return \f[C]\-1\f[] with \f[C]errno\f[] set to EROFS.
|
||||
By setting \f[C]create\f[] functions to this you can in effect turn the
|
||||
Exclusively return \f[B]\-1\f[] with \f[B]errno\f[] set to
|
||||
\f[B]EROFS\f[].
|
||||
By setting \f[B]create\f[] functions to this you can in effect turn the
|
||||
filesystem readonly.
|
||||
T}
|
||||
T{
|
||||
|
|
Loading…
Reference in New Issue
Block a user