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. 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. Sets the number of hash buckets available for hashing the
  44. in-memory inodes of the specified mount point. If a value
  45. of zero is used, the value selected by the default algorithm
  46. will be displayed in /proc/mounts.
  47. ikeep/noikeep
  48. When inode clusters are emptied of inodes, keep them around
  49. on the disk (ikeep) - this is the traditional XFS behaviour
  50. and is still the default for now. Using the noikeep option,
  51. inode clusters are returned to the free space pool.
  52. inode64
  53. Indicates that XFS is allowed to create inodes at any location
  54. in the filesystem, including those which will result in inode
  55. numbers occupying more than 32 bits of significance. This is
  56. provided for backwards compatibility, but causes problems for
  57. backup applications that cannot handle large inode numbers.
  58. largeio/nolargeio
  59. If "nolargeio" is specified, the optimal I/O reported in
  60. st_blksize by stat(2) will be as small as possible to allow user
  61. applications to avoid inefficient read/modify/write I/O.
  62. If "largeio" specified, a filesystem that has a "swidth" specified
  63. will return the "swidth" value (in bytes) in st_blksize. If the
  64. filesystem does not have a "swidth" specified but does specify
  65. an "allocsize" then "allocsize" (in bytes) will be returned
  66. instead.
  67. If neither of these two options are specified, then filesystem
  68. will behave as if "nolargeio" was specified.
  69. logbufs=value
  70. Set the number of in-memory log buffers. Valid numbers range
  71. from 2-8 inclusive.
  72. The default value is 8 buffers for filesystems with a
  73. blocksize of 64KiB, 4 buffers for filesystems with a blocksize
  74. of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB
  75. and 2 buffers for all other configurations. Increasing the
  76. number of buffers may increase performance on some workloads
  77. at the cost of the memory used for the additional log buffers
  78. and their associated control structures.
  79. logbsize=value
  80. Set the size of each in-memory log buffer.
  81. Size may be specified in bytes, or in kilobytes with a "k" suffix.
  82. Valid sizes for version 1 and version 2 logs are 16384 (16k) and
  83. 32768 (32k). Valid sizes for version 2 logs also include
  84. 65536 (64k), 131072 (128k) and 262144 (256k).
  85. The default value for machines with more than 32MiB of memory
  86. is 32768, machines with less memory use 16384 by default.
  87. logdev=device and rtdev=device
  88. Use an external log (metadata journal) and/or real-time device.
  89. An XFS filesystem has up to three parts: a data section, a log
  90. section, and a real-time section. The real-time section is
  91. optional, and the log section can be separate from the data
  92. section or contained within it.
  93. mtpt=mountpoint
  94. Use with the "dmapi" option. The value specified here will be
  95. included in the DMAPI mount event, and should be the path of
  96. the actual mountpoint that is used.
  97. noalign
  98. Data allocations will not be aligned at stripe unit boundaries.
  99. noatime
  100. Access timestamps are not updated when a file is read.
  101. norecovery
  102. The filesystem will be mounted without running log recovery.
  103. If the filesystem was not cleanly unmounted, it is likely to
  104. be inconsistent when mounted in "norecovery" mode.
  105. Some files or directories may not be accessible because of this.
  106. Filesystems mounted "norecovery" must be mounted read-only or
  107. the mount will fail.
  108. nouuid
  109. Don't check for double mounted file systems using the file system uuid.
  110. This is useful to mount LVM snapshot volumes.
  111. osyncisosync
  112. Make O_SYNC writes implement true O_SYNC. WITHOUT this option,
  113. Linux XFS behaves as if an "osyncisdsync" option is used,
  114. which will make writes to files opened with the O_SYNC flag set
  115. behave as if the O_DSYNC flag had been used instead.
  116. This can result in better performance without compromising
  117. data safety.
  118. However if this option is not in effect, timestamp updates from
  119. O_SYNC writes can be lost if the system crashes.
  120. If timestamp updates are critical, use the osyncisosync option.
  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.restrict_chown (Min: 0 Default: 1 Max: 1)
  190. Controls whether unprivileged users can use chown to "give away"
  191. a file to another user.
  192. fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1)
  193. Setting this to "1" will cause the "sync" 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_nodump (Min: 0 Default: 1 Max: 1)
  197. Setting this to "1" will cause the "nodump" 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_noatime (Min: 0 Default: 1 Max: 1)
  201. Setting this to "1" will cause the "noatime" 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.inherit_nosymlinks (Min: 0 Default: 1 Max: 1)
  205. Setting this to "1" will cause the "nosymlinks" flag set
  206. by the xfs_io(8) chattr command on a directory to be
  207. inherited by files in that directory.
  208. fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256)
  209. In "inode32" allocation mode, this option determines how many
  210. files the allocator attempts to allocate in the same allocation
  211. group before moving to the next allocation group. The intent
  212. is to control the rate at which the allocator moves between
  213. allocation groups when allocating extents for new files.