Browse Source

Merge pull request #240 from trapexit/readme

update readme with minfreespace and readonly details
pull/241/head
Antonio SJ Musumeci 9 years ago
parent
commit
ccd3b5d2d0
  1. 12
      README.md
  2. 25
      man/mergerfs.1

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 | | search | access, getattr, getxattr, ioctl, listxattr, open, readlink |
| N/A | fallocate, fgetattr, fsync, ftruncate, ioctl, read, readdir, release, statfs, write | | 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 #### #### Policy descriptions ####
Generally speaking most policies when called to create will filter out drives which are readonly or have less than `minfreespace`.
| Policy | Description | | 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. | | 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**. | | 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**. | | lfs (least free space) | Pick the drive with the least available free space but more than **minfreespace**. Falls back to **mfs**. |

25
man/mergerfs.1

@ -153,13 +153,17 @@ statfs, write
T} T}
.TE .TE
.PP .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 It\[aq]ll use the \f[B]getattr\f[] policy to find and open the directory
before issuing the \f[B]ioctl\f[]. before issuing the \f[B]ioctl\f[].
In other cases where something may be searched (to confirm a directory 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. exists across all source mounts) then \f[B]getattr\f[] will be used.
.SS Policy descriptions .SS Policy descriptions
.PP .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 .TS
tab(@); tab(@);
l l. l l.
@ -172,30 +176,33 @@ _
T{ T{
all all
T}@T{ 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}
T{ T{
eplfs (existing path, least free space) eplfs (existing path, least free space)
T}@T{ T}@T{
If the path exists on multiple drives use the one with the least free 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[]. Falls back to \f[B]lfs\f[].
T} T}
T{ T{
epmfs (existing path, most free space) epmfs (existing path, most free space)
T}@T{ T}@T{
If the path exists on multiple drives use the one with the most free 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[]. Falls back to \f[B]mfs\f[].
T} T}
T{ T{
erofs erofs
T}@T{ 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. filesystem readonly.
T} T}
T{ T{

Loading…
Cancel
Save