@@ -2,8 +2,9 @@ BTRFS SPECIFIC MOUNT OPTIONS
2
2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
3
4
4
This section describes mount options specific to BTRFS. For the generic mount
5
- options please refer to :manref: `mount(8) ` manual page. The options are sorted alphabetically
6
- (discarding the *no * prefix).
5
+ options please refer to :manref: `mount(8) ` manual page and also see the section
6
+ with BTRFS specifics :ref: `below<mount-options-generic> `. The options are
7
+ sorted alphabetically (discarding the *no * prefix).
7
8
8
9
.. note ::
9
10
Most mount options apply to the whole filesystem and only options in the
@@ -69,27 +70,6 @@ barrier, nobarrier
69
70
option will not lead to filesystem corruption as the pending blocks are
70
71
supposed to make it to the permanent storage.
71
72
72
- check_int, check_int_data, check_int_print_mask=<value>
73
- (since: 3.0, default: off)
74
-
75
- These debugging options control the behavior of the integrity checking
76
- module (the BTRFS_FS_CHECK_INTEGRITY config option required). The main goal is
77
- to verify that all blocks from a given transaction period are properly linked.
78
-
79
- *check_int * enables the integrity checker module, which examines all
80
- block write requests to ensure on-disk consistency, at a large
81
- memory and CPU cost.
82
-
83
- *check_int_data * includes extent data in the integrity checks, and
84
- implies the *check_int * option.
85
-
86
- *check_int_print_mask * takes a bitmask of BTRFSIC_PRINT_MASK_* values
87
- as defined in *fs/btrfs/check-integrity.c *, to control the integrity
88
- checker module behavior.
89
-
90
- See comments at the top of *fs/btrfs/check-integrity.c *
91
- for more information.
92
-
93
73
clear_cache
94
74
Force clearing and rebuilding of the free space cache if something
95
75
has gone wrong.
@@ -110,9 +90,14 @@ commit=<seconds>
110
90
111
91
Set the interval of periodic transaction commit when data are synchronized
112
92
to permanent storage. Higher interval values lead to larger amount of unwritten
113
- data, which has obvious consequences when the system crashes.
114
- The upper bound is not forced, but a warning is printed if it's more than 300
115
- seconds (5 minutes). Use with care.
93
+ data to accumulate in memory, which has obvious consequences when the
94
+ system crashes. The upper bound is not forced, but a warning is
95
+ printed if it's more than 300 seconds (5 minutes). Use with care.
96
+
97
+ The periodic commit is not the only mechanism to do the transaction commit,
98
+ this can also happen by explicit :command: `sync ` or indirectly by other
99
+ commands that affect the global filesystem state or internal kernel
100
+ mechanisms that flush based on various thresholds or policies (e.g. cgroups).
116
101
117
102
compress, compress=<type[:level]>, compress-force, compress-force=<type[:level]>
118
103
(default: off, level support since: 5.1)
@@ -210,14 +195,14 @@ device=<devicepath>
210
195
discard, discard=sync, discard=async, nodiscard
211
196
(default: async when devices support it since 6.2, async support since: 5.6)
212
197
213
- Enable discarding of freed file blocks. This is useful for SSD devices, thinly
214
- provisioned LUNs, or virtual machine images; however, every storage layer must
215
- support discard for it to work.
198
+ Enable discarding of freed file blocks. This is useful for SSD/NVMe
199
+ devices, thinly provisioned LUNs, or virtual machine images; however,
200
+ every storage layer must support discard for it to work.
216
201
217
202
In the synchronous mode (*sync * or without option value), lack of asynchronous
218
203
queued TRIM on the backing device TRIM can severely degrade performance,
219
204
because a synchronous TRIM operation will be attempted instead. Queued TRIM
220
- requires newer than SATA revision 3.1 chipsets and devices.
205
+ requires SATA devices with chipsets revision newer than 3.1 and devices.
221
206
222
207
The asynchronous mode (*async *) gathers extents in larger chunks before sending
223
208
them to the devices for TRIM. The overhead and performance impact should be
@@ -319,24 +304,30 @@ norecovery
319
304
and avoids other write operations. Note that this option is the same as
320
305
*nologreplay *.
321
306
322
-
323
307
.. note ::
324
308
The opposite option *recovery * used to have different meaning but was
325
309
changed for consistency with other filesystems, where *norecovery * is used for
326
310
skipping log replay. BTRFS does the same and in general will try to avoid any
327
311
write operations.
328
312
313
+ .. duplabel :: mount-option-rescan-uuid-tree
314
+
329
315
rescan_uuid_tree
330
316
(since: 3.12, default: off)
331
317
332
318
Force check and rebuild procedure of the UUID tree. This should not
333
- normally be needed.
319
+ normally be needed. Alternatively the tree can be cleared from
320
+ userspace by command :ref: `btrfs rescue clear-uuid-tree<man-rescue-uuid-tree> `
321
+ and then it will be automatically rebuilt in kernel (the mount option
322
+ is not needed in that case).
334
323
335
324
rescue
336
325
(since: 5.9)
337
326
338
327
Modes allowing mount with damaged filesystem structures, all requires
339
328
the filesystem to be mounted read-only and doesn't allow remount to read-write.
329
+ This is supposed to provide unified and more fine grained tuning of
330
+ errors that affect filesystem operation.
340
331
341
332
* *usebackuproot * (since 5.9)
342
333
@@ -370,7 +361,7 @@ skip_balance
370
361
Skip automatic resume of an interrupted balance operation. The operation can
371
362
later be resumed with :command: `btrfs balance resume `, or the paused state can be
372
363
removed with :command: `btrfs balance cancel `. The default behaviour is to resume an
373
- interrupted balance immediately after a volume is mounted.
364
+ interrupted balance immediately after the filesystem is mounted.
374
365
375
366
space_cache, space_cache=<version>, nospace_cache
376
367
(*nospace_cache * since: 3.2, *space_cache=v1 * and *space_cache=v2 * since 4.5, default: *space_cache=v2 *)
@@ -408,8 +399,9 @@ ssd, ssd_spread, nossd, nossd_spread
408
399
Options to control SSD allocation schemes. By default, BTRFS will
409
400
enable or disable SSD optimizations depending on status of a device with
410
401
respect to rotational or non-rotational type. This is determined by the
411
- contents of */sys/block/DEV/queue/rotational *). If it is 0, the *ssd * option is
412
- turned on. The option *nossd * will disable the autodetection.
402
+ contents of :file: `/sys/block/DEV/queue/rotational `). If it is 0, the
403
+ *ssd * option is turned on. The option *nossd * will disable the
404
+ autodetection.
413
405
414
406
The optimizations make use of the absence of the seek penalty that's inherent
415
407
for the rotational devices. The blocks can be typically written faster and
@@ -476,7 +468,7 @@ usebackuproot
476
468
use the first readable. This can be used with read-only mounts as well.
477
469
478
470
.. note ::
479
- This option has replaced *recovery *.
471
+ This option has replaced *recovery * which has been deprecated .
480
472
481
473
user_subvol_rm_allowed
482
474
(default: off)
@@ -513,13 +505,42 @@ inode_cache, noinode_cache
513
505
previous use of the *inode_cache * option can be removed by
514
506
:ref: `btrfs rescue clear-ino-cache<man-rescue-clear-ino-cache> `.
515
507
508
+ check_int, check_int_data, check_int_print_mask=<value>
509
+ (removed in: 6.7, since: 3.0, default: off)
510
+
511
+ These debugging options control the behavior of the integrity checking
512
+ module (the BTRFS_FS_CHECK_INTEGRITY config option required). The main goal is
513
+ to verify that all blocks from a given transaction period are properly linked.
514
+
515
+ *check_int * enables the integrity checker module, which examines all
516
+ block write requests to ensure on-disk consistency, at a large
517
+ memory and CPU cost.
518
+
519
+ *check_int_data * includes extent data in the integrity checks, and
520
+ implies the *check_int * option.
521
+
522
+ *check_int_print_mask * takes a bit mask of BTRFSIC_PRINT_MASK_* values
523
+ as defined in *fs/btrfs/check-integrity.c *, to control the integrity
524
+ checker module behavior.
525
+
526
+ See comments at the top of *fs/btrfs/check-integrity.c *
527
+ for more information.
528
+
516
529
517
530
NOTES ON GENERIC MOUNT OPTIONS
518
531
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
519
532
520
533
Some of the general mount options from :manref: `mount(8) ` that affect BTRFS and are
521
534
worth mentioning.
522
535
536
+ .. _mount-options-generic :
537
+
538
+ context
539
+ The context refers to the SELinux contexts and policy definitions passed
540
+ as mount options. This works properly since version v6.8 (because the
541
+ mount option parser of BTRFS was ported to new API that also understood
542
+ the options).
543
+
523
544
noatime
524
545
under read intensive work-loads, specifying *noatime * significantly improves
525
546
performance because no new access time information needs to be written. Without
@@ -531,5 +552,5 @@ noatime
531
552
https://lwn.net/Articles/499293/ - *Atime and btrfs: a bad combination? (LWN, 2012-05-31) *.
532
553
533
554
Note that *noatime * may break applications that rely on atime uptimes like
534
- the venerable Mutt (unless you use maildir mailboxes).
555
+ the venerable Mutt (unless you use * maildir * mailboxes).
535
556
0 commit comments