我有一块 HDD,它是 RAID10 阵列的成员。
smartctl
并且mdadm
它的状态给了我矛盾的指示。
smartctl
声称磁盘已故障:
$ sudo smartctl -H /dev/sdf
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-5.0.0-2.el7.elrepo.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
Failed Attributes:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 001 001 005 Pre-fail Always FAILING_NOW 2005
但mdadm
声称硬盘很好(主动同步):
$ sudo mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Fri Jan 31 12:52:57 2020
Raid Level : raid10
Array Size : 11720531968 (11177.57 GiB 12001.82 GB)
Used Dev Size : 2930132992 (2794.39 GiB 3000.46 GB)
Raid Devices : 8
Total Devices : 8
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Jun 4 00:29:34 2020
State : clean
Active Devices : 8
Working Devices : 8
Failed Devices : 0
Spare Devices : 0
Layout : near=2
Chunk Size : 512K
Consistency Policy : bitmap
Name : 24port:0 (local to host 24port)
UUID : 3d7b58f8:29553a3d:fbbc536e:8bb95424
Events : 40771
Number Major Minor RaidDevice State
0 8 1 0 active sync set-A /dev/sda1
8 65 16 1 active sync set-B /dev/sdr
2 8 17 2 active sync set-A /dev/sdb1
3 8 33 3 active sync set-B /dev/sdc1
4 8 49 4 active sync set-A /dev/sdd1
5 8 65 5 active sync set-B /dev/sde1
6 8 81 6 active sync set-A /dev/sdf1
7 8 97 7 active sync set-B /dev/sdg1
我该相信谁?
答案1
这些并不冲突。测试结果发生故障,但驱动器尚未发生故障。输出显示驱动器当前正在运行,mdadm
但根据smartctl
,驱动器即将报废,剩余空间不多(已使用几乎所有备用扇区来重新定位数据)。
如果该阵列包含任何关键内容,我会更换该磁盘,而且要快速更换。如果磁盘盒出错,最好从制造商处获取一些工具并使用该工具检查驱动器smartctl
。但通常情况下,情况并非如此,因此最好的办法是在磁盘正常工作时更换它。