xfs.txt 10 KB

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