sysfs-block 7.9 KB

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