我的硬盘出现故障了吗?

我的硬盘出现故障了吗?

我刚刚更换了服务器上的硬盘。

它是 RAID 1 阵列的一部分。sdb1 分区现在每隔几个小时就会出现故障。

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multi                                                                                                 path] [faulty]
md1 : active raid1 sdb1[2](F) sda1[0]
      463216576 blocks [2/1] [U_]

md3 : active raid1 sdb3[1] sda3[0]
      20970432 blocks [2/2] [UU]

mdadm:

# mdadm -D /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Tue Dec 25 15:04:23 2012
     Raid Level : raid1
     Array Size : 463216576 (441.76 GiB 474.33 GB)
  Used Dev Size : 463216576 (441.76 GiB 474.33 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Wed Sep 25 14:30:49 2013
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0

           UUID : 6ac92849:bf49a597:a4d2adc2:26fd5302
         Events : 0.5728035

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       0        0        1      removed

       2       8       17        -      faulty spare   /dev/sdb1

新更换的硬盘是否有故障?

我运行了 smartctl,但我不是解释结果的专家:

# smartctl -a /dev/sdb
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.10.9-xxxx-std-ipv6-64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Device Model:     TOSHIBA DT01ACA050
Serial Number:    535DN5SNS
LU WWN Device Id: 5 000039 ff6d3d7bb
Firmware Version: MS1OA750
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Wed Sep 25 14:28:36 2013 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                ( 4934) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        (  83) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   136   136   054    Pre-fail  Offline      -       91
  3 Spin_Up_Time            0x0007   100   100   024    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       1
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       87
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   115   115   020    Pre-fail  Offline      -       34
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       45
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       333
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       333
194 Temperature_Celsius     0x0002   206   206   000    Old_age   Always       -       29 (Min/Max 24/32)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       154
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

希望得到一些关于结果的反馈吗?

更新:

一位工程师查看了我的日志并发现了以下内容:

ata2.00: exception Emask 0x0 SAct 0x9 SErr 0x0 action 0x6 frozen
ata2.00: failed command: WRITE FPDMA QUEUED
ata2.00: cmd 61/80:00:80:19:1f/00:00:33:00:00/40 tag 0 ncq
65536 out
     res 40/00:01:09:4f:c2/00:00:00:00:00/00 Emask 0x4
(timeout)
ata2.00: status: { DRDY }
ata2.00: failed command: WRITE FPDMA QUEUED
ata2.00: cmd 61/00:18:80:15:1f/04:00:33:00:00/40 tag 3 ncq
524288 out
     res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4
(timeout)
ata2.00: status: { DRDY }
ata2: hard resetting link
ata2: link is slow to respond, please be patient (ready=0)
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: configured for UDMA/133
ata2.00: device reported invalid CHS sector 0 sd 1:0:0:0: [sdb] Unhandled error code sd 1:0:0:0: [sdb]  

他想更换 SATA 连接器。连接器故障是否可能导致驱动器出现坏扇区?或者坏的 SATA 连接器是否可能导致读取扇区失败,然后将其标记为坏扇区?

答案1

5 Reallocated_Sector_Ct  0x0033 100  100  005  Pre-fail  Always   -   87 <<<===

这通常是驱动器内部跟踪的已增长缺陷列表中已添加的坏扇区数。注意:现代硬盘驱动器仅在发生写入时重新映射扇区,因此在很多情况下,此属性的原始值为 0,但驱动器有大量坏扇区等待重新分配(Current_Pending_Sector 计数器)。当对坏扇区发生写入时,驱动器会将该扇区添加到其内部“G 列表”,并使用为此目的而预留的工厂定义扇区池中的备用扇区替换该扇区。如果此数字大于 0,则表示您的驱动器已开始出现故障,并且您可能已经丢失了数据(取决于驱动器是否能够在重新分配之前读取所有数据)。

196 Reallocated_Event_Count 0x0032 100 100 000  Old_age   Always  -   154 <<<===

这通常是驱动器的所有重新映射尝试的计数(成功和失败)。这可能与 Reallocated_Sector_Ct 不同 - 它通常会更高。也请注意这个属性。

观察上述计数器的增长速度。在我看来,更换这个驱动器确实值得,因为它似乎快要坏掉了。

相关内容