sysfs-block 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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. Will always return 0. Don't rely on any specific behavior
  193. for discards, and don't read this file.
  194. What: /sys/block/<disk>/queue/write_same_max_bytes
  195. Date: January 2012
  196. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  197. Description:
  198. Some devices support a write same operation in which a
  199. single data block can be written to a range of several
  200. contiguous blocks on storage. This can be used to wipe
  201. areas on disk or to initialize drives in a RAID
  202. configuration. write_same_max_bytes indicates how many
  203. bytes can be written in a single write same command. If
  204. write_same_max_bytes is 0, write same is not supported
  205. by the device.
  206. What: /sys/block/<disk>/queue/write_zeroes_max_bytes
  207. Date: November 2016
  208. Contact: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
  209. Description:
  210. Devices that support write zeroes operation in which a
  211. single request can be issued to zero out the range of
  212. contiguous blocks on storage without having any payload
  213. in the request. This can be used to optimize writing zeroes
  214. to the devices. write_zeroes_max_bytes indicates how many
  215. bytes can be written in a single write zeroes command. If
  216. write_zeroes_max_bytes is 0, write zeroes is not supported
  217. by the device.
  218. What: /sys/block/<disk>/queue/zoned
  219. Date: September 2016
  220. Contact: Damien Le Moal <damien.lemoal@hgst.com>
  221. Description:
  222. zoned indicates if the device is a zoned block device
  223. and the zone model of the device if it is indeed zoned.
  224. The possible values indicated by zoned are "none" for
  225. regular block devices and "host-aware" or "host-managed"
  226. for zoned block devices. The characteristics of
  227. host-aware and host-managed zoned block devices are
  228. described in the ZBC (Zoned Block Commands) and ZAC
  229. (Zoned Device ATA Command Set) standards. These standards
  230. also define the "drive-managed" zone model. However,
  231. since drive-managed zoned block devices do not support
  232. zone commands, they will be treated as regular block
  233. devices and zoned will report "none".
  234. What: /sys/block/<disk>/queue/chunk_sectors
  235. Date: September 2016
  236. Contact: Hannes Reinecke <hare@suse.com>
  237. Description:
  238. chunk_sectors has different meaning depending on the type
  239. of the disk. For a RAID device (dm-raid), chunk_sectors
  240. indicates the size in 512B sectors of the RAID volume
  241. stripe segment. For a zoned block device, either
  242. host-aware or host-managed, chunk_sectors indicates the
  243. size of 512B sectors of the zones of the device, with
  244. the eventual exception of the last zone of the device
  245. which may be smaller.