blob: 7bff3e4f35df84a9def7507badb42ccdeffef419 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2The SGI XFS Filesystem
3======================
4
5XFS is a high performance journaling filesystem which originated
6on the SGI IRIX platform. It is completely multi-threaded, can
7support large files and large filesystems, extended attributes,
8variable block sizes, is extent based, and makes extensive use of
9Btrees (directories, extents, free space) to aid both performance
10and scalability.
11
12Refer to the documentation at http://oss.sgi.com/projects/xfs/
13for further details. This implementation is on-disk compatible
14with the IRIX version of XFS.
15
16
17Mount Options
18=============
19
20When mounting an XFS filesystem, the following options are accepted.
21
Nathan Scottfc97bbf2005-11-03 13:46:43 +110022 allocsize=size
23 Sets the buffered I/O end-of-file preallocation size when
24 doing delayed allocation writeout (default size is 64KiB).
25 Valid values for this option are page size (typically 4KiB)
26 through to 1GiB, inclusive, in power-of-2 increments.
27
28 attr2/noattr2
29 The options enable/disable (default is disabled for backward
30 compatibility on-disk) an "opportunistic" improvement to be
31 made in the way inline extended attributes are stored on-disk.
32 When the new form is used for the first time (by setting or
33 removing extended attributes) the on-disk superblock feature
34 bit field will be updated to reflect this format being in use.
35
36 barrier
37 Enables the use of block layer write barriers for writes into
38 the journal and unwritten extent conversion. This allows for
39 drive level write caching to be enabled, for devices that
40 support write barriers.
41
42 dmapi
43 Enable the DMAPI (Data Management API) event callouts.
44 Use with the "mtpt" option.
45
46 grpid/bsdgroups and nogrpid/sysvgroups
47 These options define what group ID a newly created file gets.
48 When grpid is set, it takes the group ID of the directory in
49 which it is created; otherwise (the default) it takes the fsgid
50 of the current process, unless the directory has the setgid bit
51 set, in which case it takes the gid from the parent directory,
52 and also gets the setgid bit set if it is a directory itself.
53
54 ihashsize=value
David Chinner033bfb12008-04-11 17:05:49 +100055 In memory inode hashes have been removed, so this option has
56 no function as of August 2007. Option is deprecated.
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
58 ikeep/noikeep
David Chinner033bfb12008-04-11 17:05:49 +100059 When ikeep is specified, XFS does not delete empty inode clusters
60 and keeps them around on disk. ikeep is the traditional XFS
61 behaviour. When noikeep is specified, empty inode clusters
Josef Sipekf6e9f282008-04-11 17:11:02 +100062 are returned to the free space pool. The default is noikeep for
63 non-DMAPI mounts, while ikeep is the default when DMAPI is in use.
Linus Torvalds1da177e2005-04-16 15:20:36 -070064
Nathan Scottfc97bbf2005-11-03 13:46:43 +110065 inode64
66 Indicates that XFS is allowed to create inodes at any location
67 in the filesystem, including those which will result in inode
68 numbers occupying more than 32 bits of significance. This is
69 provided for backwards compatibility, but causes problems for
70 backup applications that cannot handle large inode numbers.
71
72 largeio/nolargeio
73 If "nolargeio" is specified, the optimal I/O reported in
74 st_blksize by stat(2) will be as small as possible to allow user
75 applications to avoid inefficient read/modify/write I/O.
76 If "largeio" specified, a filesystem that has a "swidth" specified
77 will return the "swidth" value (in bytes) in st_blksize. If the
78 filesystem does not have a "swidth" specified but does specify
79 an "allocsize" then "allocsize" (in bytes) will be returned
80 instead.
81 If neither of these two options are specified, then filesystem
82 will behave as if "nolargeio" was specified.
83
Linus Torvalds1da177e2005-04-16 15:20:36 -070084 logbufs=value
85 Set the number of in-memory log buffers. Valid numbers range
86 from 2-8 inclusive.
87 The default value is 8 buffers for filesystems with a
Nathan Scottfc97bbf2005-11-03 13:46:43 +110088 blocksize of 64KiB, 4 buffers for filesystems with a blocksize
89 of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB
Linus Torvalds1da177e2005-04-16 15:20:36 -070090 and 2 buffers for all other configurations. Increasing the
91 number of buffers may increase performance on some workloads
92 at the cost of the memory used for the additional log buffers
93 and their associated control structures.
94
95 logbsize=value
96 Set the size of each in-memory log buffer.
97 Size may be specified in bytes, or in kilobytes with a "k" suffix.
Nathan Scottfc97bbf2005-11-03 13:46:43 +110098 Valid sizes for version 1 and version 2 logs are 16384 (16k) and
99 32768 (32k). Valid sizes for version 2 logs also include
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100 65536 (64k), 131072 (128k) and 262144 (256k).
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100101 The default value for machines with more than 32MiB of memory
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102 is 32768, machines with less memory use 16384 by default.
103
104 logdev=device and rtdev=device
105 Use an external log (metadata journal) and/or real-time device.
106 An XFS filesystem has up to three parts: a data section, a log
107 section, and a real-time section. The real-time section is
108 optional, and the log section can be separate from the data
109 section or contained within it.
110
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100111 mtpt=mountpoint
112 Use with the "dmapi" option. The value specified here will be
113 included in the DMAPI mount event, and should be the path of
114 the actual mountpoint that is used.
115
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 noalign
117 Data allocations will not be aligned at stripe unit boundaries.
118
119 noatime
120 Access timestamps are not updated when a file is read.
121
122 norecovery
123 The filesystem will be mounted without running log recovery.
124 If the filesystem was not cleanly unmounted, it is likely to
125 be inconsistent when mounted in "norecovery" mode.
126 Some files or directories may not be accessible because of this.
127 Filesystems mounted "norecovery" must be mounted read-only or
128 the mount will fail.
129
130 nouuid
131 Don't check for double mounted file systems using the file system uuid.
132 This is useful to mount LVM snapshot volumes.
133
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100134 uquota/usrquota/uqnoenforce/quota
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135 User disk quota accounting enabled, and limits (optionally)
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100136 enforced. Refer to xfs_quota(8) for further details.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100138 gquota/grpquota/gqnoenforce
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139 Group disk quota accounting enabled and limits (optionally)
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100140 enforced. Refer to xfs_quota(8) for further details.
141
142 pquota/prjquota/pqnoenforce
143 Project disk quota accounting enabled and limits (optionally)
144 enforced. Refer to xfs_quota(8) for further details.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145
146 sunit=value and swidth=value
147 Used to specify the stripe unit and width for a RAID device or
148 a stripe volume. "value" must be specified in 512-byte block
149 units.
150 If this option is not specified and the filesystem was made on
151 a stripe volume or the stripe width or unit were specified for
152 the RAID device at mkfs time, then the mount system call will
153 restore the value from the superblock. For filesystems that
154 are made directly on RAID devices, these options can be used
155 to override the information in the superblock if the underlying
156 disk layout changes after the filesystem has been created.
157 The "swidth" option is required if the "sunit" option has been
158 specified, and must be a multiple of the "sunit" value.
159
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100160 swalloc
161 Data allocations will be rounded up to stripe width boundaries
162 when the current end of file is being extended and the file
163 size is larger than the stripe width size.
164
165
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166sysctls
167=======
168
169The following sysctls are available for the XFS filesystem:
170
171 fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1)
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100172 Setting this to "1" clears accumulated XFS statistics
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173 in /proc/fs/xfs/stat. It then immediately resets to "0".
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100174
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175 fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000)
176 The interval at which the xfssyncd thread flushes metadata
177 out to disk. This thread will flush log activity out, and
178 do some processing on unlinked inodes.
179
180 fs.xfs.xfsbufd_centisecs (Min: 50 Default: 100 Max: 3000)
181 The interval at which xfsbufd scans the dirty metadata buffers list.
182
183 fs.xfs.age_buffer_centisecs (Min: 100 Default: 1500 Max: 720000)
184 The age at which xfsbufd flushes dirty metadata buffers to disk.
185
186 fs.xfs.error_level (Min: 0 Default: 3 Max: 11)
187 A volume knob for error reporting when internal errors occur.
188 This will generate detailed messages & backtraces for filesystem
189 shutdowns, for example. Current threshold values are:
190
191 XFS_ERRLEVEL_OFF: 0
192 XFS_ERRLEVEL_LOW: 1
193 XFS_ERRLEVEL_HIGH: 5
194
195 fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127)
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100196 Causes certain error conditions to call BUG(). Value is a bitmask;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197 AND together the tags which represent errors which should cause panics:
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100198
Linus Torvalds1da177e2005-04-16 15:20:36 -0700199 XFS_NO_PTAG 0
200 XFS_PTAG_IFLUSH 0x00000001
201 XFS_PTAG_LOGRES 0x00000002
202 XFS_PTAG_AILDELETE 0x00000004
203 XFS_PTAG_ERROR_REPORT 0x00000008
204 XFS_PTAG_SHUTDOWN_CORRUPT 0x00000010
205 XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
206 XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
207
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100208 This option is intended for debugging only.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700209
210 fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1)
211 Controls whether symlinks are created with mode 0777 (default)
212 or whether their mode is affected by the umask (irix mode).
213
214 fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1)
215 Controls files created in SGID directories.
216 If the group ID of the new file does not match the effective group
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100217 ID or one of the supplementary group IDs of the parent dir, the
218 ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219 is set.
220
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100221 fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1)
222 Setting this to "1" will cause the "sync" flag set
223 by the xfs_io(8) chattr command on a directory to be
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224 inherited by files in that directory.
225
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100226 fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1)
227 Setting this to "1" will cause the "nodump" flag set
228 by the xfs_io(8) chattr command on a directory to be
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229 inherited by files in that directory.
230
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100231 fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1)
232 Setting this to "1" will cause the "noatime" flag set
233 by the xfs_io(8) chattr command on a directory to be
Linus Torvalds1da177e2005-04-16 15:20:36 -0700234 inherited by files in that directory.
Nathan Scottfc97bbf2005-11-03 13:46:43 +1100235
236 fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1)
237 Setting this to "1" will cause the "nosymlinks" flag set
238 by the xfs_io(8) chattr command on a directory to be
239 inherited by files in that directory.
240
241 fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256)
242 In "inode32" allocation mode, this option determines how many
243 files the allocator attempts to allocate in the same allocation
244 group before moving to the next allocation group. The intent
245 is to control the rate at which the allocator moves between
246 allocation groups when allocating extents for new files.