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