ioctl
-When ioctl
is used with an open file then it will use the file
-handle which was created at the original open
call. However, when
-using ioctl
with a directory mergerfs will use the open
policy to
-find the directory to act on.
From 7d761777a49f333dafb7951832a801735ee77984 Mon Sep 17 00:00:00 2001
From: Antonio SJ Musumeci In theory, this flag should not be exposed to the end user. It is a
low-level FUSE flag which indicates whether or not the kernel can send
diff --git a/config/flush-on-close/index.html b/config/flush-on-close/index.html
index 22b916f0..6beed048 100644
--- a/config/flush-on-close/index.html
+++ b/config/flush-on-close/index.html
@@ -890,27 +890,6 @@
- By default, FUSE would issue a flush before the release of a file
descriptor. This was considered a bit aggressive and a feature added
to give the FUSE server the ability to choose when that happens. Options: For now it defaults to "opened-for-write" which is less aggressive
+ For now it defaults to export-support
-
export-support=true|false
: Defaults to true
.export-support=true|false
true
.
-
-flush-on-close=always
flush-on-close=never
flush-on-close=opened-for-write
opened-for-write
.opened-for-write
which is less aggressive
than the behavior before this feature was added. It should not be a
problem because the flush is really only relevant when a file is
written to. Given flush is irrelevant for many filesystems in the
diff --git a/config/follow-symlinks.md~ b/config/follow-symlinks.md~
deleted file mode 100644
index 37090958..00000000
--- a/config/follow-symlinks.md~
+++ /dev/null
@@ -1,16 +0,0 @@
-# follow-symlinks
-
-This feature, when enabled, will cause symlinks to be interpreted by mergerfs as their target (depending on the mode).
-
-When there is a getattr/stat request for a file mergerfs will check if the file is a symlink and depending on the follow-symlinks setting will replace the information about the symlink with that of that which it points to.
-
-When unlink'ing or rmdir'ing the followed symlink it will remove the symlink itself and not that which it points to.
-
-never: Behave as normal. Symlinks are treated as such.
-directory: Resolve symlinks only which point to directories.
-regular: Resolve symlinks only which point to regular files.
-all: Resolve all symlinks to that which they point to.
-Symlinks which do not point to anything are left as is.
-
-WARNING: This feature works but there might be edge cases yet found. If you find any odd behaviors please file a ticket on github.
-
diff --git a/config/follow-symlinks/index.html b/config/follow-symlinks/index.html
index e088582b..355d08de 100644
--- a/config/follow-symlinks/index.html
+++ b/config/follow-symlinks/index.html
@@ -900,27 +900,6 @@
-
follow-symlinks=regular
: Resolve symlinks only which point to regular files.follow-symlinks=all
: Resolve all symlinks to that which they point
to. Symlinks which do not point to anything are left as is.never
.WARNING: This feature should be considered experimental. There might be edge cases yet found. If you find any odd behaviors please diff --git a/config/func_readdir/index.html b/config/func_readdir/index.html index 5e6303bf..cd38ae33 100644 --- a/config/func_readdir/index.html +++ b/config/func_readdir/index.html @@ -900,27 +900,6 @@ -
examples: func.readdir=seq
, func.readdir=cor:4
readdir
has policies to control how it manages reading directory
-content.
Policy | -Description | -
---|---|
seq | -"sequential" : Iterate over branches in the order defined. This is the default and traditional behavior found prior to the readdir policy introduction. This will be increasingly slower the more banches are defined. Especially if waiting for drives to spinup or network filesystems to respond. | -
cosr | -"concurrent open, sequential read" : Concurrently open branch directories using a thread pool and process them in order of definition. This keeps memory and CPU usage low while also reducing the time spent waiting on branches to respond. Number of threads defaults to the number of logical cores. Can be overwritten via the syntax func.readdir=cosr:N where N is the number of threads. |
-
cor | -"concurrent open and read" : Concurrently open branch directories and immediately start reading their contents using a thread pool. This will result in slightly higher memory and CPU usage but reduced latency. Particularly when using higher latency / slower speed network filesystem branches. Unlike seq and cosr the order of files could change due the async nature of the thread pool. Number of threads defaults to the number of logical cores. Can be overwritten via the syntax func.readdir=cor:N where N is the number of threads. |
-
Keep in mind that readdir
mostly just provides a list of file names
-in a directory and possibly some basic metadata about said files. To
-know details about the files, as one would see from commands like
-find
or ls
, it is required to call stat
on the file which is
-controlled by fuse.getattr
.
When ioctl
is used with an open file then it will use the file
-handle which was created at the original open
call. However, when
-using ioctl
with a directory mergerfs will use the open
policy to
-find the directory to act on.
NOTE: If you're receiving errors from software when files are
-moved / renamed / linked then you should consider changing the create
-policy to one which is not path preserving, enabling
-ignorepponrename
, or contacting the author of the offending software
-and requesting that EXDEV
(cross device / improper link) be properly
-handled.
rename
and link
are tricky functions in a union
-filesystem. rename
only works within a single filesystem or
-device. If a rename can't be done atomically due to the source and
-destination paths existing on different mount points it will return
--1 with errno = EXDEV (cross device / improper link). So if a
-rename
's source and target are on different filesystems within the pool
-it creates an issue.
Originally mergerfs would return EXDEV whenever a rename was requested -which was cross directory in any way. This made the code simple and -was technically compliant with POSIX requirements. However, many -applications fail to handle EXDEV at all and treat it as a normal -error or otherwise handle it poorly. Such apps include: gvfsd-fuse -v1.20.3 and prior, Finder / CIFS/SMB client in Apple OSX 10.9+, -NZBGet, Samba's recycling bin feature.
-As a result a compromise was made in order to get most software to -work while still obeying mergerfs' policies. Below is the basic logic.
-The removals are subject to normal entitlement checks.
-The above behavior will help minimize the likelihood of EXDEV being -returned but it will still be possible.
-link uses the same strategy but without the removals.
-statvfs normalizes the source -filesystems based on the fragment size and sums the number of adjusted -blocks and inodes. This means you will see the combined space of all -sources. Total, used, and free. The sources however are dedupped based -on the filesystem so multiple sources on the same drive will not result in -double counting its space. Other filesystems mounted further down the tree -of the branch will not be included when checking the mount's stats.
-The options statfs
and statfs_ignore
can be used to modify
-statfs
behavior.
https://lkml.kernel.org/linux-fsdevel/20211024132607.1636952-1-amir73il@gmail.com/T/
-By default, FUSE would issue a flush before the release of a file -descriptor. This was considered a bit aggressive and a feature added -to give the FUSE server the ability to choose when that happens.
-Options:
-For now it defaults to "opened-for-write" which is less aggressive -than the behavior before this feature was added. It should not be a -problem because the flush is really only relevant when a file is -written to. Given flush is irrelevant for many filesystems in the -future a branch specific flag may be added so only files opened on a -specific branch would be flushed on close.
diff --git a/config/fuse_msg_size.md~ b/config/fuse_msg_size.md~ deleted file mode 100644 index a3ce2c60..00000000 --- a/config/fuse_msg_size.md~ +++ /dev/null @@ -1,6 +0,0 @@ -# fuse_msg_size -FUSE applications communicate with the kernel over a special character device: /dev/fuse. A large portion of the overhead associated with FUSE is the cost of going back and forth between user space and kernel space over that device. Generally speaking, the fewer trips needed the better the performance will be. Reducing the number of trips can be done a number of ways. Kernel level caching and increasing message sizes being two significant ones. When it comes to reads and writes if the message size is doubled the number of trips are approximately halved. - -In Linux 4.20 a new feature was added allowing the negotiation of the max message size. Since the size is in multiples of pages the feature is called max_pages. There is a maximum max_pages value of 256 (1MiB) and minimum of 1 (4KiB). The default used by Linux >=4.20, and hardcoded value used before 4.20, is 32 (128KiB). In mergerfs it's referred to as fuse_msg_size to make it clear what it impacts and provide some abstraction. - -Since there should be no downsides to increasing fuse_msg_size / max_pages, outside a minor bump in RAM usage due to larger message buffers, mergerfs defaults the value to 256. On kernels before 4.20 the value has no effect. The reason the value is configurable is to enable experimentation and benchmarking. See the BENCHMARKING section for examples. diff --git a/config/fuse_msg_size/index.html b/config/fuse_msg_size/index.html index 72e94e03..52cf4bc9 100644 --- a/config/fuse_msg_size/index.html +++ b/config/fuse_msg_size/index.html @@ -900,27 +900,6 @@ -fuse_msg_size=UINT
256
FUSE applications communicate with the kernel over a special character
device: /dev/fuse
. A large portion of the overhead associated with
FUSE is the cost of going back and forth between user space and kernel
diff --git a/config/inodecalc.md~ b/config/inodecalc.md~
deleted file mode 100644
index 004b8558..00000000
--- a/config/inodecalc.md~
+++ /dev/null
@@ -1,47 +0,0 @@
-# inodecalc
-
-Inodes (st_ino) are unique identifiers within a filesystem. Each
-mounted filesystem has device ID (st_dev) as well and together they
-can uniquely identify a file on the whole of the system. Entries on
-the same device with the same inode are in fact references to the same
-underlying file. It is a many to one relationship between names and an
-inode. Directories, however, do not have multiple links on most
-systems due to the complexity they add.
-
-FUSE allows the server (mergerfs) to set inode values but not device
-IDs. Creating an inode value is somewhat complex in mergerfs' case as
-files aren't really in its control. If a policy changes what directory
-or file is to be selected or something changes out of band it becomes
-unclear what value should be used. Most software does not to care what
-the values are but those that do often break if a value changes
-unexpectedly. The tool find will abort a directory walk if it sees a
-directory inode change. NFS can return stale handle errors if the
-inode changes out of band. File dedup tools will usually leverage
-device ids and inodes as a shortcut in searching for duplicate files
-and would resort to full file comparisons should it find different
-inode values.
-
-mergerfs offers multiple ways to calculate the inode in hopes of
-covering different usecases.
-
-* `passthrough`: Passes through the underlying inode value. Mostly
- intended for testing as using this does not address any of the
- problems mentioned above and could confuse file deduplication
- software as inodes from different filesystems can be the same.
-* `path-hash`: Hashes the relative path of the entry in question. The
- underlying file's values are completely ignored. This means the
- inode value will always be the same for that file path. This is
- useful when using NFS and you make changes out of band such as copy
- data between branches. This also means that entries that do point to
- the same file will not be recognizable via inodes. That does not
- mean hard links don't work. They will.
-* `path-hash32`: 32bit version of path-hash.
-* `devino-hash`: Hashes the device id and inode of the underlying
- entry. This won't prevent issues with NFS should the policy pick a
- different file or files move out of band but will present the same
- inode for underlying files that do too.
-* `devino-hash32`: 32bit version of devino-hash.
-
-hybrid-hash: Performs path-hash on directories and devino-hash on other file types. Since directories can't have hard links the static value won't make a difference and the files will get values useful for finding duplicates. Probably the best to use if not using NFS. As such it is the default.
-
-hybrid-hash32: 32bit version of hybrid-hash.
diff --git a/config/inodecalc/index.html b/config/inodecalc/index.html
index 184ed7c7..aafc3f0d 100644
--- a/config/inodecalc/index.html
+++ b/config/inodecalc/index.html
@@ -900,27 +900,6 @@
-
When ioctl
is used with an open file then it will use the file
-handle which was created at the original open
call. However, when
-using ioctl
with a directory mergerfs will use the open
policy to
-find the directory to act on.
link-exdev=abs-pool-symlink
: An absolute value using the mergerfs
mount point.passthrough
.NOTE: It is possible that some applications check the file they link. In those cases, it is possible it will error or complain.
diff --git a/config/link_cow.md~ b/config/link_cow.md~ new file mode 100644 index 00000000..fd7824cf --- /dev/null +++ b/config/link_cow.md~ @@ -0,0 +1,2 @@ +# link_cow + diff --git a/config/link_cow/index.html b/config/link_cow/index.html index d0fa34c0..81de0979 100644 --- a/config/link_cow/index.html +++ b/config/link_cow/index.html @@ -900,27 +900,6 @@ -link_cow=true|false
false
This feature offers similar functionality to what +cow-shell +offers.
+When enabled if mergerfs is asked to open a file to write and the link +count on the file is greater than 1 it will copy the file to a +temporary new file and then rename it over the original. This will +atomically "break" the link. After that it will open the new file.
diff --git a/config/nfsopenhack.md~ b/config/nfsopenhack.md~ deleted file mode 100644 index dce12636..00000000 --- a/config/nfsopenhack.md~ +++ /dev/null @@ -1,20 +0,0 @@ -# nfsopenhack - -NFS is not fully POSIX compliant and historically certain behaviors, -such as opening files with O_EXCL, are not or not well supported. When -mergerfs (or any FUSE filesystem) is exported over NFS some of these -issues come up due to how NFS and FUSE interact. - -This hack addresses the issue where the creation of a file with a -read-only mode but with a read/write or write only flag. Normally this -is perfectly valid but NFS chops the one open call into multiple -calls. Exactly how it is translated depends on the configuration and -versions of the NFS server and clients but it results in a permission -error because a normal user is not allowed to open a read-only file as -writable. - -Even though it's a more niche situation this hack breaks normal -security and behavior and as such is `off` by default. If set to `git` -it will only perform the hack when the path in question includes -`/.git/`. `all` will result in it applying anytime a read-only file -which is empty is opened for writing. diff --git a/config/nfsopenhack/index.html b/config/nfsopenhack/index.html index 2b510554..1da2963d 100644 --- a/config/nfsopenhack/index.html +++ b/config/nfsopenhack/index.html @@ -16,7 +16,7 @@ - + @@ -900,27 +900,6 @@ -nfsopenhack=git
: Apply hack if path includes /.git/
.nfsopenhack=all
: Apply hack on all empty read-only files opened
for writing.off
.NFS is not fully POSIX compliant and historically certain behaviors,
such as opening files with O_EXCL
, are not or not well
@@ -1558,13 +1538,13 @@ which is empty is opened for writing.
statfs=base
: Aggregate details from all branches using their base directory.statfs=full
: Aggregate details using the full path of the file
+ requested. Limiting it to only branches where the file exists.base
. statvfs normalizes the source filesystems based on the fragment size and sums the number of adjusted blocks and inodes. This means you will see the combined space of all @@ -1491,8 +1532,17 @@ sources. Total, used, and free. The sources however are dedupped based on the filesystem so multiple sources on the same drive will not result in double counting its space. Other filesystems mounted further down the tree of the branch will not be included when checking the mount's stats.
-The options statfs
and statfs_ignore
can be used to modify
-statfs
behavior.
Modifies how statfs
works. Will cause it to ignore branches of a
+certain mode.
statfs_ignore=none
: Include all branches.statfs_ignore=ro
: Ignore available space for branches mounted as
+ read-only or have a mode RO
or NC
.statfs_ignore=nc
: Ignore available space for branches with a mode
+ of NC
.none
.symlinkify=true|false
false
.Due to the levels of indirection introduced by mergerfs and the underlying technology FUSE there can be varying levels of performance degradation. This feature will turn non-directories which are not diff --git a/config/terminology/index.html b/config/terminology/index.html index a5f8af93..4893377e 100644 --- a/config/terminology/index.html +++ b/config/terminology/index.html @@ -900,27 +900,6 @@ -
There are multiple thread pools used in mergerfs to provide +parallel behaviors.
The number of threads used to read (and possibly process) messages +from the kernel.
+read-thread-count=0
: Create a thread pool sized to the number of
+ logical CPUs.read-thread-count=N
where N>0
: Create a thread pool of N
threads.read-thread-count=N
where N<0
: Create a thread pool of CPUCount /
+ -N
threads.read-thread-count=-1
where process-thread-count=-1
: Creates 2
+ read threads and max(2,CPUCount-2)
process threads.0
.When process-thread-count=-1
(the default) this option sets the
+number of threads which read and then process requests from the
+kernel.
When process-thread-count
is set to anything else mergerfs will
+create two thread pools. A "read" thread pool which just reads from
+the kernel and hands off requests to the "process" thread pool.
Generally, only 1 or 2 "read" threads are necessary.
When enabled this sets the number of threads in the message processing pool.
+process-thread-count=-1
: Process thread pool is disabled.process-thread-count=0
: Create a thread pool sized to the number
+ of logical CPUs.process-thread-count=N
where N>0
: Create a thread pool of N
threads.process-thread-count=N
where N<-1
: Create a thread pool of CPUCount /
+ -N
threads.-1
.process-thread-queue-depth=N
where N>0
: Sets the number of outstanding
+ requests that a process thread can have to N. If requests come in
+ faster than can be processed and the max queue depth hit then
+ queuing the request will block in order to limit memory growth.process-thread-queue-depth=0
: Sets the queue depth to the thread
+ pool count.0
.xattr=passthrough
: Passes through all requests to underlying file.xattr=noattr
: mergerfs receives the request but returns NOATTR
.xattr=nosys
: Tells the kernel to reject all xattr
requests.passthrough
.Runtime extended attribute support can be managed via the xattr
option. By default it will passthrough any xattr calls. Given xattr
diff --git a/error_handling/index.html b/error_handling/index.html
index a46aa4e3..f1bbe1e5 100644
--- a/error_handling/index.html
+++ b/error_handling/index.html
@@ -888,27 +888,6 @@
-