107c9093cSEric BiggersWhat: /sys/block/<disk>/alignment_offset 207c9093cSEric BiggersDate: April 2009 307c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 407c9093cSEric BiggersDescription: 507c9093cSEric Biggers Storage devices may report a physical block size that is 607c9093cSEric Biggers bigger than the logical block size (for instance a drive 707c9093cSEric Biggers with 4KB physical sectors exposing 512-byte logical 807c9093cSEric Biggers blocks to the operating system). This parameter 907c9093cSEric Biggers indicates how many bytes the beginning of the device is 1007c9093cSEric Biggers offset from the disk's natural alignment. 1107c9093cSEric Biggers 1207c9093cSEric Biggers 1307c9093cSEric BiggersWhat: /sys/block/<disk>/discard_alignment 1407c9093cSEric BiggersDate: May 2011 1507c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 1607c9093cSEric BiggersDescription: 1707c9093cSEric Biggers Devices that support discard functionality may 1807c9093cSEric Biggers internally allocate space in units that are bigger than 1907c9093cSEric Biggers the exported logical block size. The discard_alignment 2007c9093cSEric Biggers parameter indicates how many bytes the beginning of the 2107c9093cSEric Biggers device is offset from the internal allocation unit's 2207c9093cSEric Biggers natural alignment. 2307c9093cSEric Biggers 2407c9093cSEric Biggers 2507c9093cSEric BiggersWhat: /sys/block/<disk>/diskseq 2607c9093cSEric BiggersDate: February 2021 2707c9093cSEric BiggersContact: Matteo Croce <mcroce@microsoft.com> 2807c9093cSEric BiggersDescription: 2907c9093cSEric Biggers The /sys/block/<disk>/diskseq files reports the disk 3007c9093cSEric Biggers sequence number, which is a monotonically increasing 3107c9093cSEric Biggers number assigned to every drive. 3207c9093cSEric Biggers Some devices, like the loop device, refresh such number 3307c9093cSEric Biggers every time the backing file is changed. 3407c9093cSEric Biggers The value type is 64 bit unsigned. 3507c9093cSEric Biggers 3607c9093cSEric Biggers 3707c9093cSEric BiggersWhat: /sys/block/<disk>/inflight 3807c9093cSEric BiggersDate: October 2009 3907c9093cSEric BiggersContact: Jens Axboe <axboe@kernel.dk>, Nikanth Karthikesan <knikanth@suse.de> 4007c9093cSEric BiggersDescription: 4107c9093cSEric Biggers Reports the number of I/O requests currently in progress 4207c9093cSEric Biggers (pending / in flight) in a device driver. This can be less 4307c9093cSEric Biggers than the number of requests queued in the block device queue. 4407c9093cSEric Biggers The report contains 2 fields: one for read requests 4507c9093cSEric Biggers and one for write requests. 4607c9093cSEric Biggers The value type is unsigned int. 4707c9093cSEric Biggers Cf. Documentation/block/stat.rst which contains a single value for 4807c9093cSEric Biggers requests in flight. 4907c9093cSEric Biggers This is related to nr_requests in Documentation/block/queue-sysfs.rst 5007c9093cSEric Biggers and for SCSI device also its queue_depth. 5107c9093cSEric Biggers 5207c9093cSEric Biggers 5307c9093cSEric BiggersWhat: /sys/block/<disk>/integrity/device_is_integrity_capable 5407c9093cSEric BiggersDate: July 2014 5507c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 5607c9093cSEric BiggersDescription: 5707c9093cSEric Biggers Indicates whether a storage device is capable of storing 5807c9093cSEric Biggers integrity metadata. Set if the device is T10 PI-capable. 5907c9093cSEric Biggers 6007c9093cSEric Biggers 6107c9093cSEric BiggersWhat: /sys/block/<disk>/integrity/format 6207c9093cSEric BiggersDate: June 2008 6307c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 6407c9093cSEric BiggersDescription: 6507c9093cSEric Biggers Metadata format for integrity capable block device. 6607c9093cSEric Biggers E.g. T10-DIF-TYPE1-CRC. 6707c9093cSEric Biggers 6807c9093cSEric Biggers 6907c9093cSEric BiggersWhat: /sys/block/<disk>/integrity/protection_interval_bytes 7007c9093cSEric BiggersDate: July 2015 7107c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 7207c9093cSEric BiggersDescription: 7307c9093cSEric Biggers Describes the number of data bytes which are protected 7407c9093cSEric Biggers by one integrity tuple. Typically the device's logical 7507c9093cSEric Biggers block size. 7607c9093cSEric Biggers 7707c9093cSEric Biggers 7807c9093cSEric BiggersWhat: /sys/block/<disk>/integrity/read_verify 7907c9093cSEric BiggersDate: June 2008 8007c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 8107c9093cSEric BiggersDescription: 8207c9093cSEric Biggers Indicates whether the block layer should verify the 8307c9093cSEric Biggers integrity of read requests serviced by devices that 8407c9093cSEric Biggers support sending integrity metadata. 8507c9093cSEric Biggers 8607c9093cSEric Biggers 8707c9093cSEric BiggersWhat: /sys/block/<disk>/integrity/tag_size 8807c9093cSEric BiggersDate: June 2008 8907c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 9007c9093cSEric BiggersDescription: 9107c9093cSEric Biggers Number of bytes of integrity tag space available per 9207c9093cSEric Biggers 512 bytes of data. 9307c9093cSEric Biggers 9407c9093cSEric Biggers 9507c9093cSEric BiggersWhat: /sys/block/<disk>/integrity/write_generate 9607c9093cSEric BiggersDate: June 2008 9707c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 9807c9093cSEric BiggersDescription: 9907c9093cSEric Biggers Indicates whether the block layer should automatically 10007c9093cSEric Biggers generate checksums for write requests bound for 10107c9093cSEric Biggers devices that support receiving integrity metadata. 10207c9093cSEric Biggers 10307c9093cSEric Biggers 10407c9093cSEric BiggersWhat: /sys/block/<disk>/<partition>/alignment_offset 10507c9093cSEric BiggersDate: April 2009 10607c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 10707c9093cSEric BiggersDescription: 10807c9093cSEric Biggers Storage devices may report a physical block size that is 10907c9093cSEric Biggers bigger than the logical block size (for instance a drive 11007c9093cSEric Biggers with 4KB physical sectors exposing 512-byte logical 11107c9093cSEric Biggers blocks to the operating system). This parameter 11207c9093cSEric Biggers indicates how many bytes the beginning of the partition 11307c9093cSEric Biggers is offset from the disk's natural alignment. 11407c9093cSEric Biggers 11507c9093cSEric Biggers 11607c9093cSEric BiggersWhat: /sys/block/<disk>/<partition>/discard_alignment 11707c9093cSEric BiggersDate: May 2011 11807c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 11907c9093cSEric BiggersDescription: 12007c9093cSEric Biggers Devices that support discard functionality may 12107c9093cSEric Biggers internally allocate space in units that are bigger than 12207c9093cSEric Biggers the exported logical block size. The discard_alignment 12307c9093cSEric Biggers parameter indicates how many bytes the beginning of the 12407c9093cSEric Biggers partition is offset from the internal allocation unit's 12507c9093cSEric Biggers natural alignment. 12607c9093cSEric Biggers 12707c9093cSEric Biggers 12807c9093cSEric BiggersWhat: /sys/block/<disk>/<partition>/stat 12907c9093cSEric BiggersDate: February 2008 13007c9093cSEric BiggersContact: Jerome Marchand <jmarchan@redhat.com> 13107c9093cSEric BiggersDescription: 13207c9093cSEric Biggers The /sys/block/<disk>/<partition>/stat files display the 13307c9093cSEric Biggers I/O statistics of partition <partition>. The format is the 13407c9093cSEric Biggers same as the format of /sys/block/<disk>/stat. 13507c9093cSEric Biggers 13607c9093cSEric Biggers 13707c9093cSEric BiggersWhat: /sys/block/<disk>/queue/chunk_sectors 13807c9093cSEric BiggersDate: September 2016 13907c9093cSEric BiggersContact: Hannes Reinecke <hare@suse.com> 14007c9093cSEric BiggersDescription: 14107c9093cSEric Biggers chunk_sectors has different meaning depending on the type 14207c9093cSEric Biggers of the disk. For a RAID device (dm-raid), chunk_sectors 14307c9093cSEric Biggers indicates the size in 512B sectors of the RAID volume 14407c9093cSEric Biggers stripe segment. For a zoned block device, either 14507c9093cSEric Biggers host-aware or host-managed, chunk_sectors indicates the 14607c9093cSEric Biggers size in 512B sectors of the zones of the device, with 14707c9093cSEric Biggers the eventual exception of the last zone of the device 14807c9093cSEric Biggers which may be smaller. 14907c9093cSEric Biggers 15007c9093cSEric Biggers 15107c9093cSEric BiggersWhat: /sys/block/<disk>/queue/discard_granularity 15207c9093cSEric BiggersDate: May 2011 15307c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 15407c9093cSEric BiggersDescription: 15507c9093cSEric Biggers Devices that support discard functionality may 15607c9093cSEric Biggers internally allocate space using units that are bigger 15707c9093cSEric Biggers than the logical block size. The discard_granularity 15807c9093cSEric Biggers parameter indicates the size of the internal allocation 15907c9093cSEric Biggers unit in bytes if reported by the device. Otherwise the 16007c9093cSEric Biggers discard_granularity will be set to match the device's 16107c9093cSEric Biggers physical block size. A discard_granularity of 0 means 16207c9093cSEric Biggers that the device does not support discard functionality. 16307c9093cSEric Biggers 16407c9093cSEric Biggers 16507c9093cSEric BiggersWhat: /sys/block/<disk>/queue/discard_max_bytes 16607c9093cSEric BiggersDate: May 2011 16707c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 16807c9093cSEric BiggersDescription: 16907c9093cSEric Biggers Devices that support discard functionality may have 17007c9093cSEric Biggers internal limits on the number of bytes that can be 17107c9093cSEric Biggers trimmed or unmapped in a single operation. Some storage 17207c9093cSEric Biggers protocols also have inherent limits on the number of 17307c9093cSEric Biggers blocks that can be described in a single command. The 17407c9093cSEric Biggers discard_max_bytes parameter is set by the device driver 17507c9093cSEric Biggers to the maximum number of bytes that can be discarded in 17607c9093cSEric Biggers a single operation. Discard requests issued to the 17707c9093cSEric Biggers device must not exceed this limit. A discard_max_bytes 17807c9093cSEric Biggers value of 0 means that the device does not support 17907c9093cSEric Biggers discard functionality. 18007c9093cSEric Biggers 18107c9093cSEric Biggers 18207c9093cSEric BiggersWhat: /sys/block/<disk>/queue/discard_zeroes_data 18307c9093cSEric BiggersDate: May 2011 18407c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 18507c9093cSEric BiggersDescription: 18607c9093cSEric Biggers Will always return 0. Don't rely on any specific behavior 18707c9093cSEric Biggers for discards, and don't read this file. 18807c9093cSEric Biggers 18907c9093cSEric Biggers 19007c9093cSEric BiggersWhat: /sys/block/<disk>/queue/io_timeout 19107c9093cSEric BiggersDate: November 2018 19207c9093cSEric BiggersContact: Weiping Zhang <zhangweiping@didiglobal.com> 19307c9093cSEric BiggersDescription: 19407c9093cSEric Biggers io_timeout is the request timeout in milliseconds. If a request 19507c9093cSEric Biggers does not complete in this time then the block driver timeout 19607c9093cSEric Biggers handler is invoked. That timeout handler can decide to retry 19707c9093cSEric Biggers the request, to fail it or to start a device recovery strategy. 19807c9093cSEric Biggers 19907c9093cSEric Biggers 20007c9093cSEric BiggersWhat: /sys/block/<disk>/queue/logical_block_size 20107c9093cSEric BiggersDate: May 2009 20207c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 20307c9093cSEric BiggersDescription: 20407c9093cSEric Biggers This is the smallest unit the storage device can 20507c9093cSEric Biggers address. It is typically 512 bytes. 20607c9093cSEric Biggers 20707c9093cSEric Biggers 20807c9093cSEric BiggersWhat: /sys/block/<disk>/queue/max_active_zones 20907c9093cSEric BiggersDate: July 2020 21007c9093cSEric BiggersContact: Niklas Cassel <niklas.cassel@wdc.com> 21107c9093cSEric BiggersDescription: 21207c9093cSEric Biggers For zoned block devices (zoned attribute indicating 21307c9093cSEric Biggers "host-managed" or "host-aware"), the sum of zones belonging to 21407c9093cSEric Biggers any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED, 21507c9093cSEric Biggers is limited by this value. If this value is 0, there is no limit. 21607c9093cSEric Biggers 21707c9093cSEric Biggers 21807c9093cSEric BiggersWhat: /sys/block/<disk>/queue/max_open_zones 21907c9093cSEric BiggersDate: July 2020 22007c9093cSEric BiggersContact: Niklas Cassel <niklas.cassel@wdc.com> 22107c9093cSEric BiggersDescription: 22207c9093cSEric Biggers For zoned block devices (zoned attribute indicating 22307c9093cSEric Biggers "host-managed" or "host-aware"), the sum of zones belonging to 22407c9093cSEric Biggers any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN, 22507c9093cSEric Biggers is limited by this value. If this value is 0, there is no limit. 22607c9093cSEric Biggers 22707c9093cSEric Biggers 22807c9093cSEric BiggersWhat: /sys/block/<disk>/queue/minimum_io_size 22907c9093cSEric BiggersDate: April 2009 23007c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 23107c9093cSEric BiggersDescription: 23207c9093cSEric Biggers Storage devices may report a granularity or preferred 23307c9093cSEric Biggers minimum I/O size which is the smallest request the 23407c9093cSEric Biggers device can perform without incurring a performance 23507c9093cSEric Biggers penalty. For disk drives this is often the physical 23607c9093cSEric Biggers block size. For RAID arrays it is often the stripe 23707c9093cSEric Biggers chunk size. A properly aligned multiple of 23807c9093cSEric Biggers minimum_io_size is the preferred request size for 23907c9093cSEric Biggers workloads where a high number of I/O operations is 24007c9093cSEric Biggers desired. 24107c9093cSEric Biggers 24207c9093cSEric Biggers 24307c9093cSEric BiggersWhat: /sys/block/<disk>/queue/nomerges 24407c9093cSEric BiggersDate: January 2010 245*8b0551a7SEric BiggersContact: linux-block@vger.kernel.org 24607c9093cSEric BiggersDescription: 24707c9093cSEric Biggers Standard I/O elevator operations include attempts to 24807c9093cSEric Biggers merge contiguous I/Os. For known random I/O loads these 24907c9093cSEric Biggers attempts will always fail and result in extra cycles 25007c9093cSEric Biggers being spent in the kernel. This allows one to turn off 25107c9093cSEric Biggers this behavior on one of two ways: When set to 1, complex 25207c9093cSEric Biggers merge checks are disabled, but the simple one-shot merges 25307c9093cSEric Biggers with the previous I/O request are enabled. When set to 2, 25407c9093cSEric Biggers all merge tries are disabled. The default value is 0 - 25507c9093cSEric Biggers which enables all types of merge tries. 25607c9093cSEric Biggers 25707c9093cSEric Biggers 25807c9093cSEric BiggersWhat: /sys/block/<disk>/queue/nr_zones 25907c9093cSEric BiggersDate: November 2018 26007c9093cSEric BiggersContact: Damien Le Moal <damien.lemoal@wdc.com> 26107c9093cSEric BiggersDescription: 26207c9093cSEric Biggers nr_zones indicates the total number of zones of a zoned block 26307c9093cSEric Biggers device ("host-aware" or "host-managed" zone model). For regular 26407c9093cSEric Biggers block devices, the value is always 0. 26507c9093cSEric Biggers 26607c9093cSEric Biggers 26707c9093cSEric BiggersWhat: /sys/block/<disk>/queue/optimal_io_size 26807c9093cSEric BiggersDate: April 2009 26907c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 27007c9093cSEric BiggersDescription: 27107c9093cSEric Biggers Storage devices may report an optimal I/O size, which is 27207c9093cSEric Biggers the device's preferred unit for sustained I/O. This is 27307c9093cSEric Biggers rarely reported for disk drives. For RAID arrays it is 27407c9093cSEric Biggers usually the stripe width or the internal track size. A 27507c9093cSEric Biggers properly aligned multiple of optimal_io_size is the 27607c9093cSEric Biggers preferred request size for workloads where sustained 27707c9093cSEric Biggers throughput is desired. If no optimal I/O size is 27807c9093cSEric Biggers reported this file contains 0. 27907c9093cSEric Biggers 28007c9093cSEric Biggers 28107c9093cSEric BiggersWhat: /sys/block/<disk>/queue/physical_block_size 28207c9093cSEric BiggersDate: May 2009 28307c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 28407c9093cSEric BiggersDescription: 28507c9093cSEric Biggers This is the smallest unit a physical storage device can 28607c9093cSEric Biggers write atomically. It is usually the same as the logical 28707c9093cSEric Biggers block size but may be bigger. One example is SATA 28807c9093cSEric Biggers drives with 4KB sectors that expose a 512-byte logical 28907c9093cSEric Biggers block size to the operating system. For stacked block 29007c9093cSEric Biggers devices the physical_block_size variable contains the 29107c9093cSEric Biggers maximum physical_block_size of the component devices. 29207c9093cSEric Biggers 29307c9093cSEric Biggers 29407c9093cSEric BiggersWhat: /sys/block/<disk>/queue/write_same_max_bytes 29507c9093cSEric BiggersDate: January 2012 29607c9093cSEric BiggersContact: Martin K. Petersen <martin.petersen@oracle.com> 29707c9093cSEric BiggersDescription: 29807c9093cSEric Biggers Some devices support a write same operation in which a 29907c9093cSEric Biggers single data block can be written to a range of several 30007c9093cSEric Biggers contiguous blocks on storage. This can be used to wipe 30107c9093cSEric Biggers areas on disk or to initialize drives in a RAID 30207c9093cSEric Biggers configuration. write_same_max_bytes indicates how many 30307c9093cSEric Biggers bytes can be written in a single write same command. If 30407c9093cSEric Biggers write_same_max_bytes is 0, write same is not supported 30507c9093cSEric Biggers by the device. 30607c9093cSEric Biggers 30707c9093cSEric Biggers 30807c9093cSEric BiggersWhat: /sys/block/<disk>/queue/write_zeroes_max_bytes 30907c9093cSEric BiggersDate: November 2016 31007c9093cSEric BiggersContact: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> 31107c9093cSEric BiggersDescription: 31207c9093cSEric Biggers Devices that support write zeroes operation in which a 31307c9093cSEric Biggers single request can be issued to zero out the range of 31407c9093cSEric Biggers contiguous blocks on storage without having any payload 31507c9093cSEric Biggers in the request. This can be used to optimize writing zeroes 31607c9093cSEric Biggers to the devices. write_zeroes_max_bytes indicates how many 31707c9093cSEric Biggers bytes can be written in a single write zeroes command. If 31807c9093cSEric Biggers write_zeroes_max_bytes is 0, write zeroes is not supported 31907c9093cSEric Biggers by the device. 32007c9093cSEric Biggers 32107c9093cSEric Biggers 32207c9093cSEric BiggersWhat: /sys/block/<disk>/queue/zoned 32307c9093cSEric BiggersDate: September 2016 32407c9093cSEric BiggersContact: Damien Le Moal <damien.lemoal@wdc.com> 32507c9093cSEric BiggersDescription: 32607c9093cSEric Biggers zoned indicates if the device is a zoned block device 32707c9093cSEric Biggers and the zone model of the device if it is indeed zoned. 32807c9093cSEric Biggers The possible values indicated by zoned are "none" for 32907c9093cSEric Biggers regular block devices and "host-aware" or "host-managed" 33007c9093cSEric Biggers for zoned block devices. The characteristics of 33107c9093cSEric Biggers host-aware and host-managed zoned block devices are 33207c9093cSEric Biggers described in the ZBC (Zoned Block Commands) and ZAC 33307c9093cSEric Biggers (Zoned Device ATA Command Set) standards. These standards 33407c9093cSEric Biggers also define the "drive-managed" zone model. However, 33507c9093cSEric Biggers since drive-managed zoned block devices do not support 33607c9093cSEric Biggers zone commands, they will be treated as regular block 33707c9093cSEric Biggers devices and zoned will report "none". 33807c9093cSEric Biggers 33907c9093cSEric 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