18c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/stat 28c2ecf20Sopenharmony_ciDate: February 2008 38c2ecf20Sopenharmony_ciContact: Jerome Marchand <jmarchan@redhat.com> 48c2ecf20Sopenharmony_ciDescription: 58c2ecf20Sopenharmony_ci The /sys/block/<disk>/stat files displays the I/O 68c2ecf20Sopenharmony_ci statistics of disk <disk>. They contain 11 fields: 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci == ============================================== 98c2ecf20Sopenharmony_ci 1 reads completed successfully 108c2ecf20Sopenharmony_ci 2 reads merged 118c2ecf20Sopenharmony_ci 3 sectors read 128c2ecf20Sopenharmony_ci 4 time spent reading (ms) 138c2ecf20Sopenharmony_ci 5 writes completed 148c2ecf20Sopenharmony_ci 6 writes merged 158c2ecf20Sopenharmony_ci 7 sectors written 168c2ecf20Sopenharmony_ci 8 time spent writing (ms) 178c2ecf20Sopenharmony_ci 9 I/Os currently in progress 188c2ecf20Sopenharmony_ci 10 time spent doing I/Os (ms) 198c2ecf20Sopenharmony_ci 11 weighted time spent doing I/Os (ms) 208c2ecf20Sopenharmony_ci 12 discards completed 218c2ecf20Sopenharmony_ci 13 discards merged 228c2ecf20Sopenharmony_ci 14 sectors discarded 238c2ecf20Sopenharmony_ci 15 time spent discarding (ms) 248c2ecf20Sopenharmony_ci 16 flush requests completed 258c2ecf20Sopenharmony_ci 17 time spent flushing (ms) 268c2ecf20Sopenharmony_ci == ============================================== 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci For more details refer Documentation/admin-guide/iostats.rst 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/<part>/stat 328c2ecf20Sopenharmony_ciDate: February 2008 338c2ecf20Sopenharmony_ciContact: Jerome Marchand <jmarchan@redhat.com> 348c2ecf20Sopenharmony_ciDescription: 358c2ecf20Sopenharmony_ci The /sys/block/<disk>/<part>/stat files display the 368c2ecf20Sopenharmony_ci I/O statistics of partition <part>. The format is the 378c2ecf20Sopenharmony_ci same as the above-written /sys/block/<disk>/stat 388c2ecf20Sopenharmony_ci format. 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/integrity/format 428c2ecf20Sopenharmony_ciDate: June 2008 438c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 448c2ecf20Sopenharmony_ciDescription: 458c2ecf20Sopenharmony_ci Metadata format for integrity capable block device. 468c2ecf20Sopenharmony_ci E.g. T10-DIF-TYPE1-CRC. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/integrity/read_verify 508c2ecf20Sopenharmony_ciDate: June 2008 518c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 528c2ecf20Sopenharmony_ciDescription: 538c2ecf20Sopenharmony_ci Indicates whether the block layer should verify the 548c2ecf20Sopenharmony_ci integrity of read requests serviced by devices that 558c2ecf20Sopenharmony_ci support sending integrity metadata. 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/integrity/tag_size 598c2ecf20Sopenharmony_ciDate: June 2008 608c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 618c2ecf20Sopenharmony_ciDescription: 628c2ecf20Sopenharmony_ci Number of bytes of integrity tag space available per 638c2ecf20Sopenharmony_ci 512 bytes of data. 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/integrity/device_is_integrity_capable 678c2ecf20Sopenharmony_ciDate: July 2014 688c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 698c2ecf20Sopenharmony_ciDescription: 708c2ecf20Sopenharmony_ci Indicates whether a storage device is capable of storing 718c2ecf20Sopenharmony_ci integrity metadata. Set if the device is T10 PI-capable. 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/integrity/protection_interval_bytes 748c2ecf20Sopenharmony_ciDate: July 2015 758c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 768c2ecf20Sopenharmony_ciDescription: 778c2ecf20Sopenharmony_ci Describes the number of data bytes which are protected 788c2ecf20Sopenharmony_ci by one integrity tuple. Typically the device's logical 798c2ecf20Sopenharmony_ci block size. 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/integrity/write_generate 828c2ecf20Sopenharmony_ciDate: June 2008 838c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 848c2ecf20Sopenharmony_ciDescription: 858c2ecf20Sopenharmony_ci Indicates whether the block layer should automatically 868c2ecf20Sopenharmony_ci generate checksums for write requests bound for 878c2ecf20Sopenharmony_ci devices that support receiving integrity metadata. 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/alignment_offset 908c2ecf20Sopenharmony_ciDate: April 2009 918c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 928c2ecf20Sopenharmony_ciDescription: 938c2ecf20Sopenharmony_ci Storage devices may report a physical block size that is 948c2ecf20Sopenharmony_ci bigger than the logical block size (for instance a drive 958c2ecf20Sopenharmony_ci with 4KB physical sectors exposing 512-byte logical 968c2ecf20Sopenharmony_ci blocks to the operating system). This parameter 978c2ecf20Sopenharmony_ci indicates how many bytes the beginning of the device is 988c2ecf20Sopenharmony_ci offset from the disk's natural alignment. 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/<partition>/alignment_offset 1018c2ecf20Sopenharmony_ciDate: April 2009 1028c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1038c2ecf20Sopenharmony_ciDescription: 1048c2ecf20Sopenharmony_ci Storage devices may report a physical block size that is 1058c2ecf20Sopenharmony_ci bigger than the logical block size (for instance a drive 1068c2ecf20Sopenharmony_ci with 4KB physical sectors exposing 512-byte logical 1078c2ecf20Sopenharmony_ci blocks to the operating system). This parameter 1088c2ecf20Sopenharmony_ci indicates how many bytes the beginning of the partition 1098c2ecf20Sopenharmony_ci is offset from the disk's natural alignment. 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/logical_block_size 1128c2ecf20Sopenharmony_ciDate: May 2009 1138c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1148c2ecf20Sopenharmony_ciDescription: 1158c2ecf20Sopenharmony_ci This is the smallest unit the storage device can 1168c2ecf20Sopenharmony_ci address. It is typically 512 bytes. 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/physical_block_size 1198c2ecf20Sopenharmony_ciDate: May 2009 1208c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1218c2ecf20Sopenharmony_ciDescription: 1228c2ecf20Sopenharmony_ci This is the smallest unit a physical storage device can 1238c2ecf20Sopenharmony_ci write atomically. It is usually the same as the logical 1248c2ecf20Sopenharmony_ci block size but may be bigger. One example is SATA 1258c2ecf20Sopenharmony_ci drives with 4KB sectors that expose a 512-byte logical 1268c2ecf20Sopenharmony_ci block size to the operating system. For stacked block 1278c2ecf20Sopenharmony_ci devices the physical_block_size variable contains the 1288c2ecf20Sopenharmony_ci maximum physical_block_size of the component devices. 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/minimum_io_size 1318c2ecf20Sopenharmony_ciDate: April 2009 1328c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1338c2ecf20Sopenharmony_ciDescription: 1348c2ecf20Sopenharmony_ci Storage devices may report a granularity or preferred 1358c2ecf20Sopenharmony_ci minimum I/O size which is the smallest request the 1368c2ecf20Sopenharmony_ci device can perform without incurring a performance 1378c2ecf20Sopenharmony_ci penalty. For disk drives this is often the physical 1388c2ecf20Sopenharmony_ci block size. For RAID arrays it is often the stripe 1398c2ecf20Sopenharmony_ci chunk size. A properly aligned multiple of 1408c2ecf20Sopenharmony_ci minimum_io_size is the preferred request size for 1418c2ecf20Sopenharmony_ci workloads where a high number of I/O operations is 1428c2ecf20Sopenharmony_ci desired. 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/optimal_io_size 1458c2ecf20Sopenharmony_ciDate: April 2009 1468c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1478c2ecf20Sopenharmony_ciDescription: 1488c2ecf20Sopenharmony_ci Storage devices may report an optimal I/O size, which is 1498c2ecf20Sopenharmony_ci the device's preferred unit for sustained I/O. This is 1508c2ecf20Sopenharmony_ci rarely reported for disk drives. For RAID arrays it is 1518c2ecf20Sopenharmony_ci usually the stripe width or the internal track size. A 1528c2ecf20Sopenharmony_ci properly aligned multiple of optimal_io_size is the 1538c2ecf20Sopenharmony_ci preferred request size for workloads where sustained 1548c2ecf20Sopenharmony_ci throughput is desired. If no optimal I/O size is 1558c2ecf20Sopenharmony_ci reported this file contains 0. 1568c2ecf20Sopenharmony_ci 1578c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/nomerges 1588c2ecf20Sopenharmony_ciDate: January 2010 1598c2ecf20Sopenharmony_ciContact: 1608c2ecf20Sopenharmony_ciDescription: 1618c2ecf20Sopenharmony_ci Standard I/O elevator operations include attempts to 1628c2ecf20Sopenharmony_ci merge contiguous I/Os. For known random I/O loads these 1638c2ecf20Sopenharmony_ci attempts will always fail and result in extra cycles 1648c2ecf20Sopenharmony_ci being spent in the kernel. This allows one to turn off 1658c2ecf20Sopenharmony_ci this behavior on one of two ways: When set to 1, complex 1668c2ecf20Sopenharmony_ci merge checks are disabled, but the simple one-shot merges 1678c2ecf20Sopenharmony_ci with the previous I/O request are enabled. When set to 2, 1688c2ecf20Sopenharmony_ci all merge tries are disabled. The default value is 0 - 1698c2ecf20Sopenharmony_ci which enables all types of merge tries. 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/discard_alignment 1728c2ecf20Sopenharmony_ciDate: May 2011 1738c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1748c2ecf20Sopenharmony_ciDescription: 1758c2ecf20Sopenharmony_ci Devices that support discard functionality may 1768c2ecf20Sopenharmony_ci internally allocate space in units that are bigger than 1778c2ecf20Sopenharmony_ci the exported logical block size. The discard_alignment 1788c2ecf20Sopenharmony_ci parameter indicates how many bytes the beginning of the 1798c2ecf20Sopenharmony_ci device is offset from the internal allocation unit's 1808c2ecf20Sopenharmony_ci natural alignment. 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/<partition>/discard_alignment 1838c2ecf20Sopenharmony_ciDate: May 2011 1848c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1858c2ecf20Sopenharmony_ciDescription: 1868c2ecf20Sopenharmony_ci Devices that support discard functionality may 1878c2ecf20Sopenharmony_ci internally allocate space in units that are bigger than 1888c2ecf20Sopenharmony_ci the exported logical block size. The discard_alignment 1898c2ecf20Sopenharmony_ci parameter indicates how many bytes the beginning of the 1908c2ecf20Sopenharmony_ci partition is offset from the internal allocation unit's 1918c2ecf20Sopenharmony_ci natural alignment. 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/discard_granularity 1948c2ecf20Sopenharmony_ciDate: May 2011 1958c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 1968c2ecf20Sopenharmony_ciDescription: 1978c2ecf20Sopenharmony_ci Devices that support discard functionality may 1988c2ecf20Sopenharmony_ci internally allocate space using units that are bigger 1998c2ecf20Sopenharmony_ci than the logical block size. The discard_granularity 2008c2ecf20Sopenharmony_ci parameter indicates the size of the internal allocation 2018c2ecf20Sopenharmony_ci unit in bytes if reported by the device. Otherwise the 2028c2ecf20Sopenharmony_ci discard_granularity will be set to match the device's 2038c2ecf20Sopenharmony_ci physical block size. A discard_granularity of 0 means 2048c2ecf20Sopenharmony_ci that the device does not support discard functionality. 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/discard_max_bytes 2078c2ecf20Sopenharmony_ciDate: May 2011 2088c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 2098c2ecf20Sopenharmony_ciDescription: 2108c2ecf20Sopenharmony_ci Devices that support discard functionality may have 2118c2ecf20Sopenharmony_ci internal limits on the number of bytes that can be 2128c2ecf20Sopenharmony_ci trimmed or unmapped in a single operation. Some storage 2138c2ecf20Sopenharmony_ci protocols also have inherent limits on the number of 2148c2ecf20Sopenharmony_ci blocks that can be described in a single command. The 2158c2ecf20Sopenharmony_ci discard_max_bytes parameter is set by the device driver 2168c2ecf20Sopenharmony_ci to the maximum number of bytes that can be discarded in 2178c2ecf20Sopenharmony_ci a single operation. Discard requests issued to the 2188c2ecf20Sopenharmony_ci device must not exceed this limit. A discard_max_bytes 2198c2ecf20Sopenharmony_ci value of 0 means that the device does not support 2208c2ecf20Sopenharmony_ci discard functionality. 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/discard_zeroes_data 2238c2ecf20Sopenharmony_ciDate: May 2011 2248c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 2258c2ecf20Sopenharmony_ciDescription: 2268c2ecf20Sopenharmony_ci Will always return 0. Don't rely on any specific behavior 2278c2ecf20Sopenharmony_ci for discards, and don't read this file. 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/write_same_max_bytes 2308c2ecf20Sopenharmony_ciDate: January 2012 2318c2ecf20Sopenharmony_ciContact: Martin K. Petersen <martin.petersen@oracle.com> 2328c2ecf20Sopenharmony_ciDescription: 2338c2ecf20Sopenharmony_ci Some devices support a write same operation in which a 2348c2ecf20Sopenharmony_ci single data block can be written to a range of several 2358c2ecf20Sopenharmony_ci contiguous blocks on storage. This can be used to wipe 2368c2ecf20Sopenharmony_ci areas on disk or to initialize drives in a RAID 2378c2ecf20Sopenharmony_ci configuration. write_same_max_bytes indicates how many 2388c2ecf20Sopenharmony_ci bytes can be written in a single write same command. If 2398c2ecf20Sopenharmony_ci write_same_max_bytes is 0, write same is not supported 2408c2ecf20Sopenharmony_ci by the device. 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/write_zeroes_max_bytes 2438c2ecf20Sopenharmony_ciDate: November 2016 2448c2ecf20Sopenharmony_ciContact: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> 2458c2ecf20Sopenharmony_ciDescription: 2468c2ecf20Sopenharmony_ci Devices that support write zeroes operation in which a 2478c2ecf20Sopenharmony_ci single request can be issued to zero out the range of 2488c2ecf20Sopenharmony_ci contiguous blocks on storage without having any payload 2498c2ecf20Sopenharmony_ci in the request. This can be used to optimize writing zeroes 2508c2ecf20Sopenharmony_ci to the devices. write_zeroes_max_bytes indicates how many 2518c2ecf20Sopenharmony_ci bytes can be written in a single write zeroes command. If 2528c2ecf20Sopenharmony_ci write_zeroes_max_bytes is 0, write zeroes is not supported 2538c2ecf20Sopenharmony_ci by the device. 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/zoned 2568c2ecf20Sopenharmony_ciDate: September 2016 2578c2ecf20Sopenharmony_ciContact: Damien Le Moal <damien.lemoal@wdc.com> 2588c2ecf20Sopenharmony_ciDescription: 2598c2ecf20Sopenharmony_ci zoned indicates if the device is a zoned block device 2608c2ecf20Sopenharmony_ci and the zone model of the device if it is indeed zoned. 2618c2ecf20Sopenharmony_ci The possible values indicated by zoned are "none" for 2628c2ecf20Sopenharmony_ci regular block devices and "host-aware" or "host-managed" 2638c2ecf20Sopenharmony_ci for zoned block devices. The characteristics of 2648c2ecf20Sopenharmony_ci host-aware and host-managed zoned block devices are 2658c2ecf20Sopenharmony_ci described in the ZBC (Zoned Block Commands) and ZAC 2668c2ecf20Sopenharmony_ci (Zoned Device ATA Command Set) standards. These standards 2678c2ecf20Sopenharmony_ci also define the "drive-managed" zone model. However, 2688c2ecf20Sopenharmony_ci since drive-managed zoned block devices do not support 2698c2ecf20Sopenharmony_ci zone commands, they will be treated as regular block 2708c2ecf20Sopenharmony_ci devices and zoned will report "none". 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/nr_zones 2738c2ecf20Sopenharmony_ciDate: November 2018 2748c2ecf20Sopenharmony_ciContact: Damien Le Moal <damien.lemoal@wdc.com> 2758c2ecf20Sopenharmony_ciDescription: 2768c2ecf20Sopenharmony_ci nr_zones indicates the total number of zones of a zoned block 2778c2ecf20Sopenharmony_ci device ("host-aware" or "host-managed" zone model). For regular 2788c2ecf20Sopenharmony_ci block devices, the value is always 0. 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/max_active_zones 2818c2ecf20Sopenharmony_ciDate: July 2020 2828c2ecf20Sopenharmony_ciContact: Niklas Cassel <niklas.cassel@wdc.com> 2838c2ecf20Sopenharmony_ciDescription: 2848c2ecf20Sopenharmony_ci For zoned block devices (zoned attribute indicating 2858c2ecf20Sopenharmony_ci "host-managed" or "host-aware"), the sum of zones belonging to 2868c2ecf20Sopenharmony_ci any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED, 2878c2ecf20Sopenharmony_ci is limited by this value. If this value is 0, there is no limit. 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/max_open_zones 2908c2ecf20Sopenharmony_ciDate: July 2020 2918c2ecf20Sopenharmony_ciContact: Niklas Cassel <niklas.cassel@wdc.com> 2928c2ecf20Sopenharmony_ciDescription: 2938c2ecf20Sopenharmony_ci For zoned block devices (zoned attribute indicating 2948c2ecf20Sopenharmony_ci "host-managed" or "host-aware"), the sum of zones belonging to 2958c2ecf20Sopenharmony_ci any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN, 2968c2ecf20Sopenharmony_ci is limited by this value. If this value is 0, there is no limit. 2978c2ecf20Sopenharmony_ci 2988c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/chunk_sectors 2998c2ecf20Sopenharmony_ciDate: September 2016 3008c2ecf20Sopenharmony_ciContact: Hannes Reinecke <hare@suse.com> 3018c2ecf20Sopenharmony_ciDescription: 3028c2ecf20Sopenharmony_ci chunk_sectors has different meaning depending on the type 3038c2ecf20Sopenharmony_ci of the disk. For a RAID device (dm-raid), chunk_sectors 3048c2ecf20Sopenharmony_ci indicates the size in 512B sectors of the RAID volume 3058c2ecf20Sopenharmony_ci stripe segment. For a zoned block device, either 3068c2ecf20Sopenharmony_ci host-aware or host-managed, chunk_sectors indicates the 3078c2ecf20Sopenharmony_ci size in 512B sectors of the zones of the device, with 3088c2ecf20Sopenharmony_ci the eventual exception of the last zone of the device 3098c2ecf20Sopenharmony_ci which may be smaller. 3108c2ecf20Sopenharmony_ci 3118c2ecf20Sopenharmony_ciWhat: /sys/block/<disk>/queue/io_timeout 3128c2ecf20Sopenharmony_ciDate: November 2018 3138c2ecf20Sopenharmony_ciContact: Weiping Zhang <zhangweiping@didiglobal.com> 3148c2ecf20Sopenharmony_ciDescription: 3158c2ecf20Sopenharmony_ci io_timeout is the request timeout in milliseconds. If a request 3168c2ecf20Sopenharmony_ci does not complete in this time then the block driver timeout 3178c2ecf20Sopenharmony_ci handler is invoked. That timeout handler can decide to retry 3188c2ecf20Sopenharmony_ci the request, to fail it or to start a device recovery strategy. 319