Chinese translated version of Documentation/ABI/testing/sysfs-block.txt
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Chinese maintainer: 徐红 1534342777@qq.com
---------------------------------------------------------------------
Documentation/ABI/testing/sysfs-block.txt的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者: 徐红 1534342777@qq.com
中文版翻译者: 徐红 1534342777@qq.com
以下为正文
---------------------------------------------------------------------
sysfs-块
系统文件——块
--------------------
What:
/sys/block/<disk>/stat
Date:
February 2008
Contact:
Jerome Marchand <jmarchan@redhat.com>
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)
For more details refer Documentation/iostats.txt
目录:/sys/block/<disk>/stat
日期:2008年2月
联系方式:Jerome Marchand <jmarchan@redhat.com>
摘要:
/sys/block/<disk>/stat文件显示了磁盘I/O数据。它们包含了
11个区域。
1.完全成功读取
2.混合读取
3.扇区读取
4.读取时间(ms)
5.完全写入
6.混合写入
7.扇区的写入
8.写入时间(ms)
9.当前进度中的I/O设备
10.I/O工作的时间(ms)
11.I/O工作的加权时间(ms)
更多的细节在Documentation/iostats.txt文档中。
What:
/sys/block/<disk>/<part>/stat
Date:
February 2008
Contact:
Jerome Marchand <jmarchan@redhat.com>
Description:
The /sys/block/<disk>/<part>/stat files display the
I/O statistics of partition <part>. The format is the
same as the above-written /sys/block/<disk>/stat
format.
目录:/sys/block/<disk>/<part>/stat
日期:2008年2月
联系方式:Jerome Marchand <jmarchan@redhat.com>
摘要:
/sys/block/<disk>/<part>/stat文件显示了分区的I/O数据。
格式和上面/sys/block/<disk>/stat的格式一样。
What:
/sys/block/<disk>/integrity/format
Date:
June 2008
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
Metadata format for integrity capable block device.
E.g. T10-DIF-TYPE1-CRC.
目录:/sys/block/<disk>/integrity/format
日期:2008年6月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
块设备完整性的元数据格式。
E.g. T10-DIF-TYPE1-CRC.
What:
/sys/block/<disk>/integrity/read_verify
Date:
June 2008
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
Indicates whether the block layer should verify the
integrity of read requests serviced by devices that
support sending integrity metadata.
目录:/sys/block/<disk>/integrity/read_verify
日期:2008年6月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
表明块层是否应该通过支持发送完整元数据的设备
来验证读请求服务的完整性。
What:
/sys/block/<disk>/integrity/tag_size
Date:
June 2008
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
Number of bytes of integrity tag space available per
512 bytes of data.
目录:/sys/block/<disk>/integrity/tag_size
日期:2008年6月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
每512字节数据完整标签可用空间的字节数。
What:
/sys/block/<disk>/integrity/write_generate
Date:
June 2008
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
Indicates whether the block layer should automatically
generate checksums for write requests bound for
devices that support receiving integrity metadata.
目录:/sys/block/<disk>/integrity/write_generate
日期:2008年6月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
表明块层是否应该为支持接收完整数据元的写请求约束设
备自动生成校验。
What:
/sys/block/<disk>/alignment_offset
Date:
April 2009
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
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.
目录:/sys/block/<disk>/alignment_offset
日期:2009年4月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
存储设备可能会记录一个比逻辑块大小更大的物理块的大小
(例如一个4KB物理扇区的驱动呈现给操作系统的是512B的逻
辑块)。这个参数表示设备的开头离磁盘的自然对齐有多少字
节的偏移。
What:
/sys/block/<disk>/<partition>/alignment_offset
Date:
April 2009
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
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.
目录:/sys/block/<disk>/<partition>/alignment_offset
日期:2009年4月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
存储设备可能会记录一个比逻辑块大小更大的物理块的大小
(例如一个4KB物理扇区的驱动呈现给操作系统的是512B的逻
辑块)。这个参数表示分区的开头离磁盘的自然对齐有多少字
节的偏移。
What:
/sys/block/<disk>/queue/logical_block_size
Date:
May 2009
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
This is the smallest unit the storage device can
address. It is typically 512 bytes.
目录:/sys/block/<disk>/queue/logical_block_size
日期:2009年5月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
这是存储设备最小的可编址单元,通常为512字节。
What:
/sys/block/<disk>/queue/physical_block_size
Date:
May 2009
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
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.
目录:/sys/block/<disk>/queue/physical_block_size
日期:2009年5月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
这是一个物理存储设备可自动写入的最小单元,通常和逻辑
块大小一样,也可能大一点。比如,4KB扇区的SATA驱动呈现
给操作系统一个512B的物理块大小。对于堆块设备,物理块大
小的变量包含了组件设备的最大物理块的大小。
What:
/sys/block/<disk>/queue/minimum_io_size
Date:
April 2009
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
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.
目录:/sys/block/<disk>/queue/minimum_io_size
日期:2009年4月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
存储设备可能会记录一个粒度或优先级最小的I/O的大
小,这是在不导致性能降低的前提下,可执行设备的最
小要求。对于磁盘设备,这通常是物理块大小。对于RAID
阵列,这通常是条纹快大小。恰当的最小输入输出大小
的多重对齐是需要大量I/O操作的工作负载的首选请求。
What:
/sys/block/<disk>/queue/optimal_io_size
Date:
April 2009
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
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.
目录:/sys/block/<disk>/queue/optimal_io_size
日期:2009年4月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
存储设备可能会记录一个最优I/O大小,这是持续的I/O首选
单元。这很少为磁盘驱动记录。对于RAID阵列,这通常是条纹
宽度或是内部跟踪大小。恰当的最优输入输出大小的多重
对齐是需要持续吞吐量的工作负载的首选请求大小。如果没
有记录最优I/O大小,这个文件置为0.
What:
/sys/block/<disk>/queue/nomerges
Date:
January 2010
Contact:
Description:
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.
目录:/sys/block/<disk>/queue/nomerges
日期:2010年1月
联系方式:
摘要:
标准的I/O电梯运行包括尝试合并相邻I/Os。对于已知的随机
I/O负载,这些尝试通常会失败,并导致额外的周期用于内核。
阻止这种行为的两种方式之一:当置为1,复杂的合并检查被
禁用,但是和前面的I/O请求的简单一次性合并被启用。当置
为2,所有的尝试合并都是被禁用的。合并默认值是0——所有
类型的尝试合并都被启用。
What:
/sys/block/<disk>/discard_alignment
Date:
May 2011
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
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.
目录:/sys/block/<disk>/discard_alignment
日期:2011年5月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
支持丢弃功能的设备可能在比导出的逻辑块大的单元内部分
配空间。丢弃对齐参数表明设备的开头离内部分配单元的自
然对齐的偏移量有多少字节。
What:
/sys/block/<disk>/<partition>/discard_alignment
Date:
May 2011
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
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.
目录:/sys/block/<disk>/<partition>/discard_alignment
日期:2011年5月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
支持丢弃功能的设备可能在比导出的逻辑块大的单元内部分
配空间。丢弃对齐参数表明分区的开头离内部分配单元的自
然对齐的偏移量有多少字节。
What:
/sys/block/<disk>/queue/discard_granularity
Date:
May 2011
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
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.
目录:/sys/block/<disk>/queue/discard_granularity
日期:2011年5月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
支持丢弃功能的设备可能用比逻辑块大的单元在内部分配
空间。如果被设备记录,丢弃粒度参数表明内部分配单元以
比特位单位的大小。否则,丢弃粒度将会被设置成匹配设备
物理块大小的值。丢弃粒度为0表明设备不支持丢弃功能。
What:
/sys/block/<disk>/queue/discard_max_bytes
Date:
May 2011
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
Devices that support discard functionality may have
internal limits on the number of bytes that can be
trimmed or unmapped in a single operation. Some storage
protocols also have inherent limits on the number of
blocks that can be described in a single command. The
discard_max_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_bytes
value of 0 means that the device does not support
discard functionality.
目录:/sys/block/<disk>/queue/discard_max_bytes
日期:2011年5月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
支持丢弃功能的设备可能在单一操作上能够削减或映射的
字节数有内部限制。一些存储协议对于单一命令中能被描述
的块的数量也有固定的限制。丢弃最大字节参数被驱动设备
设置成在单一操作中能够被丢弃的字节的最大数量。设备发
出的丢弃请求不能超过这个限制。丢弃最大字节值为0表明该
设备不支持丢弃功能。
What:
/sys/block/<disk>/queue/discard_zeroes_data
Date:
May 2011
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
Devices that support discard functionality may return
stale or random data when a previously discarded block
is read back. This can cause problems if the filesystem
expects discarded blocks to be explicitly cleared. If a
device reports that it deterministically returns zeroes
when a discarded area is read the discard_zeroes_data
parameter will be set to one. Otherwise it will be 0 and
the result of reading a discarded area is undefined.
目录:/sys/block/<disk>/queue/discard_zeroes_data
日期:2011年5月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
支持丢弃功能的设备当之前丢弃的块被读回时,可能返回
过期或随机数据。如果文件系统想要显式地丢弃块这样可
能会导致问题发生。如果设备报告当丢弃区域被读设备肯定
返回0,丢弃零数据参数将被置1。否则将被置为0,并且读
丢弃区域的结果是未定义的。
What:
/sys/block/<disk>/queue/write_same_max_bytes
Date:
January 2012
Contact:
Martin K. Petersen <martin.petersen@oracle.com>
Description:
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.
目录:/sys/block/<disk>/queue/write_same_max_bytes
日期: 2012年1月
联系方式:Martin K. Petersen <martin.petersen@oracle.com>
摘要:
一些设备在单个数据块可以被写到几个相邻的数据块中的
存储器中支持写相同操作。这个可以用来擦除磁盘区域,还
可以在RAID配置中初始化驱动器。写相同最大字节表明在一
次写相同命令中有多少字节可以被写入。如果写相同最大
字节为0,则说明设备不支持写相同。