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