xfs.txt 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. biosize=size
  16. Sets the preferred buffered I/O size (default size is 64K).
  17. "size" must be expressed as the logarithm (base2) of the
  18. desired I/O size.
  19. Valid values for this option are 14 through 16, inclusive
  20. (i.e. 16K, 32K, and 64K bytes). On machines with a 4K
  21. pagesize, 13 (8K bytes) is also a valid size.
  22. The preferred buffered I/O size can also be altered on an
  23. individual file basis using the ioctl(2) system call.
  24. ikeep/noikeep
  25. When inode clusters are emptied of inodes, keep them around
  26. on the disk (ikeep) - this is the traditional XFS behaviour
  27. and is still the default for now. Using the noikeep option,
  28. inode clusters are returned to the free space pool.
  29. logbufs=value
  30. Set the number of in-memory log buffers. Valid numbers range
  31. from 2-8 inclusive.
  32. The default value is 8 buffers for filesystems with a
  33. blocksize of 64K, 4 buffers for filesystems with a blocksize
  34. of 32K, 3 buffers for filesystems with a blocksize of 16K
  35. and 2 buffers for all other configurations. Increasing the
  36. number of buffers may increase performance on some workloads
  37. at the cost of the memory used for the additional log buffers
  38. and their associated control structures.
  39. logbsize=value
  40. Set the size of each in-memory log buffer.
  41. Size may be specified in bytes, or in kilobytes with a "k" suffix.
  42. Valid sizes for version 1 and version 2 logs are 16384 (16k) and
  43. 32768 (32k). Valid sizes for version 2 logs also include
  44. 65536 (64k), 131072 (128k) and 262144 (256k).
  45. The default value for machines with more than 32MB of memory
  46. is 32768, machines with less memory use 16384 by default.
  47. logdev=device and rtdev=device
  48. Use an external log (metadata journal) and/or real-time device.
  49. An XFS filesystem has up to three parts: a data section, a log
  50. section, and a real-time section. The real-time section is
  51. optional, and the log section can be separate from the data
  52. section or contained within it.
  53. noalign
  54. Data allocations will not be aligned at stripe unit boundaries.
  55. noatime
  56. Access timestamps are not updated when a file is read.
  57. norecovery
  58. The filesystem will be mounted without running log recovery.
  59. If the filesystem was not cleanly unmounted, it is likely to
  60. be inconsistent when mounted in "norecovery" mode.
  61. Some files or directories may not be accessible because of this.
  62. Filesystems mounted "norecovery" must be mounted read-only or
  63. the mount will fail.
  64. nouuid
  65. Don't check for double mounted file systems using the file system uuid.
  66. This is useful to mount LVM snapshot volumes.
  67. osyncisosync
  68. Make O_SYNC writes implement true O_SYNC. WITHOUT this option,
  69. Linux XFS behaves as if an "osyncisdsync" option is used,
  70. which will make writes to files opened with the O_SYNC flag set
  71. behave as if the O_DSYNC flag had been used instead.
  72. This can result in better performance without compromising
  73. data safety.
  74. However if this option is not in effect, timestamp updates from
  75. O_SYNC writes can be lost if the system crashes.
  76. If timestamp updates are critical, use the osyncisosync option.
  77. quota/usrquota/uqnoenforce
  78. User disk quota accounting enabled, and limits (optionally)
  79. enforced.
  80. grpquota/gqnoenforce
  81. Group disk quota accounting enabled and limits (optionally)
  82. enforced.
  83. sunit=value and swidth=value
  84. Used to specify the stripe unit and width for a RAID device or
  85. a stripe volume. "value" must be specified in 512-byte block
  86. units.
  87. If this option is not specified and the filesystem was made on
  88. a stripe volume or the stripe width or unit were specified for
  89. the RAID device at mkfs time, then the mount system call will
  90. restore the value from the superblock. For filesystems that
  91. are made directly on RAID devices, these options can be used
  92. to override the information in the superblock if the underlying
  93. disk layout changes after the filesystem has been created.
  94. The "swidth" option is required if the "sunit" option has been
  95. specified, and must be a multiple of the "sunit" value.
  96. sysctls
  97. =======
  98. The following sysctls are available for the XFS filesystem:
  99. fs.xfs.stats_clear (Min: 0 Default: 0 Max: 1)
  100. Setting this to "1" clears accumulated XFS statistics
  101. in /proc/fs/xfs/stat. It then immediately resets to "0".
  102. fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000)
  103. The interval at which the xfssyncd thread flushes metadata
  104. out to disk. This thread will flush log activity out, and
  105. do some processing on unlinked inodes.
  106. fs.xfs.xfsbufd_centisecs (Min: 50 Default: 100 Max: 3000)
  107. The interval at which xfsbufd scans the dirty metadata buffers list.
  108. fs.xfs.age_buffer_centisecs (Min: 100 Default: 1500 Max: 720000)
  109. The age at which xfsbufd flushes dirty metadata buffers to disk.
  110. fs.xfs.error_level (Min: 0 Default: 3 Max: 11)
  111. A volume knob for error reporting when internal errors occur.
  112. This will generate detailed messages & backtraces for filesystem
  113. shutdowns, for example. Current threshold values are:
  114. XFS_ERRLEVEL_OFF: 0
  115. XFS_ERRLEVEL_LOW: 1
  116. XFS_ERRLEVEL_HIGH: 5
  117. fs.xfs.panic_mask (Min: 0 Default: 0 Max: 127)
  118. Causes certain error conditions to call BUG(). Value is a bitmask;
  119. AND together the tags which represent errors which should cause panics:
  120. XFS_NO_PTAG 0
  121. XFS_PTAG_IFLUSH 0x00000001
  122. XFS_PTAG_LOGRES 0x00000002
  123. XFS_PTAG_AILDELETE 0x00000004
  124. XFS_PTAG_ERROR_REPORT 0x00000008
  125. XFS_PTAG_SHUTDOWN_CORRUPT 0x00000010
  126. XFS_PTAG_SHUTDOWN_IOERROR 0x00000020
  127. XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040
  128. This option is intended for debugging only.
  129. fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1)
  130. Controls whether symlinks are created with mode 0777 (default)
  131. or whether their mode is affected by the umask (irix mode).
  132. fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1)
  133. Controls files created in SGID directories.
  134. If the group ID of the new file does not match the effective group
  135. ID or one of the supplementary group IDs of the parent dir, the
  136. ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
  137. is set.
  138. fs.xfs.restrict_chown (Min: 0 Default: 1 Max: 1)
  139. Controls whether unprivileged users can use chown to "give away"
  140. a file to another user.
  141. fs.xfs.inherit_sync (Min: 0 Default: 1 Max 1)
  142. Setting this to "1" will cause the "sync" flag set
  143. by the chattr(1) command on a directory to be
  144. inherited by files in that directory.
  145. fs.xfs.inherit_nodump (Min: 0 Default: 1 Max 1)
  146. Setting this to "1" will cause the "nodump" flag set
  147. by the chattr(1) command on a directory to be
  148. inherited by files in that directory.
  149. fs.xfs.inherit_noatime (Min: 0 Default: 1 Max 1)
  150. Setting this to "1" will cause the "noatime" flag set
  151. by the chattr(1) command on a directory to be
  152. inherited by files in that directory.