Skip to content

Commit b7f7f7f

Browse files
committed
Change misc defaults
* category.create=pfrd * moveonenospc=pfrd * cache.files=off * parallel-direct-writes=true These changes were made to match the recommended settings for most users to reduce confusion.
1 parent 7f41007 commit b7f7f7f

File tree

7 files changed

+27
-19
lines changed

7 files changed

+27
-19
lines changed

mkdocs/docs/config/options.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ These options are the same regardless of whether you use them with the
3535
exceeded) the policy selected will run to find a new location for
3636
the file. An attempt to move the file to that branch will occur
3737
(keeping all metadata possible) and if successful the original is
38-
unlinked and the write retried. (default: false, true = mfs)
38+
unlinked and the write retried. (default: pfrd)
3939
- **[inodecalc](inodecalc.md)=passthrough|path-hash|devino-hash|hybrid-hash**:
4040
Selects the inode calculation algorithm. (default: hybrid-hash)
4141
- **dropcacheonclose=BOOL**: When a file is requested to be closed
@@ -160,7 +160,7 @@ These options are the same regardless of whether you use them with the
160160
epall)
161161
- **[category.create](functions_categories_policies.md)=POLICY**: Sets
162162
policy of all FUSE functions in the create category. (default:
163-
epmfs)
163+
pfrd)
164164
- **[category.search](functions_categories_policies.md)=POLICY**: Sets
165165
policy of all FUSE functions in the search category. (default: ff)
166166
- **[cache.statfs](cache.md#cachestatfs)=UINT**: 'statfs' cache
@@ -171,8 +171,8 @@ These options are the same regardless of whether you use them with the
171171
timeout in seconds. (default: 1)
172172
- **[cache.negative_entry](cache.md#cachenegative_entry)=UINT**:
173173
Negative file name lookup cache timeout in seconds. (default: 0)
174-
- **[cache.files](cache.md#cachefiles)=libfuse|off|partial|full|auto-full|per-process**:
175-
File page caching mode (default: libfuse)
174+
- **[cache.files](cache.md#cachefiles)=off|partial|full|auto-full|per-process**:
175+
File page caching mode (default: off)
176176
- **cache.files.process-names=LIST**: A pipe | delimited list of
177177
process [comm](https://man7.org/linux/man-pages/man5/proc.5.html)
178178
names to enable page caching for when

mkdocs/docs/faq/configuration_and_policies.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ filesystems and can be added or removed without any impact it is
1919
extremely easy to test and experiment with different settings.
2020

2121

22-
## Why is epmfs the default create policy?
22+
## Why is pfrd the default create policy?
2323

24-
Because it is a strict policy and therefore does not increase entropy
25-
of the filesystem layout. If you don't explicitly choose a policy then
26-
the layout stays the same. It is far easier to stop being strict than
27-
fix the layout after having a loose policy.
24+
Originally the default was `epmfs` however it was found to cause
25+
significant confusion among new users who expected mergerfs to always
26+
choose a branch with available space. For mergerfs v2.41.0 it was
27+
decided to change the default to the less restrictive policy `pfrd`.
2828

2929

3030
## How can I ensure files are collocated on the same branch?
@@ -88,5 +88,5 @@ If you wish to move files around or balance the pool you can:
8888
in mind that this tool is really just an example of how to
8989
accomplish such a task. The tool does not keep track of links so
9090
you may encounter an increase in used space if you rely on links to
91-
reduce redundency. However, you can run a file dedup program like
91+
reduce redundancy. However, you can run a file dedup program like
9292
[rdfind](https://github.com/pauldreik/rdfind) to restore the links.

mkdocs/docs/quickstart.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ cases.
2222

2323
* cache.files=off
2424
* category.create=pfrd
25+
* func.getattr=newest
2526
* dropcacheonclose=false
2627

2728
In previous versions of Linux it was unable to support `mmap` if [page
@@ -44,13 +45,15 @@ IO.)
4445

4546
* cache.files=auto-full
4647
* category.create=pfrd
48+
* func.getattr=newest
4749
* dropcacheonclose=true
4850

4951

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

5254
* cache.files=off
5355
* category.create=pfrd
56+
* func.getattr=newest
5457
* dropcacheonclose=false
5558

5659

@@ -59,14 +62,14 @@ IO.)
5962
### Command Line
6063

6164
```
62-
mergerfs -o cache.files=off,dropcacheonclose=false,category.create=pfrd /mnt/hdd0:/mnt/hdd1 /media
65+
mergerfs -o cache.files=off,category.create=pfrd,func.getattr=newest,dropcacheonclose=false /mnt/hdd0:/mnt/hdd1 /media
6366
```
6467

6568

6669
### /etc/fstab
6770

6871
```
69-
/mnt/hdd0:/mnt/hdd1 /media mergerfs cache.files=off,dropcacheonclose=false,category.create=pfrd 0 0
72+
/mnt/hdd0:/mnt/hdd1 /media mergerfs cache.files=off,category.create=pfrd,func.getattr=newest,dropcacheonclose=false 0 0
7073
```
7174

7275
### /etc/fstab w/ config file
@@ -86,6 +89,7 @@ For more complex setups it can be useful to separate out the config.
8689
```ini title="media.ini" linenums="1"
8790
cache.files=off
8891
category.create=pfrd
92+
func.getattr=newest
8993
dropcacheonclose=false
9094
```
9195

@@ -119,6 +123,7 @@ ExecStart=/usr/bin/mergerfs \
119123
-f \
120124
-o cache.files=off \
121125
-o category.create=pfrd \
126+
-o func.getattr=newest \
122127
-o dropcacheonclose=false \
123128
/mnt/hdd0:/mnt/hdd1 \
124129
/media
@@ -182,6 +187,7 @@ ExecStart=/usr/bin/mergerfs \
182187
-f \
183188
-o cache.files=off \
184189
-o category.create=pfrd \
190+
-o func.getattr=newest \
185191
-o dropcacheonclose=false \
186192
/mnt/hdd0:/mnt/hdd1 \
187193
/media

src/config.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Config::Config()
8787
branches_mount_timeout(0),
8888
cache_attr(1),
8989
cache_entry(1),
90-
cache_files(CacheFiles::ENUM::LIBFUSE),
90+
cache_files(CacheFiles::ENUM::OFF),
9191
cache_files_process_names(CACHE_FILES_PROCESS_NAMES_DEFAULT),
9292
cache_negative_entry(0),
9393
cache_readdir(false),
@@ -110,10 +110,10 @@ Config::Config()
110110
link_exdev(LinkEXDEV::ENUM::PASSTHROUGH),
111111
log_metrics(false),
112112
mountpoint(),
113-
moveonenospc(false),
113+
moveonenospc(true),
114114
nfsopenhack(NFSOpenHack::ENUM::OFF),
115115
nullrw(false),
116-
parallel_direct_writes(false),
116+
parallel_direct_writes(true),
117117
posix_acl(false),
118118
readahead(0),
119119
readdir("seq"),

src/config_moveonenospc.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ MoveOnENOSPC::from_string(const std::string &s_)
3131

3232
rv = str::from(s_,&enabled);
3333
if((rv == 0) && (enabled == true))
34-
s = "mfs";
34+
s = "pfrd";
35+
ef((rv == 0) && (enabled == false))
36+
return (enabled = false,0);
3537
ef(rv != 0)
3638
s = s_;
3739
else
38-
return 0;
40+
return -EINVAL;
3941

4042
tmp = Policies::Create::find(s);
4143
if(tmp == NULL)

src/config_moveonenospc.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class MoveOnENOSPC : public ToFromString
3030
public:
3131
MoveOnENOSPC(const bool enabled_)
3232
: enabled(enabled_),
33-
policy(&Policies::Create::mfs)
33+
policy(&Policies::Create::pfrd)
3434
{
3535
}
3636

src/func.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace Func
8787
{
8888
public:
8989
CreateDefault()
90-
: Func::Base::Create(&Policies::Create::epmfs)
90+
: Func::Base::Create(&Policies::Create::pfrd)
9191
{
9292
}
9393
};

0 commit comments

Comments
 (0)