xfs.txt 10 KB

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