我想使用部分智能测试,并需要为每个跨度提供一个LBA大小。
如何确定磁盘的最大LBA?(然后我将把这个除以5)
发布于 2020-12-03 14:25:20
使用smartctl 选择性自我测试,您可以使用max关键字来确定在选择测试中使用的最大LBA:
# smartctl -t select,0-max /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.9.11-arch2-1] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Selective self-test routine immediately in off-line mode".
SPAN STARTING_LBA ENDING_LBA
0 0 537234767
Drive command "Execute SMART Selective self-test routine immediately in off-line mode" successful.
Testing has begun.因此,在这种情况下,它是537234767 (包括所以,537234768总计)。
这与parted等人印刷的扇区数目相同。但是,为了避免任何疑问,最好使用smartctl来获取值,这样就不会在逻辑/物理扇区大小上出现分歧。
它还碰巧启动了一个自我测试,您可以使用smartctl -X中止测试。
https://unix.stackexchange.com/questions/622610
复制相似问题