我smartctl -l xerror
在 Seagate ST31000528AS(具有 512 字节扇区的 1TB 磁盘)上运行,它给了我(部分):
Error 597 [16] occurred at disk power-on lifetime: 11903 hours (495 days + 23 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER -- ST COUNT LBA_48 LH LM LL DV DC
-- -- -- == -- == == == -- -- -- -- --
40 -- 51 00 00 00 74 59 00 70 bc 00 00 Error: UNC at LBA = 0x74590070bc = 499709407420
Commands leading to the command that caused the error were:
CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name
-- == -- == -- == == == -- -- -- -- -- --------------- --------------------
60 00 00 00 08 00 74 59 00 70 b8 40 00 12d+16:57:44.392 READ FPDMA QUEUED
ea 00 00 00 00 00 00 00 00 00 00 a0 00 12d+16:57:40.893 FLUSH CACHE EXT
ea 00 00 00 00 00 00 00 00 00 00 a0 00 12d+16:57:40.801 FLUSH CACHE EXT
61 00 00 00 08 00 08 a8 00 43 18 40 00 12d+16:57:40.800 WRITE FPDMA QUEUED
61 00 00 00 08 00 08 af 00 40 68 40 00 12d+16:57:40.800 WRITE FPDMA QUEUED
我真的很困惑这意味着什么——特别是它给出的 LBA48。hdparm -I
确认磁盘有 1,953,525,168 个扇区; 499,709,407,420 是出色地除此之外。 (即使有 512 字节扇区,也需要 256 TB 的磁盘才能有效。)
从内核日志来看,LBA48实际上可能是1,953,520,060——测试dd
并hdparm --read-sector
确认该扇区确实是坏的。 (事实上,那个也出现在smartctl -l xselftest
)。
为什么扩展错误日志给出的 LBA48 似乎比实际值大 256 倍(但不完全是!)?查看十六进制值,字节顺序似乎错误 - 这可能只是驱动器固件错误吗?
答案1
如果您以二进制形式查看这些数字,则为 499709407420 和 1953520060。
echo "obase=2;499709407420" | bc
111010001011001000000000111000010111100
echo "obase=2;1953520060" | bc
1110100011100000101100110111100
将其分为几组:
11101000
1110000
0
1011001
10111100
稍微重新排列一下:
11101000
1110000
0
1011001
10111100
它非常类似于:
111010001011001000000000111000010111100
看起来可能不仅仅是巧合,但也许我只是看到了一些不存在的东西。