xfs.txt 11 KB

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