xfs.txt 10 KB

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