6 btrfs-mount - mount options and supported file attributes for the btrfs filesystem
10 This document describes mount options specific to the btrfs filesystem.
11 Other generic mount options are available,and are described in the
16 *alloc_start='bytes'*::
17 Debugging option to force all block allocations above a certain
18 byte threshold on each block device. The value is specified in
19 bytes, optionally with a K, M, or G suffix, case insensitive.
24 (since: 3.0, default: off) +
25 Disable/enable auto defragmentation.
26 Auto defragmentation detects small random writes into files and queue
27 them up for the defrag process. Works best for small files;
28 Not well suited for large database workloads.
32 *check_int_print_mask='value'*::
33 (since: 3.0, default: off) +
34 These debugging options control the behavior of the integrity checking
35 module (the BTRFS_FS_CHECK_INTEGRITY config option required). +
37 `check_int` enables the integrity checker module, which examines all
38 block write requests to ensure on-disk consistency, at a large
39 memory and CPU cost. +
41 `check_int_data` includes extent data in the integrity checks, and
42 implies the check_int option. +
44 `check_int_print_mask` takes a bitmask of BTRFSIC_PRINT_MASK_* values
45 as defined in 'fs/btrfs/check-integrity.c', to control the integrity
46 checker module behavior. +
48 See comments at the top of 'fs/btrfs/check-integrity.c'
52 (since: 3.12, default: 30) +
53 Set the interval of periodic commit. Higher
54 values defer data being synced to permanent storage with obvious
55 consequences when the system crashes. The upper bound is not forced,
56 but a warning is printed if it's more than 300 seconds (5 minutes).
61 *compress-force='type'*::
63 Control BTRFS file data compression. Type may be specified as 'zlib',
64 'lzo' or 'no' (for no compression, used for remounting). If no type
65 is specified, 'zlib' is used. If compress-force is specified,
66 all files will be compressed, whether or not they compress well.
67 NOTE: If compression is enabled, 'nodatacow' and 'nodatasum' are disabled.
71 Allow mounts to continue with missing devices. A read-write mount may
72 fail with too many devices missing, for example if a stripe member
73 is completely missing.
75 *device='devicepath'*::
76 Specify a device during mount so that ioctls on the control device
77 can be avoided. Especially useful when trying to mount a multi-device
78 setup as root. May be specified multiple times for multiple devices.
83 Disable/enable discard mount option.
84 Discard issues frequent commands to let the block device reclaim space
85 freed by the filesystem.
86 This is useful for SSD devices, thinly provisioned
87 LUNs and virtual machine images, but may have a significant
88 performance impact. (The fstrim command is also available to
89 initiate batch trims from userspace).
93 Disable/enable debugging option to be more verbose in some ENOSPC conditions.
95 *fatal_errors='action'*::
96 (since: 3.4, default: bug) +
97 Action to take when encountering a fatal error. +
98 "bug" - BUG() on a fatal error. +
99 "panic" - panic() on a fatal error.
104 The `flushoncommit` mount option forces any data dirtied by a write in a
105 prior transaction to commit as part of the current commit. This makes
106 the committed state a fully consistent view of the file system from the
107 application's perspective (i.e., it includes all completed file system
108 operations). This was previously the behavior only when a snapshot is
113 (since: 3.0, default: off) +
114 Enable free inode number caching. Defaults to off due to an overflow
115 problem when the free space crcs don't fit inside a single page.
117 *max_inline='bytes'*::
118 (default: min(8192, page size) )
119 Specify the maximum amount of space, in bytes, that can be inlined in
120 a metadata B-tree leaf. The value is specified in bytes, optionally
121 with a K, M, or G suffix, case insensitive. In practice, this value
122 is limited by the root sector size, with some space unavailable due
123 to leaf headers. For a 4k sectorsize, max inline data is ~3900 bytes.
125 *metadata_ratio='value'*::
126 Specify that 1 metadata chunk should be allocated after every
127 'value' data chunks. Off by default.
132 Enable/disable support for Posix Access Control Lists (ACLs). See the
133 `acl`(5) manual page for more information about ACLs.
138 ensure that certain IOs make it through the device cache and are on
139 persistent storage. If disabled on a device with a volatile
140 (non-battery-backed) write-back cache, nobarrier option will lead to
141 filesystem corruption on a system crash or power loss.
146 Enable/disable data copy-on-write for newly created files.
147 Nodatacow implies nodatasum, and disables all compression.
152 Enable/disable data checksumming for newly created files.
153 Datasum implies datacow.
158 Enable/disable the tree logging used for fsync and O_SYNC writes.
161 (since: 3.2, default: off) +
162 Enable autorecovery attempts if a bad tree root is found at mount time.
163 Currently this scans a list of several previous tree roots and tries to
164 use the first readable.
167 (since: 3.12, default: off) +
168 Force check and rebuild procedure of the UUID tree. This should not
172 (since: 3.3, default: off) +
173 Skip automatic resume of interrupted balance operation after mount.
174 May be resumed with "btrfs balance resume."
178 Disable freespace cache loading without clearing the cache.
181 Force clearing and rebuilding of the disk space cache if something
187 Options to control ssd allocation schemes. By default, BTRFS will
188 enable or disable ssd allocation heuristics depending on whether a
189 rotational or nonrotational disk is in use. The ssd and nossd options
190 can override this autodetection. +
191 The ssd_spread mount option attempts to allocate into big chunks
192 of unused space, and may perform better on low-end ssds. ssd_spread
193 implies ssd, enabling all other ssd heuristics as well.
196 Mount subvolume at 'path' rather than the root subvolume. The
197 'path' is relative to the top level subvolume.
200 Mount subvolume specified by an ID number rather than the root subvolume.
201 This allows mounting of subvolumes which are not in the root of the mounted
203 You can use "btrfs subvolume list" to see subvolume ID numbers.
205 *subvolrootid='objectid'*::
207 Mount subvolume specified by 'objectid' rather than the root subvolume.
208 This allows mounting of subvolumes which are not in the root of the mounted
210 You can use "btrfs subvolume show" to see the object ID for a subvolume.
212 *thread_pool='number'*::
213 The number of worker threads to allocate. The default number is equal
214 to the number of CPUs + 2, or 8, whichever is smaller.
216 *user_subvol_rm_allowed*::
218 Allow subvolumes to be deleted by a non-root user. Use with caution.
222 The btrfs filesystem supports setting the following file
223 attributes the `chattr`(1) utility
227 *A* -- no atime updates
231 *C* -- no copy on write
235 *D* -- synchronous directory updates
239 *S* -- synchronous updates
241 *X* -- no compression
243 For descriptions of these attribute flags, please refer to the
244 `chattr`(1) man page.