요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Integrity metadata와 partition
sysfs-block:106-218T10 Protection Information과 application tag, partition scan·alignment·통계를 다룹니다.
Queue crypto와 discard
sysfs-block:221-426Inline encryption capability, discard hardware·software limit, DAX, FUA, independent access range를 다룹니다.
Queue poll, timeout과 I/O limit
sysfs-block:429-680Polling, timeout, request·segment·zone 한계, merge, readahead, affinity를 다룹니다.
Scheduler, write와 zoned storage
sysfs-block:681-881I/O scheduler, stable write, writeback throttling, cache, zeroing, zone model과 17개 통계 field를 다룹니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/block/<disk>/alignment_offset
Date: April 2009
Contact: Martin K. Petersen <[email protected]>
Description:
Storage devices may report a physical block size that is
bigger than the logical block size (for instance a drive
with 4KB physical sectors exposing 512-byte logical
blocks to the operating system). This parameter
indicates how many bytes the beginning of the device is
offset from the disk's natural alignment.
What: /sys/block/<disk>/discard_alignment
Date: May 2011
Contact: Martin K. Petersen <[email protected]>
Description:
Devices that support discard functionality may
internally allocate space in units that are bigger than
the exported logical block size. The discard_alignment
parameter indicates how many bytes the beginning of the
device is offset from the internal allocation unit's
natural alignment.
What: /sys/block/<disk>/atomic_write_max_bytes
Date: February 2024
Contact: Himanshu Madhani <[email protected]>
Description:
[RO] This parameter specifies the maximum atomic write
size reported by the device. This parameter is relevant
for merging of writes, where a merged atomic write
operation must not exceed this number of bytes.
This parameter may be greater than the value in
atomic_write_unit_max_bytes as
atomic_write_unit_max_bytes will be rounded down to a
power-of-two and atomic_write_unit_max_bytes may also be
limited by some other queue limits, such as max_segments.
This parameter - along with atomic_write_unit_min_bytes
and atomic_write_unit_max_bytes - will not be larger than
max_hw_sectors_kb, but may be larger than max_sectors_kb.
What: /sys/block/<disk>/atomic_write_unit_min_bytes
Date: February 2024
Contact: Himanshu Madhani <[email protected]>
Description:
[RO] This parameter specifies the smallest block which can
be written atomically with an atomic write operation. All
atomic write operations must begin at a
atomic_write_unit_min boundary and must be multiples of
atomic_write_unit_min. This value must be a power-of-two.
What: /sys/block/<disk>/atomic_write_unit_max_bytes
Date: February 2024
Contact: Himanshu Madhani <[email protected]>
Description:
[RO] This parameter defines the largest block which can be
written atomically with an atomic write operation. This
value must be a multiple of atomic_write_unit_min and must
be a power-of-two. This value will not be larger than
atomic_write_max_bytes.
What: /sys/block/<disk>/atomic_write_boundary_bytes
Date: February 2024
Contact: Himanshu Madhani <[email protected]>
Description:
[RO] A device may need to internally split an atomic write I/O
which straddles a given logical block address boundary. This
parameter specifies the size in bytes of the atomic boundary if
one is reported by the device. This value must be a
power-of-two and at least the size as in
atomic_write_unit_max_bytes.
Any attempt to merge atomic write I/Os must not result in a
merged I/O which crosses this boundary (if any).
What: /sys/block/<disk>/diskseq
Date: February 2021
Contact: Matteo Croce <[email protected]>
Description:
The /sys/block/<disk>/diskseq files reports the disk
sequence number, which is a monotonically increasing
number assigned to every drive.
Some devices, like the loop device, refresh such number
every time the backing file is changed.
The value type is 64 bit unsigned.
What: /sys/block/<disk>/inflight
Date: October 2009
Contact: Jens Axboe <[email protected]>, Nikanth Karthikesan <[email protected]>
Description:
Reports the number of I/O requests currently in progress
(pending / in flight) in a device driver. This can be less
than the number of requests queued in the block device queue.
The report contains 2 fields: one for read requests
and one for write requests.
The value type is unsigned int.
Cf. Documentation/block/stat.rst which contains a single value for
requests in flight.
This is related to /sys/block/<disk>/queue/nr_requests
and for SCSI device also its queue_depth.
What: /sys/block/<disk>/integrity/device_is_integrity_capable
Date: July 2014
Contact: Martin K. Petersen <[email protected]>
Description:
Indicates whether a storage device is capable of storing
integrity metadata. Set if the device is T10 PI-capable.
This flag is set to 1 if the storage media is formatted
with T10 Protection Information. If the storage media is
not formatted with T10 Protection Information, this flag
is set to 0.
What: /sys/block/<disk>/integrity/format
Date: June 2008
Contact: Martin K. Petersen <[email protected]>
Description:
Metadata format for integrity capable block device.
E.g. T10-DIF-TYPE1-CRC.
This field describes the type of T10 Protection Information
that the block device can send and receive.
If the device can store application integrity metadata but
no T10 Protection Information profile is used, this field
contains "nop".
If the device does not support integrity metadata, this
field contains "none".
What: /sys/block/<disk>/integrity/protection_interval_bytes
Date: July 2015
Contact: Martin K. Petersen <[email protected]>
Description:
Describes the number of data bytes which are protected
by one integrity tuple. Typically the device's logical
block size.
What: /sys/block/<disk>/integrity/read_verify
Date: June 2008
Contact: Martin K. Petersen <[email protected]>
Description:
Indicates whether the block layer should verify the
integrity of read requests serviced by devices that
support sending integrity metadata.
What: /sys/block/<disk>/integrity/tag_size
Date: June 2008
Contact: Martin K. Petersen <[email protected]>
Description:
Number of bytes of integrity tag space available per
protection_interval_bytes, which is typically
the device's logical block size.
This field describes the size of the application tag
if the storage device is formatted with T10 Protection
Information and permits use of the application tag.
The tag_size is reported in bytes and indicates the
space available for adding an opaque tag to each block
(protection_interval_bytes).
If the device does not support T10 Protection Information
(even if the device provides application integrity
metadata space), this field is set to 0.
What: /sys/block/<disk>/integrity/write_generate
Date: June 2008
Contact: Martin K. Petersen <[email protected]>
Description:
Indicates whether the block layer should automatically
generate checksums for write requests bound for
devices that support receiving integrity metadata.
What: /sys/block/<disk>/partscan
Date: May 2024
Contact: Christoph Hellwig <[email protected]>
Description:
The /sys/block/<disk>/partscan files reports if partition
scanning is enabled for the disk. It returns "1" if partition
scanning is enabled, or "0" if not. The value type is a 32-bit
unsigned integer, but only "0" and "1" are valid values.
What: /sys/block/<disk>/<partition>/alignment_offset
Date: April 2009
Contact: Martin K. Petersen <[email protected]>
Description:
Storage devices may report a physical block size that is
bigger than the logical block size (for instance a drive
with 4KB physical sectors exposing 512-byte logical
blocks to the operating system). This parameter
indicates how many bytes the beginning of the partition
is offset from the disk's natural alignment.
What: /sys/block/<disk>/<partition>/discard_alignment
Date: May 2011
Contact: Martin K. Petersen <[email protected]>
Description:
Devices that support discard functionality may
internally allocate space in units that are bigger than
the exported logical block size. The discard_alignment
parameter indicates how many bytes the beginning of the
partition is offset from the internal allocation unit's
natural alignment.
What: /sys/block/<disk>/<partition>/stat
Date: February 2008
Contact: Jerome Marchand <[email protected]>
Description:
The /sys/block/<disk>/<partition>/stat files display the
I/O statistics of partition <partition>. The format is the
same as the format of /sys/block/<disk>/stat.
What: /sys/block/<disk>/queue/add_random
Date: June 2010
Contact: [email protected]
Description:
[RW] This file allows to turn off the disk entropy contribution.
Default value of this file is '1'(on).
What: /sys/block/<disk>/queue/chunk_sectors
Date: September 2016
Contact: Hannes Reinecke <[email protected]>
Description:
[RO] chunk_sectors has different meaning depending on the type
of the disk. For a RAID device (dm-raid), chunk_sectors
indicates the size in 512B sectors of the RAID volume stripe
segment. For a zoned block device, either host-aware or
host-managed, chunk_sectors indicates the size in 512B sectors
of the zones of the device, with the eventual exception of the
last zone of the device which may be smaller.
What: /sys/block/<disk>/queue/crypto/
Date: February 2022
Contact: [email protected]
Description:
The presence of this subdirectory of /sys/block/<disk>/queue/
indicates that the device supports inline encryption. This
subdirectory contains files which describe the inline encryption
capabilities of the device. For more information about inline
encryption, refer to Documentation/block/inline-encryption.rst.
What: /sys/block/<disk>/queue/crypto/hw_wrapped_keys
Date: February 2025
Contact: [email protected]
Description:
[RO] The presence of this file indicates that the device
supports hardware-wrapped inline encryption keys, i.e. key blobs
that can only be unwrapped and used by dedicated hardware. For
more information about hardware-wrapped inline encryption keys,
see Documentation/block/inline-encryption.rst.
What: /sys/block/<disk>/queue/crypto/max_dun_bits
Date: February 2022
Contact: [email protected]
Description:
[RO] This file shows the maximum length, in bits, of data unit
numbers accepted by the device in inline encryption requests.
What: /sys/block/<disk>/queue/crypto/modes/<mode>
Date: February 2022
Contact: [email protected]
Description:
[RO] For each crypto mode (i.e., encryption/decryption
algorithm) the device supports with inline encryption, a file
will exist at this location. It will contain a hexadecimal
number that is a bitmask of the supported data unit sizes, in
bytes, for that crypto mode.
Currently, the crypto modes that may be supported are:
* AES-256-XTS
* AES-128-CBC-ESSIV
* Adiantum
For example, if a device supports AES-256-XTS inline encryption
with data unit sizes of 512 and 4096 bytes, the file
/sys/block/<disk>/queue/crypto/modes/AES-256-XTS will exist and
will contain "0x1200".
What: /sys/block/<disk>/queue/crypto/num_keyslots
Date: February 2022
Contact: [email protected]
Description:
[RO] This file shows the number of keyslots the device has for
use with inline encryption.
What: /sys/block/<disk>/queue/crypto/raw_keys
Date: February 2025
Contact: [email protected]
Description:
[RO] The presence of this file indicates that the device
supports raw inline encryption keys, i.e. keys that are managed
in raw, plaintext form in software.
What: /sys/block/<disk>/queue/dax
Date: June 2016
Contact: [email protected]
Description:
[RO] This file indicates whether the device supports Direct
Access (DAX), used by CPU-addressable storage to bypass the
pagecache. It shows '1' if true, '0' if not.
What: /sys/block/<disk>/queue/discard_granularity
Date: May 2011
Contact: Martin K. Petersen <[email protected]>
Description:
[RO] Devices that support discard functionality may internally
allocate space using units that are bigger than the logical
block size. The discard_granularity parameter indicates the size
of the internal allocation unit in bytes if reported by the
device. Otherwise the discard_granularity will be set to match
the device's physical block size. A discard_granularity of 0
means that the device does not support discard functionality.
What: /sys/block/<disk>/queue/discard_max_bytes
Date: May 2011
Contact: Martin K. Petersen <[email protected]>
Description:
[RW] While discard_max_hw_bytes is the hardware limit for the
device, this setting is the software limit. Some devices exhibit
large latencies when large discards are issued, setting this
value lower will make Linux issue smaller discards and
potentially help reduce latencies induced by large discard
operations.
What: /sys/block/<disk>/queue/discard_max_hw_bytes
Date: July 2015
Contact: [email protected]
Description:
[RO] Devices that support discard functionality may have
internal limits on the number of bytes that can be trimmed or
unmapped in a single operation. The `discard_max_hw_bytes`
parameter is set by the device driver to the maximum number of
bytes that can be discarded in a single operation. Discard
requests issued to the device must not exceed this limit. A
`discard_max_hw_bytes` value of 0 means that the device does not
support discard functionality.
What: /sys/block/<disk>/queue/discard_zeroes_data
Date: May 2011
Contact: Martin K. Petersen <[email protected]>
Description:
[RO] Will always return 0. Don't rely on any specific behavior
for discards, and don't read this file.
What: /sys/block/<disk>/queue/dma_alignment
Date: May 2022
Contact: [email protected]
Description:
Reports the alignment that user space addresses must have to be
used for raw block device access with O_DIRECT and other driver
specific passthrough mechanisms.
What: /sys/block/<disk>/queue/fua
Date: May 2018
Contact: [email protected]
Description:
[RO] Whether or not the block driver supports the FUA flag for
write requests. FUA stands for Force Unit Access. If the FUA
flag is set that means that write requests must bypass the
volatile cache of the storage device.
What: /sys/block/<disk>/queue/hw_sector_size
Date: January 2008
Contact: [email protected]
Description:
[RO] This is the hardware sector size of the device, in bytes.
What: /sys/block/<disk>/queue/independent_access_ranges/
Date: October 2021
Contact: [email protected]
Description:
[RO] The presence of this sub-directory of the
/sys/block/xxx/queue/ directory indicates that the device is
capable of executing requests targeting different sector ranges
in parallel. For instance, single LUN multi-actuator hard-disks
will have an independent_access_ranges directory if the device
correctly advertises the sector ranges of its actuators.
The independent_access_ranges directory contains one directory
per access range, with each range described using the sector
(RO) attribute file to indicate the first sector of the range
and the nr_sectors (RO) attribute file to indicate the total
number of sectors in the range starting from the first sector of
the range. For example, a dual-actuator hard-disk will have the
following independent_access_ranges entries.::
$ tree /sys/block/<disk>/queue/independent_access_ranges/
/sys/block/<disk>/queue/independent_access_ranges/
|-- 0
| |-- nr_sectors
| `-- sector
`-- 1
|-- nr_sectors
`-- sector
The sector and nr_sectors attributes use 512B sector unit,
regardless of the actual block size of the device. Independent
access ranges do not overlap and include all sectors within the
device capacity. The access ranges are numbered in increasing
order of the range start sector, that is, the sector attribute
of range 0 always has the value 0.
What: /sys/block/<disk>/queue/io_poll
Date: November 2015
Contact: [email protected]
Description:
[RW] When read, this file shows whether polling is enabled (1)
or disabled (0). Writing '0' to this file will disable polling
for this device. Writing any non-zero value will enable this
feature.
What: /sys/block/<disk>/queue/io_poll_delay
Date: November 2016
Contact: [email protected]
Description:
[RW] This was used to control what kind of polling will be
performed. It is now fixed to -1, which is classic polling.
In this mode, the CPU will repeatedly ask for completions
without giving up any time.
<deprecated>
What: /sys/block/<disk>/queue/io_timeout
Date: November 2018
Contact: Weiping Zhang <[email protected]>
Description:
[RW] io_timeout is the request timeout in milliseconds. If a
request does not complete in this time then the block driver
timeout handler is invoked. That timeout handler can decide to
retry the request, to fail it or to start a device recovery
strategy.
What: /sys/block/<disk>/queue/iostats
Date: January 2009
Contact: [email protected]
Description:
[RW] This file is used to control (on/off) the iostats
accounting of the disk.
What: /sys/block/<disk>/queue/iostats_passthrough
Date: October 2024
Contact: [email protected]
Description:
[RW] This file is used to control (on/off) the iostats
accounting of the disk for passthrough commands.
What: /sys/block/<disk>/queue/logical_block_size
Date: May 2009
Contact: Martin K. Petersen <[email protected]>
Description:
[RO] This is the smallest unit the storage device can address.
It is typically 512 bytes.
What: /sys/block/<disk>/queue/max_active_zones
Date: July 2020
Contact: Niklas Cassel <[email protected]>
Description:
[RO] For zoned block devices (zoned attribute indicating
"host-managed" or "host-aware"), the sum of zones belonging to
any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED,
is limited by this value. If this value is 0, there is no limit.
If the host attempts to exceed this limit, the driver should
report this error with BLK_STS_ZONE_ACTIVE_RESOURCE, which user
space may see as the EOVERFLOW errno.
What: /sys/block/<disk>/queue/max_discard_segments
Date: February 2017
Contact: [email protected]
Description:
[RO] The maximum number of DMA scatter/gather entries in a
discard request.
What: /sys/block/<disk>/queue/max_hw_sectors_kb
Date: September 2004
Contact: [email protected]
Description:
[RO] This is the maximum number of kilobytes supported in a
single data transfer.
What: /sys/block/<disk>/queue/max_integrity_segments
Date: September 2010
Contact: [email protected]
Description:
[RO] Maximum number of elements in a DMA scatter/gather list
with integrity data that will be submitted by the block layer
core to the associated block driver.
What: /sys/block/<disk>/queue/max_open_zones
Date: July 2020
Contact: Niklas Cassel <[email protected]>
Description:
[RO] For zoned block devices (zoned attribute indicating
"host-managed" or "host-aware"), the sum of zones belonging to
any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN, is
limited by this value. If this value is 0, there is no limit.
What: /sys/block/<disk>/queue/max_sectors_kb
Date: September 2004
Contact: [email protected]
Description:
[RW] This is the maximum number of kilobytes that the block
layer will allow for a filesystem request. Must be smaller than
or equal to the maximum size allowed by the hardware. Write 0
to use default kernel settings.
What: /sys/block/<disk>/queue/max_segment_size
Date: March 2010
Contact: [email protected]
Description:
[RO] Maximum size in bytes of a single element in a DMA
scatter/gather list.
What: /sys/block/<disk>/queue/max_write_streams
Date: November 2024
Contact: [email protected]
Description:
[RO] Maximum number of write streams supported, 0 if not
supported. If supported, valid values are 1 through
max_write_streams, inclusive.
What: /sys/block/<disk>/queue/write_stream_granularity
Date: November 2024
Contact: [email protected]
Description:
[RO] Granularity of a write stream in bytes. The granularity
of a write stream is the size that should be discarded or
overwritten together to avoid write amplification in the device.
What: /sys/block/<disk>/queue/max_segments
Date: March 2010
Contact: [email protected]
Description:
[RO] Maximum number of elements in a DMA scatter/gather list
that is submitted to the associated block driver.
What: /sys/block/<disk>/queue/minimum_io_size
Date: April 2009
Contact: Martin K. Petersen <[email protected]>
Description:
[RO] Storage devices may report a granularity or preferred
minimum I/O size which is the smallest request the device can
perform without incurring a performance penalty. For disk
drives this is often the physical block size. For RAID arrays
it is often the stripe chunk size. A properly aligned multiple
of minimum_io_size is the preferred request size for workloads
where a high number of I/O operations is desired.
What: /sys/block/<disk>/queue/nomerges
Date: January 2010
Contact: [email protected]
Description:
[RW] Standard I/O elevator operations include attempts to merge
contiguous I/Os. For known random I/O loads these attempts will
always fail and result in extra cycles being spent in the
kernel. This allows one to turn off this behavior on one of two
ways: When set to 1, complex merge checks are disabled, but the
simple one-shot merges with the previous I/O request are
enabled. When set to 2, all merge tries are disabled. The
default value is 0 - which enables all types of merge tries.
What: /sys/block/<disk>/queue/nr_requests
Date: July 2003
Contact: [email protected]
Description:
[RW] This controls how many requests may be allocated in the
block layer. Noted this value only represents the quantity for a
single blk_mq_tags instance. The actual number for the entire
device depends on the hardware queue count, whether elevator is
enabled, and whether tags are shared.
What: /sys/block/<disk>/queue/nr_zones
Date: November 2018
Contact: Damien Le Moal <[email protected]>
Description:
[RO] nr_zones indicates the total number of zones of a zoned
block device ("host-aware" or "host-managed" zone model). For
regular block devices, the value is always 0.
What: /sys/block/<disk>/queue/optimal_io_size
Date: April 2009
Contact: Martin K. Petersen <[email protected]>
Description:
[RO] Storage devices may report an optimal I/O size, which is
the device's preferred unit for sustained I/O. This is rarely
reported for disk drives. For RAID arrays it is usually the
stripe width or the internal track size. A properly aligned
multiple of optimal_io_size is the preferred request size for
workloads where sustained throughput is desired. If no optimal
I/O size is reported this file contains 0.
What: /sys/block/<disk>/queue/physical_block_size
Date: May 2009
Contact: Martin K. Petersen <[email protected]>
Description:
[RO] This is the smallest unit a physical storage device can
write atomically. It is usually the same as the logical block
size but may be bigger. One example is SATA drives with 4KB
sectors that expose a 512-byte logical block size to the
operating system. For stacked block devices the
physical_block_size variable contains the maximum
physical_block_size of the component devices.
What: /sys/block/<disk>/queue/read_ahead_kb
Date: May 2004
Contact: [email protected]
Description:
[RW] Maximum number of kilobytes to read-ahead for filesystems
on this block device.
For MADV_HUGEPAGE, the readahead size may exceed this setting
since its granularity is based on the hugepage size.
What: /sys/block/<disk>/queue/rotational
Date: January 2009
Contact: [email protected]
Description:
[RW] This file is used to stat if the device is of rotational
type or non-rotational type.
What: /sys/block/<disk>/queue/rq_affinity
Date: September 2008
Contact: [email protected]
Description:
[RW] If this option is '1', the block layer will migrate request
completions to the cpu "group" that originally submitted the
request. For some workloads this provides a significant
reduction in CPU cycles due to caching effects.
For storage configurations that need to maximize distribution of
completion processing setting this option to '2' forces the
completion to run on the requesting cpu (bypassing the "group"
aggregation logic).
What: /sys/block/<disk>/queue/scheduler
Date: October 2004
Contact: [email protected]
Description:
[RW] When read, this file will display the current and available
IO schedulers for this block device. The currently active IO
scheduler will be enclosed in [] brackets. Writing an IO
scheduler name to this file will switch control of this block
device to that new IO scheduler. Note that writing an IO
scheduler name to this file will attempt to load that IO
scheduler module, if it isn't already present in the system.
What: /sys/block/<disk>/queue/stable_writes
Date: September 2020
Contact: [email protected]
Description:
[RW] This file will contain '1' if memory must not be modified
while it is being used in a write request to this device. When
this is the case and the kernel is performing writeback of a
page, the kernel will wait for writeback to complete before
allowing the page to be modified again, rather than allowing
immediate modification as is normally the case. This
restriction arises when the device accesses the memory multiple
times where the same data must be seen every time -- for
example, once to calculate a checksum and once to actually write
the data. If no such restriction exists, this file will contain
'0'. This file is writable for testing purposes.
What: /sys/block/<disk>/queue/virt_boundary_mask
Date: April 2021
Contact: [email protected]
Description:
[RO] This file shows the I/O segment memory alignment mask for
the block device. I/O requests to this device will be split
between segments wherever either the memory address of the end
of the previous segment or the memory address of the beginning
of the current segment is not aligned to virt_boundary_mask + 1
bytes.
What: /sys/block/<disk>/queue/wbt_lat_usec
Date: November 2016
Contact: [email protected]
Description:
[RW] If the device is registered for writeback throttling, then
this file shows the target minimum read latency. If this latency
is exceeded in a given window of time (see curr_win_nsec), then
the writeback throttling will start scaling back writes. Writing
a value of '0' to this file disables the feature. Writing a
value of '-1' to this file resets the value to the default
setting.
What: /sys/block/<disk>/queue/write_cache
Date: April 2016
Contact: [email protected]
Description:
[RW] When read, this file will display whether the device has
write back caching enabled or not. It will return "write back"
for the former case, and "write through" for the latter. Writing
to this file can change the kernels view of the device, but it
doesn't alter the device state. This means that it might not be
safe to toggle the setting from "write back" to "write through",
since that will also eliminate cache flushes issued by the
kernel.
What: /sys/block/<disk>/queue/write_same_max_bytes
Date: January 2012
Contact: Martin K. Petersen <[email protected]>
Description:
[RO] Some devices support a write same operation in which a
single data block can be written to a range of several
contiguous blocks on storage. This can be used to wipe areas on
disk or to initialize drives in a RAID configuration.
write_same_max_bytes indicates how many bytes can be written in
a single write same command. If write_same_max_bytes is 0, write
same is not supported by the device.
What: /sys/block/<disk>/queue/write_zeroes_max_bytes
Date: November 2016
Contact: Chaitanya Kulkarni <[email protected]>
Description:
[RO] Devices that support write zeroes operation in which a
single request can be issued to zero out the range of contiguous
blocks on storage without having any payload in the request.
This can be used to optimize writing zeroes to the devices.
write_zeroes_max_bytes indicates how many bytes can be written
in a single write zeroes command. If write_zeroes_max_bytes is
0, write zeroes is not supported by the device.
What: /sys/block/<disk>/queue/write_zeroes_unmap_max_hw_bytes
Date: January 2025
Contact: Zhang Yi <[email protected]>
Description:
[RO] This file indicates whether a device supports zeroing data
in a specified block range without incurring the cost of
physically writing zeroes to the media for each individual
block. If this parameter is set to write_zeroes_max_bytes, the
device implements a zeroing operation which opportunistically
avoids writing zeroes to media while still guaranteeing that
subsequent reads from the specified block range will return
zeroed data. This operation is a best-effort optimization, a
device may fall back to physically writing zeroes to the media
due to other factors such as misalignment or being asked to
clear a block range smaller than the device's internal
allocation unit. If this parameter is set to 0, the device may
have to write each logical block media during a zeroing
operation.
What: /sys/block/<disk>/queue/write_zeroes_unmap_max_bytes
Date: January 2025
Contact: Zhang Yi <[email protected]>
Description:
[RW] While write_zeroes_unmap_max_hw_bytes is the hardware limit
for the device, this setting is the software limit. Since the
unmap write zeroes operation is a best-effort optimization, some
devices may still physically writing zeroes to media. So the
speed of this operation is not guaranteed. Writing a value of
'0' to this file disables this operation. Otherwise, this
parameter should be equal to write_zeroes_unmap_max_hw_bytes.
What: /sys/block/<disk>/queue/zone_append_max_bytes
Date: May 2020
Contact: [email protected]
Description:
[RO] This is the maximum number of bytes that can be written to
a sequential zone of a zoned block device using a zone append
write operation (REQ_OP_ZONE_APPEND). This value is always 0 for
regular block devices.
What: /sys/block/<disk>/queue/zone_write_granularity
Date: January 2021
Contact: [email protected]
Description:
[RO] This indicates the alignment constraint, in bytes, for
write operations in sequential zones of zoned block devices
(devices with a zoned attributed that reports "host-managed" or
"host-aware"). This value is always 0 for regular block devices.
What: /sys/block/<disk>/queue/zoned
Date: September 2016
Contact: Damien Le Moal <[email protected]>
Description:
[RO] zoned indicates if the device is a zoned block device and
the zone model of the device if it is indeed zoned. The
possible values indicated by zoned are "none" for regular block
devices and "host-aware" or "host-managed" for zoned block
devices. The characteristics of host-aware and host-managed
zoned block devices are described in the ZBC (Zoned Block
Commands) and ZAC (Zoned Device ATA Command Set) standards.
These standards also define the "drive-managed" zone model.
However, since drive-managed zoned block devices do not support
zone commands, they will be treated as regular block devices and
zoned will report "none".
What: /sys/block/<disk>/hidden
Date: March 2023
Contact: [email protected]
Description:
[RO] the block device is hidden. it doesn’t produce events, and
can’t be opened from userspace or using blkdev_get*.
Used for the underlying components of multipath devices.
What: /sys/block/<disk>/stat
Date: February 2008
Contact: Jerome Marchand <[email protected]>
Description:
The /sys/block/<disk>/stat files displays the I/O
statistics of disk <disk>. They contain 11 fields:
== ==============================================
1 reads completed successfully
2 reads merged
3 sectors read
4 time spent reading (ms)
5 writes completed
6 writes merged
7 sectors written
8 time spent writing (ms)
9 I/Os currently in progress
10 time spent doing I/Os (ms)
11 weighted time spent doing I/Os (ms)
12 discards completed
13 discards merged
14 sectors discarded
15 time spent discarding (ms)
16 flush requests completed
17 time spent flushing (ms)
== ==============================================
For more details refer Documentation/admin-guide/iostats.rst
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Disk alignment, atomic write와 실행 중 I/O
1-103| 경로 | 작성 시점·담당 | 의미 |
|---|---|---|
| /sys/block/<disk>/alignment_offset | 2009년 4월 · Martin K. Petersen | Storage device는 logical block보다 큰 physical block size를 보고할 수 있다. 예를 들어 4KB physical sector drive가 OS에는 512-byte logical block을 노출할 수 있다. 이 값은 device 시작점이 disk의 자연스러운 alignment에서 몇 byte 떨어져 있는지 나타낸다. |
| /sys/block/<disk>/discard_alignment | 2011년 5월 · Martin K. Petersen | Discard 지원 device가 exported logical block보다 큰 단위로 내부 공간을 할당할 때, device 시작점이 내부 allocation unit의 자연스러운 alignment에서 몇 byte 떨어져 있는지 나타낸다. |
| /sys/block/<disk>/atomic_write_max_bytes | 2024년 2월 · Himanshu Madhani · read-only | Device가 보고한 최대 atomic write 크기다. Write를 merge할 때 merged atomic write가 이 값을 넘으면 안 된다. atomic_write_unit_max_bytes는 2의 거듭제곱으로 내림되고 max_segments 같은 queue limit에도 제한될 수 있어 이 값이 더 클 수 있다. 이 값과 두 atomic_write_unit 값은 max_hw_sectors_kb보다 크지 않지만 max_sectors_kb보다 클 수 있다. |
| /sys/block/<disk>/atomic_write_unit_min_bytes | 2024년 2월 · Himanshu Madhani · read-only | Atomic write operation으로 원자적으로 쓸 수 있는 가장 작은 block이다. 모든 atomic write는 이 단위의 경계에서 시작하고 이 단위의 배수여야 한다. 값은 2의 거듭제곱이어야 한다. |
| /sys/block/<disk>/atomic_write_unit_max_bytes | 2024년 2월 · Himanshu Madhani · read-only | Atomic write operation으로 원자적으로 쓸 수 있는 가장 큰 block이다. atomic_write_unit_min의 배수이자 2의 거듭제곱이어야 하며 atomic_write_max_bytes보다 클 수 없다. |
| /sys/block/<disk>/atomic_write_boundary_bytes | 2024년 2월 · Himanshu Madhani · read-only | Device가 특정 logical block address 경계를 가로지르는 atomic write I/O를 내부에서 나눠야 할 때 그 경계 크기를 byte로 나타낸다. 2의 거듭제곱이며 atomic_write_unit_max_bytes 이상이어야 한다. Atomic write I/O를 merge한 결과가 이 경계를 가로질러서는 안 된다. |
| /sys/block/<disk>/diskseq | 2021년 2월 · Matteo Croce | 모든 drive에 할당하는 단조 증가 64-bit unsigned sequence number다. Loop device 같은 일부 device는 backing file이 바뀔 때마다 번호를 갱신한다. |
| /sys/block/<disk>/inflight | 2009년 10월 · Jens Axboe, Nikanth Karthikesan | Device driver에서 현재 진행 중인 pending/in-flight I/O request 수를 보고한다. Block queue에 들어 있는 request 수보다 작을 수 있다. unsigned int인 read request와 write request 두 field를 제공한다. Documentation/block/stat.rst의 단일 in-flight 값, queue/nr_requests, SCSI queue_depth와 관련된다. |
Integrity metadata
106-175아래 항목의 담당자는 Martin K. Petersen <[email protected]>이다.
| 경로 | 작성 시점 | 의미 |
|---|---|---|
| /sys/block/<disk>/integrity/device_is_integrity_capable | 2014년 7월 | Storage device가 integrity metadata를 저장할 수 있는지 나타낸다. T10 PI-capable device이며 media가 T10 Protection Information으로 format돼 있으면 1, 아니면 0이다. |
| /sys/block/<disk>/integrity/format | 2008년 6월 | Integrity capable block device의 metadata format이다. 예시는 T10-DIF-TYPE1-CRC다. Device가 송수신할 수 있는 T10 Protection Information type을 설명한다. Application integrity metadata를 저장할 수 있지만 T10 PI profile을 쓰지 않으면 nop, integrity metadata를 지원하지 않으면 none이다. |
| /sys/block/<disk>/integrity/protection_interval_bytes | 2015년 7월 | Integrity tuple 하나가 보호하는 data byte 수다. 일반적으로 device logical block size다. |
| /sys/block/<disk>/integrity/read_verify | 2008년 6월 | Integrity metadata를 보내는 device가 처리한 read request의 integrity를 block layer가 검증할지 나타낸다. |
| /sys/block/<disk>/integrity/tag_size | 2008년 6월 | protection_interval_bytes마다 사용할 수 있는 integrity tag 공간의 byte 수다. T10 PI로 format되고 application tag를 허용하면 block마다 opaque tag를 추가할 공간을 나타낸다. Application metadata 공간이 있더라도 T10 PI를 지원하지 않으면 0이다. |
| /sys/block/<disk>/integrity/write_generate | 2008년 6월 | Integrity metadata 수신을 지원하는 device로 보낼 write request의 checksum을 block layer가 자동 생성할지 나타낸다. |
Partition scan, alignment와 통계
178-218| 경로 | 작성 시점·담당 | 의미 |
|---|---|---|
| /sys/block/<disk>/partscan | 2024년 5월 · Christoph Hellwig | Disk의 partition scanning이 활성화됐으면 1, 아니면 0을 보고한다. Type은 32-bit unsigned integer지만 0과 1만 유효하다. |
| /sys/block/<disk>/<partition>/alignment_offset | 2009년 4월 · Martin K. Petersen | Partition 시작점이 disk의 자연스러운 alignment에서 몇 byte 떨어져 있는지 나타낸다. 4KB physical sector와 512-byte logical block처럼 physical block이 더 큰 device에서 필요하다. |
| /sys/block/<disk>/<partition>/discard_alignment | 2011년 5월 · Martin K. Petersen | Partition 시작점이 device 내부 discard allocation unit의 자연스러운 alignment에서 몇 byte 떨어져 있는지 나타낸다. |
| /sys/block/<disk>/<partition>/stat | 2008년 2월 · Jerome Marchand | 해당 partition의 I/O 통계를 표시하며 형식은 /sys/block/<disk>/stat과 같다. |
Entropy, chunk와 inline encryption
221-308| 경로 | 작성 시점·접근 | 의미 |
|---|---|---|
| /sys/block/<disk>/queue/add_random | 2010년 6월 · read/write | Disk의 entropy 기여를 끌 수 있다. 기본값은 1, 즉 켜짐이다. Contact는 [email protected]다. |
| /sys/block/<disk>/queue/chunk_sectors | 2016년 9월 · read-only | Disk type에 따라 의미가 다르다. RAID device(dm-raid)에서는 RAID volume stripe segment 크기를 512B sector 단위로 나타낸다. Host-aware 또는 host-managed zoned block device에서는 zone 크기를 512B sector 단위로 나타내며 마지막 zone은 더 작을 수 있다. 담당자는 Hannes Reinecke다. |
| /sys/block/<disk>/queue/crypto/ | 2022년 2월 | 이 subdirectory가 있으면 device가 inline encryption을 지원한다. 내부 file은 device의 inline encryption capability를 설명한다. 자세한 내용은 Documentation/block/inline-encryption.rst를 참조한다. |
| /sys/block/<disk>/queue/crypto/hw_wrapped_keys | 2025년 2월 · read-only | 이 file이 있으면 전용 hardware만 unwrap하고 사용할 수 있는 key blob, 즉 hardware-wrapped inline encryption key를 지원한다. |
| /sys/block/<disk>/queue/crypto/max_dun_bits | 2022년 2월 · read-only | Inline encryption request에서 device가 받는 data unit number의 최대 bit 길이다. |
| /sys/block/<disk>/queue/crypto/num_keyslots | 2022년 2월 · read-only | Inline encryption에 사용할 수 있는 device keyslot 수다. |
| /sys/block/<disk>/queue/crypto/raw_keys | 2025년 2월 · read-only | 이 file이 있으면 software에서 raw plaintext 형태로 관리하는 inline encryption key를 지원한다. |
crypto/modes/<mode>
Device가 inline encryption으로 지원하는 crypto mode, 즉 encryption/decryption algorithm마다 read-only file이 하나 생긴다. File의 16진수 값은 해당 mode가 지원하는 byte 단위 data unit size의 bitmask다. 현재 가능한 mode는 AES-256-XTS, AES-128-CBC-ESSIV, Adiantum이다.
예를 들어 AES-256-XTS에서 512-byte와 4096-byte data unit을 지원하면 /sys/block/<disk>/queue/crypto/modes/AES-256-XTS가 존재하고 0x1200을 담는다. 이 crypto 항목들의 contact는 [email protected]다.
DAX, discard와 independent access range
311-426| 경로 | 작성 시점·접근 | 의미 |
|---|---|---|
| /sys/block/<disk>/queue/dax | 2016년 6월 · read-only | CPU-addressable storage가 page cache를 우회하는 Direct Access(DAX)를 지원하면 1, 아니면 0이다. |
| /sys/block/<disk>/queue/discard_granularity | 2011년 5월 · read-only | Device가 보고한 내부 allocation unit 크기를 byte로 나타낸다. 보고하지 않으면 physical block size와 같게 설정한다. 0이면 discard를 지원하지 않는다. |
| /sys/block/<disk>/queue/discard_max_bytes | 2011년 5월 · read/write | discard_max_hw_bytes가 hardware limit인 반면 이 값은 software limit이다. 큰 discard에서 latency가 큰 device는 값을 낮춰 Linux가 더 작은 discard를 발행하게 하면 latency를 줄일 수 있다. |
| /sys/block/<disk>/queue/discard_max_hw_bytes | 2015년 7월 · read-only | Device driver가 설정한 한 번의 operation에서 discard할 수 있는 최대 byte 수다. Device에 보내는 request가 넘으면 안 된다. 0이면 discard를 지원하지 않는다. |
| /sys/block/<disk>/queue/discard_zeroes_data | 2011년 5월 · read-only | 항상 0을 반환한다. Discard의 특정 동작에 의존해서는 안 되며 이 file을 읽지 말아야 한다. |
| /sys/block/<disk>/queue/dma_alignment | 2022년 5월 | O_DIRECT raw block access와 driver별 passthrough mechanism에 쓸 user space address가 만족해야 하는 alignment를 보고한다. |
| /sys/block/<disk>/queue/fua | 2018년 5월 · read-only | Block driver가 write request의 FUA(Force Unit Access) flag를 지원하는지 나타낸다. FUA가 설정되면 write가 storage device의 volatile cache를 우회해야 한다. |
| /sys/block/<disk>/queue/hw_sector_size | 2008년 1월 · read-only | Device hardware sector size를 byte로 나타낸다. |
independent_access_ranges/
2021년 10월에 추가된 read-only subdirectory로 contact는 [email protected]다. 이 directory가 있으면 서로 다른 sector range를 대상으로 하는 request를 병렬 실행할 수 있다. 예를 들어 single-LUN multi-actuator HDD가 actuator의 sector range를 올바르게 알리면 이 directory가 생긴다.
Access range마다 directory 하나가 있고 sector file은 첫 sector, nr_sectors file은 그 지점부터의 전체 sector 수를 나타낸다. 두 값은 실제 block size와 관계없이 512B sector 단위를 쓴다. Range는 겹치지 않고 device capacity의 모든 sector를 포함한다. 시작 sector가 증가하는 순서로 번호를 붙이므로 range 0의 sector 값은 항상 0이다.
원문의 ASCII directory tree를 두 독립 sector range와 각 attribute의 관계로 다시 그렸습니다.
Polling, timeout, accounting과 queue limit
429-540| 경로 | 작성 시점·접근 | 의미 |
|---|---|---|
| /sys/block/<disk>/queue/io_poll | 2015년 11월 · read/write | 읽으면 polling 활성화는 1, 비활성화는 0이다. 0을 쓰면 끄고 0이 아닌 값을 쓰면 켠다. |
| /sys/block/<disk>/queue/io_poll_delay | 2016년 11월 · read/write · deprecated | 과거 polling 종류를 제어했으나 현재 -1, classic polling으로 고정된다. CPU가 시간을 양보하지 않고 completion을 반복 확인한다. |
| /sys/block/<disk>/queue/io_timeout | 2018년 11월 · read/write | Request timeout을 millisecond로 나타낸다. 이 시간 안에 완료되지 않으면 driver timeout handler가 retry, fail 또는 device recovery strategy 시작을 결정한다. |
| /sys/block/<disk>/queue/iostats | 2009년 1월 · read/write | Disk I/O statistics accounting을 켜거나 끈다. |
| /sys/block/<disk>/queue/iostats_passthrough | 2024년 10월 · read/write | Passthrough command의 disk I/O statistics accounting을 켜거나 끈다. |
| /sys/block/<disk>/queue/logical_block_size | 2009년 5월 · read-only | Storage device가 address할 수 있는 가장 작은 단위이며 일반적으로 512 byte다. |
| /sys/block/<disk>/queue/max_active_zones | 2020년 7월 · read-only | Host-managed 또는 host-aware zoned device에서 EXPLICIT OPEN, IMPLICIT OPEN, CLOSED 상태 zone 수의 합을 제한한다. 0이면 제한이 없다. Host가 초과하면 driver는 BLK_STS_ZONE_ACTIVE_RESOURCE를 보고해야 하며 user space에는 EOVERFLOW errno로 보일 수 있다. |
| /sys/block/<disk>/queue/max_discard_segments | 2017년 2월 · read-only | Discard request의 최대 DMA scatter/gather entry 수다. |
| /sys/block/<disk>/queue/max_hw_sectors_kb | 2004년 9월 · read-only | 한 번의 data transfer에서 hardware가 지원하는 최대 kilobyte 수다. |
| /sys/block/<disk>/queue/max_integrity_segments | 2010년 9월 · read-only | Block layer core가 driver에 제출하는 integrity data 포함 DMA scatter/gather list의 최대 element 수다. |
| /sys/block/<disk>/queue/max_open_zones | 2020년 7월 · read-only | Zoned device에서 EXPLICIT OPEN 또는 IMPLICIT OPEN 상태 zone 수의 합을 제한한다. 0이면 제한이 없다. |
| /sys/block/<disk>/queue/max_sectors_kb | 2004년 9월 · read/write | Block layer가 filesystem request에 허용하는 최대 kilobyte 수다. Hardware 최대 크기 이하여야 하며 0을 쓰면 kernel 기본값을 사용한다. |
별도 담당자가 적힌 io_timeout과 zoned limit을 제외한 이 구간의 contact는 [email protected]이며, logical_block_size 담당자는 Martin K. Petersen다.
Segment, request, I/O 크기와 completion affinity
543-678| 경로 | 작성 시점·접근 | 의미 |
|---|---|---|
| /sys/block/<disk>/queue/max_segment_size | 2010년 3월 · read-only | DMA scatter/gather list element 하나의 최대 byte 크기다. |
| /sys/block/<disk>/queue/max_write_streams | 2024년 11월 · read-only | 지원하는 최대 write stream 수이며 미지원이면 0이다. 지원 시 유효한 값은 1부터 max_write_streams까지다. |
| /sys/block/<disk>/queue/write_stream_granularity | 2024년 11월 · read-only | Write stream의 byte 단위 granularity다. Device 내부 write amplification을 피하려면 함께 discard하거나 overwrite해야 하는 크기다. |
| /sys/block/<disk>/queue/max_segments | 2010년 3월 · read-only | 연결된 block driver에 제출하는 DMA scatter/gather list의 최대 element 수다. |
| /sys/block/<disk>/queue/minimum_io_size | 2009년 4월 · read-only | 성능 penalty 없이 처리할 수 있는 선호 최소 request 크기다. Disk에서는 흔히 physical block size, RAID에서는 stripe chunk size다. IOPS가 중요한 workload는 올바르게 정렬된 minimum_io_size 배수를 선호한다. |
| /sys/block/<disk>/queue/nomerges | 2010년 1월 · read/write | 0은 모든 merge 시도, 1은 복잡한 검사만 끄고 직전 request와의 단순 one-shot merge 유지, 2는 모든 merge 시도를 끈다. 알려진 random I/O에서는 실패할 merge 검사의 CPU cycle을 줄일 수 있다. |
| /sys/block/<disk>/queue/nr_requests | 2003년 7월 · read/write | Block layer에서 할당할 수 있는 request 수다. 값은 blk_mq_tags instance 하나의 수만 나타내며 전체 device 수는 hardware queue 수, elevator 활성화, tag 공유 여부에 따라 달라진다. |
| /sys/block/<disk>/queue/nr_zones | 2018년 11월 · read-only | Host-aware 또는 host-managed zoned block device의 전체 zone 수다. 일반 block device에서는 항상 0이다. |
| /sys/block/<disk>/queue/optimal_io_size | 2009년 4월 · read-only | 지속 I/O에 선호하는 단위다. Disk drive는 드물게 보고하며 RAID에서는 보통 stripe width 또는 내부 track size다. Sustained throughput workload는 올바르게 정렬된 배수를 선호한다. 보고하지 않으면 0이다. |
| /sys/block/<disk>/queue/physical_block_size | 2009년 5월 · read-only | Physical storage가 원자적으로 쓸 수 있는 가장 작은 단위다. 보통 logical block과 같지만 4KB sector를 512-byte logical block으로 노출하는 SATA drive처럼 더 클 수 있다. Stacked device에서는 component의 최댓값이다. |
| /sys/block/<disk>/queue/read_ahead_kb | 2004년 5월 · read/write | 이 block device의 filesystem에 적용하는 최대 readahead kilobyte 수다. MADV_HUGEPAGE는 hugepage 크기를 granularity로 사용하므로 이 값을 넘을 수 있다. |
| /sys/block/<disk>/queue/rotational | 2009년 1월 · read/write | Device가 rotational인지 non-rotational인지 나타내는 데 사용한다. |
| /sys/block/<disk>/queue/rq_affinity | 2008년 9월 · read/write | 1이면 completion을 request를 제출한 CPU group으로 이동해 cache 효과로 CPU cycle을 줄일 수 있다. 2이면 group aggregation을 우회하고 요청 CPU에서 completion을 실행해 처리 분산을 극대화한다. |
minimum_io_size, optimal_io_size, physical_block_size의 담당자는 Martin K. Petersen이며, 나머지 항목의 contact는 [email protected]다. nr_zones 담당자는 Damien Le Moal이다.
Scheduler, stable write, throttling과 cache
681-746| 경로 | 작성 시점·접근 | 의미 |
|---|---|---|
| /sys/block/<disk>/queue/scheduler | 2004년 10월 · read/write | 현재 및 사용 가능한 I/O scheduler를 표시하며 활성 scheduler는 []로 감싼다. Scheduler 이름을 쓰면 전환하고 module이 없으면 load를 시도한다. |
| /sys/block/<disk>/queue/stable_writes | 2020년 9월 · read/write | Write request가 memory를 여러 번 읽어 매번 같은 data를 봐야 하면 1이다. 예를 들어 checksum 계산 뒤 실제 write를 수행할 때 kernel은 page writeback이 끝나기 전 수정을 막는다. 제약이 없으면 0이며 test 목적으로 쓸 수 있다. |
| /sys/block/<disk>/queue/virt_boundary_mask | 2021년 4월 · read-only | I/O segment memory alignment mask다. 이전 segment 끝 또는 현재 segment 시작 memory address가 virt_boundary_mask + 1 byte에 정렬되지 않은 지점에서 request를 분할한다. |
| /sys/block/<disk>/queue/wbt_lat_usec | 2016년 11월 · read/write | Writeback throttling 등록 device의 목표 최소 read latency다. 일정 window에서 초과하면 write를 줄이기 시작한다. 0은 기능을 끄고 -1은 기본값으로 reset한다. Window는 curr_win_nsec를 참조한다. |
| /sys/block/<disk>/queue/write_cache | 2016년 4월 · read/write | Write-back cache 활성화 시 write back, 아니면 write through를 반환한다. 쓰기는 kernel이 보는 상태만 바꾸고 device 상태는 바꾸지 않는다. write back에서 write through로 바꾸면 kernel cache flush도 사라지므로 안전하지 않을 수 있다. |
이 구간의 contact는 [email protected]다.
Write same, zeroing, zoned storage와 통계
749-881| 경로 | 작성 시점·접근 | 의미 |
|---|---|---|
| /sys/block/<disk>/queue/write_same_max_bytes | 2012년 1월 · read-only | Data block 하나를 연속 block range에 쓰는 write same command의 최대 byte 수다. Disk 영역 삭제나 RAID drive 초기화에 쓸 수 있으며 0이면 미지원이다. |
| /sys/block/<disk>/queue/write_zeroes_max_bytes | 2016년 11월 · read-only | Payload 없이 연속 block range를 zero로 만드는 write zeroes command의 최대 byte 수다. 0이면 미지원이다. |
| /sys/block/<disk>/queue/write_zeroes_unmap_max_hw_bytes | 2025년 1월 · read-only | 각 block에 zero를 물리적으로 쓰는 비용을 피할 수 있는 hardware capability다. write_zeroes_max_bytes와 같으면 이후 read가 zero를 반환함을 보장하면서 media write를 기회적으로 피한다. Misalignment나 내부 allocation unit보다 작은 range에서는 실제 zero write로 fallback할 수 있다. 0이면 각 logical block을 실제로 써야 할 수 있다. |
| /sys/block/<disk>/queue/write_zeroes_unmap_max_bytes | 2025년 1월 · read/write | Hardware limit에 대응하는 software limit이다. Best-effort라 속도는 보장되지 않는다. 0은 기능을 끄며 그 밖에는 write_zeroes_unmap_max_hw_bytes와 같아야 한다. |
| /sys/block/<disk>/queue/zone_append_max_bytes | 2020년 5월 · read-only | REQ_OP_ZONE_APPEND로 zoned device의 sequential zone에 쓸 수 있는 최대 byte 수다. 일반 block device에서는 항상 0이다. |
| /sys/block/<disk>/queue/zone_write_granularity | 2021년 1월 · read-only | Host-managed 또는 host-aware device의 sequential zone write가 만족해야 하는 byte 단위 alignment다. 일반 device에서는 0이다. |
| /sys/block/<disk>/queue/zoned | 2016년 9월 · read-only | 일반 device는 none, zoned device는 host-aware 또는 host-managed를 반환한다. ZBC와 ZAC standard가 두 model을 정의한다. drive-managed model은 zone command를 지원하지 않아 일반 device로 취급하고 none을 반환한다. |
| /sys/block/<disk>/hidden | 2023년 3월 · read-only | 숨겨진 block device다. Event를 만들지 않고 user space나 blkdev_get*으로 열 수 없다. Multipath device의 underlying component에 사용한다. |
write_same_max_bytes 담당자는 Martin K. Petersen, write_zeroes_max_bytes는 Chaitanya Kulkarni, 두 unmap 항목은 Zhang Yi, zoned는 Damien Le Moal이며 나머지는 [email protected]다.
/sys/block/<disk>/stat
2008년 2월에 추가됐고 담당자는 Jerome Marchand다. Disk I/O 통계를 표시한다. 원문 설명은 11개 field라고 적지만 이어지는 표에는 다음 17개 field가 정의돼 있다.
| 번호 | 통계 |
|---|---|
| 1 | 성공적으로 완료된 read |
| 2 | merge된 read |
| 3 | 읽은 sector |
| 4 | read에 사용한 시간(ms) |
| 5 | 완료된 write |
| 6 | merge된 write |
| 7 | 쓴 sector |
| 8 | write에 사용한 시간(ms) |
| 9 | 현재 진행 중인 I/O |
| 10 | I/O 수행에 사용한 시간(ms) |
| 11 | I/O 수행에 사용한 가중 시간(ms) |
| 12 | 완료된 discard |
| 13 | merge된 discard |
| 14 | discard한 sector |
| 15 | discard에 사용한 시간(ms) |
| 16 | 완료된 flush request |
| 17 | flush에 사용한 시간(ms) |
자세한 내용은 Documentation/admin-guide/iostats.rst를 참조한다.
Disk 기본 속성과 atomic write
sysfs-block:1-103Physical·logical alignment, atomic write 단위와 경계, disk sequence, in-flight read/write 수를 다룹니다.