sysfs-block 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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/protection_interval_bytes
  53. Date: July 2015
  54. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  55. Description:
  56. Describes the number of data bytes which are protected
  57. by one integrity tuple. Typically the device's logical
  58. block size.
  59. What: /sys/block/<disk>/integrity/write_generate
  60. Date: June 2008
  61. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  62. Description:
  63. Indicates whether the block layer should automatically
  64. generate checksums for write requests bound for
  65. devices that support receiving integrity metadata.
  66. What: /sys/block/<disk>/alignment_offset
  67. Date: April 2009
  68. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  69. Description:
  70. Storage devices may report a physical block size that is
  71. bigger than the logical block size (for instance a drive
  72. with 4KB physical sectors exposing 512-byte logical
  73. blocks to the operating system). This parameter
  74. indicates how many bytes the beginning of the device is
  75. offset from the disk's natural alignment.
  76. What: /sys/block/<disk>/<partition>/alignment_offset
  77. Date: April 2009
  78. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  79. Description:
  80. Storage devices may report a physical block size that is
  81. bigger than the logical block size (for instance a drive
  82. with 4KB physical sectors exposing 512-byte logical
  83. blocks to the operating system). This parameter
  84. indicates how many bytes the beginning of the partition
  85. is offset from the disk's natural alignment.
  86. What: /sys/block/<disk>/queue/logical_block_size
  87. Date: May 2009
  88. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  89. Description:
  90. This is the smallest unit the storage device can
  91. address. It is typically 512 bytes.
  92. What: /sys/block/<disk>/queue/physical_block_size
  93. Date: May 2009
  94. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  95. Description:
  96. This is the smallest unit a physical storage device can
  97. write atomically. It is usually the same as the logical
  98. block size but may be bigger. One example is SATA
  99. drives with 4KB sectors that expose a 512-byte logical
  100. block size to the operating system. For stacked block
  101. devices the physical_block_size variable contains the
  102. maximum physical_block_size of the component devices.
  103. What: /sys/block/<disk>/queue/minimum_io_size
  104. Date: April 2009
  105. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  106. Description:
  107. Storage devices may report a granularity or preferred
  108. minimum I/O size which is the smallest request the
  109. device can perform without incurring a performance
  110. penalty. For disk drives this is often the physical
  111. block size. For RAID arrays it is often the stripe
  112. chunk size. A properly aligned multiple of
  113. minimum_io_size is the preferred request size for
  114. workloads where a high number of I/O operations is
  115. desired.
  116. What: /sys/block/<disk>/queue/optimal_io_size
  117. Date: April 2009
  118. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  119. Description:
  120. Storage devices may report an optimal I/O size, which is
  121. the device's preferred unit for sustained I/O. This is
  122. rarely reported for disk drives. For RAID arrays it is
  123. usually the stripe width or the internal track size. A
  124. properly aligned multiple of optimal_io_size is the
  125. preferred request size for workloads where sustained
  126. throughput is desired. If no optimal I/O size is
  127. reported this file contains 0.
  128. What: /sys/block/<disk>/queue/nomerges
  129. Date: January 2010
  130. Contact:
  131. Description:
  132. Standard I/O elevator operations include attempts to
  133. merge contiguous I/Os. For known random I/O loads these
  134. attempts will always fail and result in extra cycles
  135. being spent in the kernel. This allows one to turn off
  136. this behavior on one of two ways: When set to 1, complex
  137. merge checks are disabled, but the simple one-shot merges
  138. with the previous I/O request are enabled. When set to 2,
  139. all merge tries are disabled. The default value is 0 -
  140. which enables all types of merge tries.
  141. What: /sys/block/<disk>/discard_alignment
  142. Date: May 2011
  143. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  144. Description:
  145. Devices that support discard functionality may
  146. internally allocate space in units that are bigger than
  147. the exported logical block size. The discard_alignment
  148. parameter indicates how many bytes the beginning of the
  149. device is offset from the internal allocation unit's
  150. natural alignment.
  151. What: /sys/block/<disk>/<partition>/discard_alignment
  152. Date: May 2011
  153. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  154. Description:
  155. Devices that support discard functionality may
  156. internally allocate space in units that are bigger than
  157. the exported logical block size. The discard_alignment
  158. parameter indicates how many bytes the beginning of the
  159. partition is offset from the internal allocation unit's
  160. natural alignment.
  161. What: /sys/block/<disk>/queue/discard_granularity
  162. Date: May 2011
  163. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  164. Description:
  165. Devices that support discard functionality may
  166. internally allocate space using units that are bigger
  167. than the logical block size. The discard_granularity
  168. parameter indicates the size of the internal allocation
  169. unit in bytes if reported by the device. Otherwise the
  170. discard_granularity will be set to match the device's
  171. physical block size. A discard_granularity of 0 means
  172. that the device does not support discard functionality.
  173. What: /sys/block/<disk>/queue/discard_max_bytes
  174. Date: May 2011
  175. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  176. Description:
  177. Devices that support discard functionality may have
  178. internal limits on the number of bytes that can be
  179. trimmed or unmapped in a single operation. Some storage
  180. protocols also have inherent limits on the number of
  181. blocks that can be described in a single command. The
  182. discard_max_bytes parameter is set by the device driver
  183. to the maximum number of bytes that can be discarded in
  184. a single operation. Discard requests issued to the
  185. device must not exceed this limit. A discard_max_bytes
  186. value of 0 means that the device does not support
  187. discard functionality.
  188. What: /sys/block/<disk>/queue/discard_zeroes_data
  189. Date: May 2011
  190. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  191. Description:
  192. Devices that support discard functionality may return
  193. stale or random data when a previously discarded block
  194. is read back. This can cause problems if the filesystem
  195. expects discarded blocks to be explicitly cleared. If a
  196. device reports that it deterministically returns zeroes
  197. when a discarded area is read the discard_zeroes_data
  198. parameter will be set to one. Otherwise it will be 0 and
  199. the result of reading a discarded area is undefined.
  200. What: /sys/block/<disk>/queue/write_same_max_bytes
  201. Date: January 2012
  202. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  203. Description:
  204. Some devices support a write same operation in which a
  205. single data block can be written to a range of several
  206. contiguous blocks on storage. This can be used to wipe
  207. areas on disk or to initialize drives in a RAID
  208. configuration. write_same_max_bytes indicates how many
  209. bytes can be written in a single write same command. If
  210. write_same_max_bytes is 0, write same is not supported
  211. by the device.