sysfs-block 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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. == ==============================================
  8. 1 reads completed successfully
  9. 2 reads merged
  10. 3 sectors read
  11. 4 time spent reading (ms)
  12. 5 writes completed
  13. 6 writes merged
  14. 7 sectors written
  15. 8 time spent writing (ms)
  16. 9 I/Os currently in progress
  17. 10 time spent doing I/Os (ms)
  18. 11 weighted time spent doing I/Os (ms)
  19. 12 discards completed
  20. 13 discards merged
  21. 14 sectors discarded
  22. 15 time spent discarding (ms)
  23. 16 flush requests completed
  24. 17 time spent flushing (ms)
  25. == ==============================================
  26. For more details refer Documentation/admin-guide/iostats.rst
  27. What: /sys/block/<disk>/<part>/stat
  28. Date: February 2008
  29. Contact: Jerome Marchand <jmarchan@redhat.com>
  30. Description:
  31. The /sys/block/<disk>/<part>/stat files display the
  32. I/O statistics of partition <part>. The format is the
  33. same as the above-written /sys/block/<disk>/stat
  34. format.
  35. What: /sys/block/<disk>/integrity/format
  36. Date: June 2008
  37. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  38. Description:
  39. Metadata format for integrity capable block device.
  40. E.g. T10-DIF-TYPE1-CRC.
  41. What: /sys/block/<disk>/integrity/read_verify
  42. Date: June 2008
  43. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  44. Description:
  45. Indicates whether the block layer should verify the
  46. integrity of read requests serviced by devices that
  47. support sending integrity metadata.
  48. What: /sys/block/<disk>/integrity/tag_size
  49. Date: June 2008
  50. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  51. Description:
  52. Number of bytes of integrity tag space available per
  53. 512 bytes of data.
  54. What: /sys/block/<disk>/integrity/device_is_integrity_capable
  55. Date: July 2014
  56. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  57. Description:
  58. Indicates whether a storage device is capable of storing
  59. integrity metadata. Set if the device is T10 PI-capable.
  60. What: /sys/block/<disk>/integrity/protection_interval_bytes
  61. Date: July 2015
  62. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  63. Description:
  64. Describes the number of data bytes which are protected
  65. by one integrity tuple. Typically the device's logical
  66. block size.
  67. What: /sys/block/<disk>/integrity/write_generate
  68. Date: June 2008
  69. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  70. Description:
  71. Indicates whether the block layer should automatically
  72. generate checksums for write requests bound for
  73. devices that support receiving integrity metadata.
  74. What: /sys/block/<disk>/alignment_offset
  75. Date: April 2009
  76. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  77. Description:
  78. Storage devices may report a physical block size that is
  79. bigger than the logical block size (for instance a drive
  80. with 4KB physical sectors exposing 512-byte logical
  81. blocks to the operating system). This parameter
  82. indicates how many bytes the beginning of the device is
  83. offset from the disk's natural alignment.
  84. What: /sys/block/<disk>/<partition>/alignment_offset
  85. Date: April 2009
  86. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  87. Description:
  88. Storage devices may report a physical block size that is
  89. bigger than the logical block size (for instance a drive
  90. with 4KB physical sectors exposing 512-byte logical
  91. blocks to the operating system). This parameter
  92. indicates how many bytes the beginning of the partition
  93. is offset from the disk's natural alignment.
  94. What: /sys/block/<disk>/queue/logical_block_size
  95. Date: May 2009
  96. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  97. Description:
  98. This is the smallest unit the storage device can
  99. address. It is typically 512 bytes.
  100. What: /sys/block/<disk>/queue/physical_block_size
  101. Date: May 2009
  102. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  103. Description:
  104. This is the smallest unit a physical storage device can
  105. write atomically. It is usually the same as the logical
  106. block size but may be bigger. One example is SATA
  107. drives with 4KB sectors that expose a 512-byte logical
  108. block size to the operating system. For stacked block
  109. devices the physical_block_size variable contains the
  110. maximum physical_block_size of the component devices.
  111. What: /sys/block/<disk>/queue/minimum_io_size
  112. Date: April 2009
  113. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  114. Description:
  115. Storage devices may report a granularity or preferred
  116. minimum I/O size which is the smallest request the
  117. device can perform without incurring a performance
  118. penalty. For disk drives this is often the physical
  119. block size. For RAID arrays it is often the stripe
  120. chunk size. A properly aligned multiple of
  121. minimum_io_size is the preferred request size for
  122. workloads where a high number of I/O operations is
  123. desired.
  124. What: /sys/block/<disk>/queue/optimal_io_size
  125. Date: April 2009
  126. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  127. Description:
  128. Storage devices may report an optimal I/O size, which is
  129. the device's preferred unit for sustained I/O. This is
  130. rarely reported for disk drives. For RAID arrays it is
  131. usually the stripe width or the internal track size. A
  132. properly aligned multiple of optimal_io_size is the
  133. preferred request size for workloads where sustained
  134. throughput is desired. If no optimal I/O size is
  135. reported this file contains 0.
  136. What: /sys/block/<disk>/queue/nomerges
  137. Date: January 2010
  138. Contact:
  139. Description:
  140. Standard I/O elevator operations include attempts to
  141. merge contiguous I/Os. For known random I/O loads these
  142. attempts will always fail and result in extra cycles
  143. being spent in the kernel. This allows one to turn off
  144. this behavior on one of two ways: When set to 1, complex
  145. merge checks are disabled, but the simple one-shot merges
  146. with the previous I/O request are enabled. When set to 2,
  147. all merge tries are disabled. The default value is 0 -
  148. which enables all types of merge tries.
  149. What: /sys/block/<disk>/discard_alignment
  150. Date: May 2011
  151. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  152. Description:
  153. Devices that support discard functionality may
  154. internally allocate space in units that are bigger than
  155. the exported logical block size. The discard_alignment
  156. parameter indicates how many bytes the beginning of the
  157. device is offset from the internal allocation unit's
  158. natural alignment.
  159. What: /sys/block/<disk>/<partition>/discard_alignment
  160. Date: May 2011
  161. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  162. Description:
  163. Devices that support discard functionality may
  164. internally allocate space in units that are bigger than
  165. the exported logical block size. The discard_alignment
  166. parameter indicates how many bytes the beginning of the
  167. partition is offset from the internal allocation unit's
  168. natural alignment.
  169. What: /sys/block/<disk>/queue/discard_granularity
  170. Date: May 2011
  171. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  172. Description:
  173. Devices that support discard functionality may
  174. internally allocate space using units that are bigger
  175. than the logical block size. The discard_granularity
  176. parameter indicates the size of the internal allocation
  177. unit in bytes if reported by the device. Otherwise the
  178. discard_granularity will be set to match the device's
  179. physical block size. A discard_granularity of 0 means
  180. that the device does not support discard functionality.
  181. What: /sys/block/<disk>/queue/discard_max_bytes
  182. Date: May 2011
  183. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  184. Description:
  185. Devices that support discard functionality may have
  186. internal limits on the number of bytes that can be
  187. trimmed or unmapped in a single operation. Some storage
  188. protocols also have inherent limits on the number of
  189. blocks that can be described in a single command. The
  190. discard_max_bytes parameter is set by the device driver
  191. to the maximum number of bytes that can be discarded in
  192. a single operation. Discard requests issued to the
  193. device must not exceed this limit. A discard_max_bytes
  194. value of 0 means that the device does not support
  195. discard functionality.
  196. What: /sys/block/<disk>/queue/discard_zeroes_data
  197. Date: May 2011
  198. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  199. Description:
  200. Will always return 0. Don't rely on any specific behavior
  201. for discards, and don't read this file.
  202. What: /sys/block/<disk>/queue/write_same_max_bytes
  203. Date: January 2012
  204. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  205. Description:
  206. Some devices support a write same operation in which a
  207. single data block can be written to a range of several
  208. contiguous blocks on storage. This can be used to wipe
  209. areas on disk or to initialize drives in a RAID
  210. configuration. write_same_max_bytes indicates how many
  211. bytes can be written in a single write same command. If
  212. write_same_max_bytes is 0, write same is not supported
  213. by the device.
  214. What: /sys/block/<disk>/queue/write_zeroes_max_bytes
  215. Date: November 2016
  216. Contact: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
  217. Description:
  218. Devices that support write zeroes operation in which a
  219. single request can be issued to zero out the range of
  220. contiguous blocks on storage without having any payload
  221. in the request. This can be used to optimize writing zeroes
  222. to the devices. write_zeroes_max_bytes indicates how many
  223. bytes can be written in a single write zeroes command. If
  224. write_zeroes_max_bytes is 0, write zeroes is not supported
  225. by the device.
  226. What: /sys/block/<disk>/queue/zoned
  227. Date: September 2016
  228. Contact: Damien Le Moal <damien.lemoal@wdc.com>
  229. Description:
  230. zoned indicates if the device is a zoned block device
  231. and the zone model of the device if it is indeed zoned.
  232. The possible values indicated by zoned are "none" for
  233. regular block devices and "host-aware" or "host-managed"
  234. for zoned block devices. The characteristics of
  235. host-aware and host-managed zoned block devices are
  236. described in the ZBC (Zoned Block Commands) and ZAC
  237. (Zoned Device ATA Command Set) standards. These standards
  238. also define the "drive-managed" zone model. However,
  239. since drive-managed zoned block devices do not support
  240. zone commands, they will be treated as regular block
  241. devices and zoned will report "none".
  242. What: /sys/block/<disk>/queue/nr_zones
  243. Date: November 2018
  244. Contact: Damien Le Moal <damien.lemoal@wdc.com>
  245. Description:
  246. nr_zones indicates the total number of zones of a zoned block
  247. device ("host-aware" or "host-managed" zone model). For regular
  248. block devices, the value is always 0.
  249. What: /sys/block/<disk>/queue/max_active_zones
  250. Date: July 2020
  251. Contact: Niklas Cassel <niklas.cassel@wdc.com>
  252. Description:
  253. For zoned block devices (zoned attribute indicating
  254. "host-managed" or "host-aware"), the sum of zones belonging to
  255. any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED,
  256. is limited by this value. If this value is 0, there is no limit.
  257. What: /sys/block/<disk>/queue/max_open_zones
  258. Date: July 2020
  259. Contact: Niklas Cassel <niklas.cassel@wdc.com>
  260. Description:
  261. For zoned block devices (zoned attribute indicating
  262. "host-managed" or "host-aware"), the sum of zones belonging to
  263. any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN,
  264. is limited by this value. If this value is 0, there is no limit.
  265. What: /sys/block/<disk>/queue/chunk_sectors
  266. Date: September 2016
  267. Contact: Hannes Reinecke <hare@suse.com>
  268. Description:
  269. chunk_sectors has different meaning depending on the type
  270. of the disk. For a RAID device (dm-raid), chunk_sectors
  271. indicates the size in 512B sectors of the RAID volume
  272. stripe segment. For a zoned block device, either
  273. host-aware or host-managed, chunk_sectors indicates the
  274. size in 512B sectors of the zones of the device, with
  275. the eventual exception of the last zone of the device
  276. which may be smaller.
  277. What: /sys/block/<disk>/queue/io_timeout
  278. Date: November 2018
  279. Contact: Weiping Zhang <zhangweiping@didiglobal.com>
  280. Description:
  281. io_timeout is the request timeout in milliseconds. If a request
  282. does not complete in this time then the block driver timeout
  283. handler is invoked. That timeout handler can decide to retry
  284. the request, to fail it or to start a device recovery strategy.