Skip to content

Commit

Permalink
Merge pull request #1320 from trapexit/readme
Browse files Browse the repository at this point in the history
Suggest cache.files=auto-full rather than partial
  • Loading branch information
trapexit authored Mar 22, 2024
2 parents 42d0b57 + 757ae66 commit 977d042
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,19 @@ start with one of the following option sets.

#### You need `mmap` (used by rtorrent and many sqlite3 base software)

`cache.files=partial,dropcacheonclose=true,category.create=mfs`
`cache.files=auto-full,dropcacheonclose=true,category.create=mfs`

#### You don't need `mmap`

`cache.files=off,dropcacheonclose=true,category.create=mfs`

### Command Line

`mergerfs -o cache.files=partial,dropcacheonclose=true,category.create=mfs /mnt/hdd0:/mnt/hdd1 /media`
`mergerfs -o cache.files=auto-full,dropcacheonclose=true,category.create=mfs /mnt/hdd0:/mnt/hdd1 /media`

### /etc/fstab

`/mnt/hdd0:/mnt/hdd1 /media mergerfs cache.files=partial,dropcacheonclose=true,category.create=mfs 0 0`
`/mnt/hdd0:/mnt/hdd1 /media mergerfs cache.files=auto-full,dropcacheonclose=true,category.create=mfs 0 0`

### systemd mount

Expand All @@ -116,7 +116,7 @@ Type=simple
KillMode=none
ExecStart=/usr/bin/mergerfs \
-f \
-o cache.files=partial \
-o cache.files=auto-full \
-o dropcacheonclose=true \
-o category.create=mfs \
/mnt/hdd0:/mnt/hdd1 \
Expand Down Expand Up @@ -1868,16 +1868,17 @@ more details.

#### rtorrent fails with ENODEV (No such device)

Be sure to set `cache.files=partial|full|auto-full|per-processe` or
turn off `direct_io`. rtorrent and some other applications use
[mmap](http://linux.die.net/man/2/mmap) to read and write to files and
offer no fallback to traditional methods. FUSE does not currently
support mmap while using `direct_io`. There may be a performance
penalty on writes with `direct_io` off as well as the problem of
double caching but it's the only way to get such applications to
work. If the performance loss is too high for other apps you can mount
mergerfs twice. Once with `direct_io` enabled and one without it. Be
sure to set `dropcacheonclose=true` if not using `direct_io`.
Be sure to set
`cache.files=partial|full|auto-full|per-processe`. rtorrent and some
other applications use [mmap](http://linux.die.net/man/2/mmap) to read
and write to files and offer no fallback to traditional methods. FUSE
does not currently support mmap while using `direct_io`. There may be
a performance penalty on writes with `direct_io` off as well as the
problem of double caching but it's the only way to get such
applications to work. If the performance loss is too high for other
apps you can mount mergerfs twice. Once with `direct_io` enabled and
one without it. Be sure to set `dropcacheonclose=true` if not using
`direct_io`.


#### Plex doesn't work with mergerfs
Expand Down

0 comments on commit 977d042

Please sign in to comment.