RAID5 어레이 수리

RAID5 어레이 수리

3개의 2TB 디스크로 구성된 RAID5 어레이를 복구하려고 합니다. 한동안 완벽하게 작동한 후 컴퓨터(Debian 실행)가 갑자기 부팅을 멈추고 GRUB 프롬프트에서 멈췄습니다. 나는 이것이 RAID 어레이와 관련이 있다고 확신합니다.

시도한 모든 것을 완벽하게 설명하기는 어렵기 때문에 현재 상황을 설명하도록 노력하겠습니다.

mdadm --detail /dev/md0산출:

/dev/md0:
 Version : 1.2
 Creation Time : Sun Mar 22 15:13:25 2015
 Raid Level : raid5
 Used Dev Size : 1953381888 (1862.89 GiB 2000.26 GB)
 Raid Devices : 3
 Total Devices : 2
 Persistence : Superblock is persistent

 Update Time : Sun Mar 22 16:18:56 2015
      State : active, degraded, Not Started 
      Active Devices : 2
      Working Devices : 2
      Failed Devices : 0
      Spare Devices : 0

     Layout : left-symmetric
     Chunk Size : 512K

       Name : ubuntu:0  (local to host ubuntu)
       UUID : ae2b72c0:60444678:25797b77:3695130a
     Events : 57

Number   Major   Minor   RaidDevice State
   0       0        0        0      removed
   1       8       17        1      active sync   /dev/sdb1
   2       8       33        2      active sync   /dev/sdc1

mdadm --examine /dev/sda1다음을 제공합니다:

 mdadm: No md superblock detected on /dev/sda1.

문제가 있다고 생각했기 때문에 파티션을 다시 포맷했기 때문에 이는 의미가 있습니다.

mdadm --examine /dev/sdb1다음을 제공합니다:

 /dev/sdb1:
       Magic : a92b4efc
       Version : 1.2
       Feature Map : 0x0
       Array UUID : ae2b72c0:60444678:25797b77:3695130a
       Name : ubuntu:0  (local to host ubuntu)
       Creation Time : Sun Mar 22 15:13:25 2015
       Raid Level : raid5
       Raid Devices : 3

 Avail Dev Size : 3906764800 (1862.89 GiB 2000.26 GB)
 Array Size : 3906763776 (3725.78 GiB 4000.53 GB)
 Used Dev Size : 3906763776 (1862.89 GiB 2000.26 GB)
 Data Offset : 262144 sectors
 Super Offset : 8 sectors
 State : clean
 Device UUID : f1817af9:1d964693:774d5d63:bfa69e3d

 Update Time : Sun Mar 22 16:18:56 2015
 Checksum : ab7c79ae - correct
 Events : 57

 Layout : left-symmetric
 Chunk Size : 512K

 Device Role : Active device 1
 Array State : .AA ('A' == active, '.' == missing)

mdadm --detail /dev/sdc1다음을 제공합니다:

 /dev/sdc1:
    Magic : a92b4efc
    Version : 1.2
    Feature Map : 0x0
    Array UUID : ae2b72c0:60444678:25797b77:3695130a
    Name : ubuntu:0  (local to host ubuntu)
    Creation Time : Sun Mar 22 15:13:25 2015
    Raid Level : raid5
    Raid Devices : 3

    Avail Dev Size : 3906764800 (1862.89 GiB 2000.26 GB)
    Array Size : 3906763776 (3725.78 GiB 4000.53 GB)
    Used Dev Size : 3906763776 (1862.89 GiB 2000.26 GB)
    Data Offset : 262144 sectors
    Super Offset : 8 sectors
    State : clean
    Device UUID : f076b568:007e3f9b:71a19ea2:474e5fe9

    Update Time : Sun Mar 22 16:18:56 2015
    Checksum : db25214 - correct
    Events : 57

    Layout : left-symmetric
    Chunk Size : 512K

    Device Role : Active device 2
    Array State : .AA ('A' == active, '.' == missing)

cat /proc/mdstat:

Personalities : [raid6] [raid5] [raid4] 
md0 : inactive sdb1[1] sdc1[2]
  3906764800 blocks super 1.2

unused devices: <none>

fdisk -l:

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000d84fa

Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  3907029167  1953513560   fd  Linux raid autodetect

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000802d9

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048  3907028991  1953513472   fd  Linux raid autodetect

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000a8dca

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  3907028991  1953513472   fd  Linux raid autodetect

Disk /dev/sdd: 7756 MB, 7756087296 bytes
255 heads, 63 sectors/track, 942 cylinders, total 15148608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x128faec9

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048    15148607     7573280    c  W95 FAT32 (LBA)

/dev/sda1물론 다시 추가해 보았습니다 . mdadm --manage /dev/md0 --add /dev/sda1다음을 제공합니다:

mdadm: add new device failed for /dev/sda1 as 3: Invalid argument

RAID가 수정된 경우 RAID/LVM을 감지하고 다시 부팅할 수 있도록 재부팅하고 GRUB를 실행해야 할 수도 있습니다.

편집(smartctl 테스트 결과 추가)

smartctl테스트 출력

smartctl -a /dev/sda:

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.16.0-30-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Green (AF, SATA 6Gb/s)
Device Model:     WDC WD20EZRX-00D8PB0
Serial Number:    WD-WMC4M0760056
LU WWN Device Id: 5 0014ee 003a4a444
Firmware Version: 80.00A80
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Mar 24 22:07:08 2015 UTC
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:      ( 121) The previous self-test completed having
                    the read element of the test failed.
Total time to complete Offline 
data collection:        (26280) seconds.
Offline data collection
capabilities:            (0x7b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    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:    (   2) minutes.
Extended self-test routine
recommended polling time:    ( 266) minutes.
Conveyance self-test routine
recommended polling time:    (   5) minutes.
SCT capabilities:          (0x7035) SCT Status 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     0x002f   200   200   051    Pre-fail  Always       -       3401
  3 Spin_Up_Time            0x0027   172   172   021    Pre-fail  Always       -       4375
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       59
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       9697
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       59
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       51
193 Load_Cycle_Count        0x0032   115   115   000    Old_age   Always       -       255276
194 Temperature_Celsius     0x0022   119   106   000    Old_age   Always       -       28
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       12
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       1
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       1

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed: read failure       90%      9692         2057

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.

답변1

RAID5 어레이의 드라이브 3개 중 하나가 누락되었습니다 /dev/md0. 따라서 mdadm어레이가 어셈블되지만 실행되지는 않습니다.

-R, --run 어레이가 마지막으로 활성화되었을 때보다 더 적은 수의 드라이브를 사용할 수 있더라도 어레이를 시작하려고 시도하십시오. 일반적으로 예상되는 모든 드라이브를 찾을 수 없고 --scan사용하지 않는 경우 어레이가 조립되지만 부팅되지 않습니다. --run어쨌든 시작해보려고 합니다 .

따라서 당신이 해야 할 일은 mdadm --run /dev/md0. 조심스럽다면 mdadm --run --readonly /dev/md0따라해 보시고 mount -o ro,norecover /dev/md0 /mnt정상적으로 보이는지 확인해보시면 됩니다. ( --readonly물론 의 반대말은 이다 --readwrite.)

실행한 후에는 새 디스크를 다시 추가할 수 있습니다.

최근 테스트 보고서에서 알 수 있듯이 SMART 디스크 오류가 발생하므로 기존 디스크를 추가하지 않는 것이 좋습니다.

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed: read failure       90%      9692         2057

그러나 기존 디스크를 다시 추가하고 싶다면 --zero-superblock해당 디스크를 먼저 추가하는 것이 좋습니다. 하지만 여전히 교체를 권장합니다.

관련 정보