Здравствуйте уважаемые коллеги.
Давно не писал в форум, ну вот, случилось... Поиск не помог, своих знаний как-то не хватает. Ниже постараюсь описать ситуацию как можно нагляднее и прошу вашей помощи.Итак, существовал программный raid 5 на старой машине.
CentOS release 5.3 (Final)
Linux 2.6.18-128.1.6.el5 #1 SMP Wed Apr 1 09:19:18 EDT 2009 i686 i686 i386 GNU/Linux
cat /etc/mdadm.conf
ARRAY /dev/md0 level=raid5 num-devices=3 metadata=0.90 UUID=297518e7:dd0a0ac8:aac97fdd:b7370bbe
В массиве три диска 1TB, из которых сейчас один мёртв (и без надежд, я так думаю). Два других (с моей точки зрения) должны были бы быть в порядке... но вот, что я вижу:
mdadm --examine /dev/sdc1
/dev/sdc1:
Magic : a92b4efc
Version : 0.90.00
UUID : 297518e7:dd0a0ac8:aac97fdd:b7370bbe
Creation Time : Mon Aug 1 14:42:43 2011
Raid Level : raid5
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Array Size : 1953519872 (1863.02 GiB 2000.40 GB)
Raid Devices : 3
Total Devices : 2
Preferred Minor : 0
Update Time : Mon Aug 19 14:54:24 2013
State : clean
Active Devices : 1
Working Devices : 2
Failed Devices : 1
Spare Devices : 1
Checksum : ec606a4c - correct
Events : 1696008
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 3 8 17 3 spare /dev/sdb1
0 0 0 0 0 removed
1 1 8 33 1 active sync /dev/sdc1
2 2 0 0 2 faulty removed
3 3 8 17 3 spare /dev/sdb1
mdadm --examine /dev/sdd1
/dev/sdd1:
Magic : a92b4efc
Version : 0.90.00
UUID : 297518e7:dd0a0ac8:aac97fdd:b7370bbe
Creation Time : Mon Aug 1 14:42:43 2011
Raid Level : raid5
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Array Size : 1953519872 (1863.02 GiB 2000.40 GB)
Raid Devices : 3
Total Devices : 2
Preferred Minor : 0
Update Time : Mon Aug 19 14:54:24 2013
State : clean
Active Devices : 1
Working Devices : 2
Failed Devices : 1
Spare Devices : 1
Checksum : ec606a5e - correct
Events : 1696008
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 1 8 33 1 active sync /dev/sdc1
0 0 0 0 0 removed
1 1 8 33 1 active sync /dev/sdc1
2 2 0 0 2 faulty removed
3 3 8 17 3 spare /dev/sdb1
smartctl -a /dev/sdc1
smartctl 5.43 2012-06-05 r3561 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.12
Device Model: ST31000524AS
Serial Number: 9VPBJHQF
LU WWN Device Id: 5 000c50 032bf4328
Firmware Version: JC45
User Capacity: 1 000 204 886 016 bytes [1,00 TB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Thu Aug 22 11:48:01 2013 MSK
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: ( 609) 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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 179) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x103f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 115 099 006 Pre-fail Always - 98516559
3 Spin_Up_Time 0x0003 100 100 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 57
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 090 060 030 Pre-fail Always - 983547621
9 Power_On_Hours 0x0032 081 081 000 Old_age Always - 17458
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 61
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 062 056 045 Old_age Always - 38 (Min/Max 25/38)
194 Temperature_Celsius 0x0022 038 044 000 Old_age Always - 38 (0 14 0 0 0)
195 Hardware_ECC_Recovered 0x001a 043 020 000 Old_age Always - 98516559
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 272597279327391
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 965939143
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 1412794824
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 Interrupted (host reset) 00% 12631 -
# 2 Extended offline Aborted by host 90% 12631 -
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.
smartctl -a /dev/sdd1
smartctl 5.43 2012-06-05 r3561 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.12
Device Model: ST31000524AS
Serial Number: 6VPCC6BS
LU WWN Device Id: 5 000c50 036535867
Firmware Version: JC45
User Capacity: 1 000 204 886 016 bytes [1,00 TB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Thu Aug 22 11:49:44 2013 MSK
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: ( 600) 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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 172) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x103f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 117 099 006 Pre-fail Always - 124172290
3 Spin_Up_Time 0x0003 100 100 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 43
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 076 060 030 Pre-fail Always - 44448910
9 Power_On_Hours 0x0032 080 080 000 Old_age Always - 18020
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 47
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 065 052 045 Old_age Always - 35 (Min/Max 23/35)
194 Temperature_Celsius 0x0022 035 048 000 Old_age Always - 35 (0 3 0 0 0)
195 Hardware_ECC_Recovered 0x001a 045 022 000 Old_age Always - 124172290
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 194566313494190
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 1583476984
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 896313136
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.
Прошу прощения за этот листинг... я подумал, что это важно.
В итоге, как я понимаю, один из 3-х мёртв, один жив, а один (по непонятной мне причине) встал в spare.
Что я сделал: слил два живых диска dd if/of на другие такие же (чтобы можно было экспериментировать) и попытался собрать массив путём "mdadm --create /dev/md0 --assume-clean --level=5 --chunk=64 --verbose --raid-devices=3 /dev/sd[bc]1 missing"
mdadm высказался в том смысле, что предполагает, что там должна быть ext2 (там ext3 на самом деле, но я предположил что для mdadm это не суть важно, ведь "ext3" это "ext2 -j", не так ли?) и я с ним радостно согласился.
Да, кстати, стартовать массив с двумя, что были, он отказывался, хоть force, хот не force. Говорил "у тебя только один, а этого мало", что в общем-то правда.
Ну так вот, собрать assume-clean он его собрал, но поставил в inactive и обращаться к md0 не давал. Тут я возможно косанул, не знал, что ему сказать такого, чтобы он из этого состояния вышел... в общем, я решил "дать" ему ещё один недостающий диск (ну, пустой, вестимо). Он его радостно съел и начал восстановление. После него, я получил девственно чистый md0. :((
Ну и резюмируя все сказанное, хочу спросить у сообщества: во-первых, считаете ли вы что вообще что-то ещё можно предпринять, и если да, то что?