sysfs-block 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. What: /sys/block/<disk>/stat
  2. Date: February 2008
  3. Contact: Jerome Marchand <jmarchan@redhat.com>
  4. Description:
  5. The /sys/block/<disk>/stat files displays the I/O
  6. statistics of disk <disk>. They contain 11 fields:
  7. 1 - reads completed successfully
  8. 2 - reads merged
  9. 3 - sectors read
  10. 4 - time spent reading (ms)
  11. 5 - writes completed
  12. 6 - writes merged
  13. 7 - sectors written
  14. 8 - time spent writing (ms)
  15. 9 - I/Os currently in progress
  16. 10 - time spent doing I/Os (ms)
  17. 11 - weighted time spent doing I/Os (ms)
  18. For more details refer Documentation/iostats.txt
  19. What: /sys/block/<disk>/<part>/stat
  20. Date: February 2008
  21. Contact: Jerome Marchand <jmarchan@redhat.com>
  22. Description:
  23. The /sys/block/<disk>/<part>/stat files display the
  24. I/O statistics of partition <part>. The format is the
  25. same as the above-written /sys/block/<disk>/stat
  26. format.
  27. What: /sys/block/<disk>/integrity/format
  28. Date: June 2008
  29. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  30. Description:
  31. Metadata format for integrity capable block device.
  32. E.g. T10-DIF-TYPE1-CRC.
  33. What: /sys/block/<disk>/integrity/read_verify
  34. Date: June 2008
  35. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  36. Description:
  37. Indicates whether the block layer should verify the
  38. integrity of read requests serviced by devices that
  39. support sending integrity metadata.
  40. What: /sys/block/<disk>/integrity/tag_size
  41. Date: June 2008
  42. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  43. Description:
  44. Number of bytes of integrity tag space available per
  45. 512 bytes of data.
  46. What: /sys/block/<disk>/integrity/device_is_integrity_capable
  47. Date: July 2014
  48. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  49. Description:
  50. Indicates whether a storage device is capable of storing
  51. integrity metadata. Set if the device is T10 PI-capable.
  52. What: /sys/block/<disk>/integrity/write_generate
  53. Date: June 2008
  54. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  55. Description:
  56. Indicates whether the block layer should automatically
  57. generate checksums for write requests bound for
  58. devices that support receiving integrity metadata.
  59. What: /sys/block/<disk>/alignment_offset
  60. Date: April 2009
  61. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  62. Description:
  63. Storage devices may report a physical block size that is
  64. bigger than the logical block size (for instance a drive
  65. with 4KB physical sectors exposing 512-byte logical
  66. blocks to the operating system). This parameter
  67. indicates how many bytes the beginning of the device is
  68. offset from the disk's natural alignment.
  69. What: /sys/block/<disk>/<partition>/alignment_offset
  70. Date: April 2009
  71. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  72. Description:
  73. Storage devices may report a physical block size that is
  74. bigger than the logical block size (for instance a drive
  75. with 4KB physical sectors exposing 512-byte logical
  76. blocks to the operating system). This parameter
  77. indicates how many bytes the beginning of the partition
  78. is offset from the disk's natural alignment.
  79. What: /sys/block/<disk>/queue/logical_block_size
  80. Date: May 2009
  81. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  82. Description:
  83. This is the smallest unit the storage device can
  84. address. It is typically 512 bytes.
  85. What: /sys/block/<disk>/queue/physical_block_size
  86. Date: May 2009
  87. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  88. Description:
  89. This is the smallest unit a physical storage device can
  90. write atomically. It is usually the same as the logical
  91. block size but may be bigger. One example is SATA
  92. drives with 4KB sectors that expose a 512-byte logical
  93. block size to the operating system. For stacked block
  94. devices the physical_block_size variable contains the
  95. maximum physical_block_size of the component devices.
  96. What: /sys/block/<disk>/queue/minimum_io_size
  97. Date: April 2009
  98. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  99. Description:
  100. Storage devices may report a granularity or preferred
  101. minimum I/O size which is the smallest request the
  102. device can perform without incurring a performance
  103. penalty. For disk drives this is often the physical
  104. block size. For RAID arrays it is often the stripe
  105. chunk size. A properly aligned multiple of
  106. minimum_io_size is the preferred request size for
  107. workloads where a high number of I/O operations is
  108. desired.
  109. What: /sys/block/<disk>/queue/optimal_io_size
  110. Date: April 2009
  111. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  112. Description:
  113. Storage devices may report an optimal I/O size, which is
  114. the device's preferred unit for sustained I/O. This is
  115. rarely reported for disk drives. For RAID arrays it is
  116. usually the stripe width or the internal track size. A
  117. properly aligned multiple of optimal_io_size is the
  118. preferred request size for workloads where sustained
  119. throughput is desired. If no optimal I/O size is
  120. reported this file contains 0.
  121. What: /sys/block/<disk>/queue/nomerges
  122. Date: January 2010
  123. Contact:
  124. Description:
  125. Standard I/O elevator operations include attempts to
  126. merge contiguous I/Os. For known random I/O loads these
  127. attempts will always fail and result in extra cycles
  128. being spent in the kernel. This allows one to turn off
  129. this behavior on one of two ways: When set to 1, complex
  130. merge checks are disabled, but the simple one-shot merges
  131. with the previous I/O request are enabled. When set to 2,
  132. all merge tries are disabled. The default value is 0 -
  133. which enables all types of merge tries.
  134. What: /sys/block/<disk>/discard_alignment
  135. Date: May 2011
  136. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  137. Description:
  138. Devices that support discard functionality may
  139. internally allocate space in units that are bigger than
  140. the exported logical block size. The discard_alignment
  141. parameter indicates how many bytes the beginning of the
  142. device is offset from the internal allocation unit's
  143. natural alignment.
  144. What: /sys/block/<disk>/<partition>/discard_alignment
  145. Date: May 2011
  146. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  147. Description:
  148. Devices that support discard functionality may
  149. internally allocate space in units that are bigger than
  150. the exported logical block size. The discard_alignment
  151. parameter indicates how many bytes the beginning of the
  152. partition is offset from the internal allocation unit's
  153. natural alignment.
  154. What: /sys/block/<disk>/queue/discard_granularity
  155. Date: May 2011
  156. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  157. Description:
  158. Devices that support discard functionality may
  159. internally allocate space using units that are bigger
  160. than the logical block size. The discard_granularity
  161. parameter indicates the size of the internal allocation
  162. unit in bytes if reported by the device. Otherwise the
  163. discard_granularity will be set to match the device's
  164. physical block size. A discard_granularity of 0 means
  165. that the device does not support discard functionality.
  166. What: /sys/block/<disk>/queue/discard_max_bytes
  167. Date: May 2011
  168. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  169. Description:
  170. Devices that support discard functionality may have
  171. internal limits on the number of bytes that can be
  172. trimmed or unmapped in a single operation. Some storage
  173. protocols also have inherent limits on the number of
  174. blocks that can be described in a single command. The
  175. discard_max_bytes parameter is set by the device driver
  176. to the maximum number of bytes that can be discarded in
  177. a single operation. Discard requests issued to the
  178. device must not exceed this limit. A discard_max_bytes
  179. value of 0 means that the device does not support
  180. discard functionality.
  181. What: /sys/block/<disk>/queue/discard_zeroes_data
  182. Date: May 2011
  183. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  184. Description:
  185. Devices that support discard functionality may return
  186. stale or random data when a previously discarded block
  187. is read back. This can cause problems if the filesystem
  188. expects discarded blocks to be explicitly cleared. If a
  189. device reports that it deterministically returns zeroes
  190. when a discarded area is read the discard_zeroes_data
  191. parameter will be set to one. Otherwise it will be 0 and
  192. the result of reading a discarded area is undefined.
  193. What: /sys/block/<disk>/queue/write_same_max_bytes
  194. Date: January 2012
  195. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  196. Description:
  197. Some devices support a write same operation in which a
  198. single data block can be written to a range of several
  199. contiguous blocks on storage. This can be used to wipe
  200. areas on disk or to initialize drives in a RAID
  201. configuration. write_same_max_bytes indicates how many
  202. bytes can be written in a single write same command. If
  203. write_same_max_bytes is 0, write same is not supported
  204. by the device.