NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
IcyK
Aug 29, 2015Tutor
Q: how to re-assemble RAID5 array
After some stupid action (described here) I lost a RAID5 volume (4 x 6TB, OS 4.2.27). The partitions vanished from the partition table. No warranty, no backup. It would be nice (though not essential) if I could get about 7TB of the data recovered.
Using a Pro6 with VGA breakout, I booted Knoppix off of a USB pendrive. Using cgsecurity's TestDisk I was able to recover the RAID5 partitions. Running some tests, the partitions seem to be OK to me, but I cannot assemble the array.
If anyone had experience with this and could give me some pointers it would be highly appreciated... ;)
This is what I did so far:
root@Microknoppix:/home/knoppix# cat /proc/mdstat cat: /proc/mdstat: No such file or directory root@Microknoppix:/home/knoppix# modprobe raid456 root@Microknoppix:/home/knoppix# cat /proc/mdstat Personalities : [raid6] [raid5] [raid4] unused devices: <none> root@Microknoppix:/home/knoppix# mdadm --examine --scan ARRAY /dev/md/0 metadata=1.2 UUID=8e3862b6:09a0547e:9f752f8b:a6e0267e name=001F33EA1AC5:0 ARRAY /dev/md/1 metadata=1.2 UUID=5d5efea4:7225f2e7:609f8fa4:9d414452 name=001F33EA1AC5:1 ARRAY /dev/md/2 metadata=1.2 UUID=b697ee5c:dfd93286:04cbc712:c960ad5b name=001F33EA1AC5:2
So it looks like the OS partition (md0), swap partition (md1) and data partition (md2) are there.
However, trying to assemble:
root@Microknoppix:/home/knoppix# mdadm --assemble --scan mdadm: failed to add /dev/sdb3 to /dev/md/001F33EA1AC5:2: Invalid argument mdadm: failed to add /dev/sdc3 to /dev/md/001F33EA1AC5:2: Invalid argument mdadm: failed to add /dev/sdd3 to /dev/md/001F33EA1AC5:2: Invalid argument mdadm: failed to add /dev/sda3 to /dev/md/001F33EA1AC5:2: Invalid argument mdadm: failed to RUN_ARRAY /dev/md/001F33EA1AC5:2: Invalid argument mdadm: failed to add /dev/sdb2 to /dev/md/001F33EA1AC5:1: Invalid argument mdadm: failed to add /dev/sdc2 to /dev/md/001F33EA1AC5:1: Invalid argument mdadm: failed to add /dev/sdd2 to /dev/md/001F33EA1AC5:1: Invalid argument mdadm: failed to add /dev/sda2 to /dev/md/001F33EA1AC5:1: Invalid argument mdadm: failed to RUN_ARRAY /dev/md/001F33EA1AC5:1: Invalid argument mdadm: failed to add /dev/sdb1 to /dev/md/001F33EA1AC5:0: Invalid argument mdadm: failed to add /dev/sdc1 to /dev/md/001F33EA1AC5:0: Invalid argument mdadm: failed to add /dev/sdd1 to /dev/md/001F33EA1AC5:0: Invalid argument mdadm: failed to add /dev/sda1 to /dev/md/001F33EA1AC5:0: Invalid argument mdadm: failed to RUN_ARRAY /dev/md/001F33EA1AC5:0: Invalid argument mdadm: No arrays found in config file or automatically
Examining all data partitions:
root@Microknoppix:/home/knoppix# mdadm --examine /dev/sd[abcd]3
/dev/sda3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Name : 001F33EA1AC5:2
Creation Time : Mon Aug 17 20:52:14 2015
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 11711601777 (5584.53 GiB 5996.34 GB)
Array Size : 17567402112 (16753.58 GiB 17989.02 GB)
Used Dev Size : 11711601408 (5584.53 GiB 5996.34 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 1f2351ff:d6b0ce48:adc5d480:052a9385
Update Time : Mon Aug 24 22:12:18 2015
Checksum : 251998ca - correct
Events : 99
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 0
Array State : AAAA ('A' == active, '.' == missing)
/dev/sdb3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Name : 001F33EA1AC5:2
Creation Time : Mon Aug 17 20:52:14 2015
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 11711601777 (5584.53 GiB 5996.34 GB)
Array Size : 17567402112 (16753.58 GiB 17989.02 GB)
Used Dev Size : 11711601408 (5584.53 GiB 5996.34 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : ad97e3fa:7010280a:2013be33:8fa98bb2
Update Time : Mon Aug 24 22:12:18 2015
Checksum : c1e739ef - correct
Events : 99
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 1
Array State : AAAA ('A' == active, '.' == missing)
/dev/sdc3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Name : 001F33EA1AC5:2
Creation Time : Mon Aug 17 20:52:14 2015
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 11711601777 (5584.53 GiB 5996.34 GB)
Array Size : 17567402112 (16753.58 GiB 17989.02 GB)
Used Dev Size : 11711601408 (5584.53 GiB 5996.34 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 93aee45f:f0e48a25:1dc1448e:6956f9cc
Update Time : Mon Aug 24 22:12:18 2015
Checksum : b73f802d - correct
Events : 99
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 2
Array State : AAAA ('A' == active, '.' == missing)
/dev/sdd3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Name : 001F33EA1AC5:2
Creation Time : Mon Aug 17 20:52:14 2015
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 11711601777 (5584.53 GiB 5996.34 GB)
Array Size : 17567402112 (16753.58 GiB 17989.02 GB)
Used Dev Size : 11711601408 (5584.53 GiB 5996.34 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
State : clean
Device UUID : e533daef:44960cd1:62926d25:0a6a4aa8
Update Time : Mon Aug 24 22:12:18 2015
Checksum : 65309bbb - correct
Events : 99
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 3
Array State : AAAA ('A' == active, '.' == missing)Again, looks (to me) from the checksums that the data partitions are OK.
root@Microknoppix:/home/knoppix# mdadm --examine /dev/sd[abcd][3] | grep -E "(^\/dev|UUID)"
/dev/sda3:
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Device UUID : 1f2351ff:d6b0ce48:adc5d480:052a9385
/dev/sdb3:
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Device UUID : ad97e3fa:7010280a:2013be33:8fa98bb2
/dev/sdc3:
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Device UUID : 93aee45f:f0e48a25:1dc1448e:6956f9cc
/dev/sdd3:
Array UUID : b697ee5c:dfd93286:04cbc712:c960ad5b
Device UUID : e533daef:44960cd1:62926d25:0a6a4aa8
root@Microknoppix:/home/knoppix#The array UUID's are the same.
However, trying to assemble the data array:
root@Microknoppix:/home/knoppix# mdadm --assemble /dev/md2 --verbose /dev/sd[abcd]3 mdadm: looking for devices for /dev/md2 mdadm: /dev/sda3 is identified as a member of /dev/md2, slot 0. mdadm: /dev/sdb3 is identified as a member of /dev/md2, slot 1. mdadm: /dev/sdc3 is identified as a member of /dev/md2, slot 2. mdadm: /dev/sdd3 is identified as a member of /dev/md2, slot 3. mdadm: failed to add /dev/sdb3 to /dev/md2: Invalid argument mdadm: failed to add /dev/sdc3 to /dev/md2: Invalid argument mdadm: failed to add /dev/sdd3 to /dev/md2: Invalid argument mdadm: failed to add /dev/sda3 to /dev/md2: Invalid argument mdadm: /dev/md2 assembled from 0 drives - need all 4 to start it (use --run to insist).
and finally with --run:
root@Microknoppix:/home/knoppix# mdadm --assemble /dev/md2 --run --verbose /dev/sd[abcd]3 mdadm: looking for devices for /dev/md2 mdadm: /dev/sda3 is identified as a member of /dev/md2, slot 0. mdadm: /dev/sdb3 is identified as a member of /dev/md2, slot 1. mdadm: /dev/sdc3 is identified as a member of /dev/md2, slot 2. mdadm: /dev/sdd3 is identified as a member of /dev/md2, slot 3. mdadm: failed to add /dev/sdb3 to /dev/md2: Invalid argument mdadm: failed to add /dev/sdc3 to /dev/md2: Invalid argument mdadm: failed to add /dev/sdd3 to /dev/md2: Invalid argument mdadm: failed to add /dev/sda3 to /dev/md2: Invalid argument mdadm: failed to RUN_ARRAY /dev/md2: Invalid argument
I tried also with /dev/md0, but this lead to the same result.
Deleting /etc/mdadm/mdadm.conf also didn't fix it.
Can anyone shine a light on this? I suppose using mdadm --create will cause the array to build from scratch and that'll be the end of it, so I didn't try that...
8 Replies
Replies have been turned off for this discussion
- mdgm-ntgrNETGEAR Employee Retired
You could try forcing the array online but you may wish to clone your disks first. If you coyountact support you could purchase a data recovery attempt where support would attempt to recover your data.
What is the SMART stats of your disks like?
Edit: Oops. I confused the creation time with the update time.
- mdgm-ntgrNETGEAR Employee Retired
Before you try forcing it to start, what is the output of the following?
# cat /proc/partitions
# for i in /dev/sd[a-z]; do echo $i; smartctl -a $i | egrep "Model|Firm|Sector|Hours|Error|Uncorr"; done; - IcyKTutor
I guess the SMART stats are OK, the disks have been 'on power' for only about 300 hours (bought them in the beginning of August). Last time I looked at SMART data (via OS6 interface) was around 170 hours, no errors then.
How would I force the array online?
Data recovery by Netgear is not an option I guess (fiddled aroud too much (OS4<->OS6), plus the Pro they were in was not bought new).
Next to that, the data is not that valuable (missing it would be an inconvenience, but not a real problem).
I don't have the spare space to clone about 16 TB. And my girlfriend won't make me live to the end of the weekend if I spend another 1000 EURO's for new disks ... :smileyfrustrated:
So I'll take the chances losing the data.
The disks are now in a Pro6 running Knoppix.
The requested output:
root@Microknoppix:/home/knoppix# cat /proc/partitions major minor #blocks name 240 0 10559232 cloop0 252 0 2259732 zram0 8 0 5860522584 sda 8 1 4193272 sda1 8 2 524228 sda2 8 3 5855800708 sda3 8 16 5860522584 sdb 8 17 4193272 sdb1 8 18 524228 sdb2 8 19 5855800708 sdb3 8 32 5860522584 sdc 8 33 4193272 sdc1 8 34 524228 sdc2 8 35 5855800708 sdc3 8 48 5860522584 sdd 8 49 4193272 sdd1 8 50 524228 sdd2 8 51 5855800708 sdd3 8 80 122368 sdf 8 81 122250 sdf1 8 64 7566624 sde 8 65 4556800 sde1 8 66 3008512 sde2
sda,b,c,d are HDD's,
sde is Knoppix pendrive
sdf is internal flash (I presume)
root@Microknoppix:/home/knoppix# for i in /dev/sd[a-z]; do echo $i; smartctl -a $i | egrep "Model|Firm|Sector|Hours|Error|Uncorr"; done; /dev/sda Device Model: WDC WD60EFRX-68MYMN1 Firmware Version: 82.00A82 Sector Sizes: 512 bytes logical, 4096 bytes physical Error logging capability: (0x01) Error logging supported. SCT Error Recovery Control supported. 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 288 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0 SMART Error Log Version: 1 No Errors Logged /dev/sdb Device Model: WDC WD60EFRX-68MYMN1 Firmware Version: 82.00A82 Sector Sizes: 512 bytes logical, 4096 bytes physical Error logging capability: (0x01) Error logging supported. SCT Error Recovery Control supported. 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 288 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0 SMART Error Log Version: 1 No Errors Logged /dev/sdc Device Model: WDC WD60EFRX-68MYMN1 Firmware Version: 82.00A82 Sector Sizes: 512 bytes logical, 4096 bytes physical Error logging capability: (0x01) Error logging supported. SCT Error Recovery Control supported. 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 288 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0 SMART Error Log Version: 1 No Errors Logged /dev/sdd Device Model: WDC WD60EFRX-68MYMN1 Firmware Version: 82.00A82 Sector Sizes: 512 bytes logical, 4096 bytes physical Error logging capability: (0x01) Error logging supported. SCT Error Recovery Control supported. 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 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 100 100 000 Old_age Always - 294 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0 SMART Error Log Version: 1 No Errors Logged /dev/sde /dev/sdf /dev/sdg /dev/sdh- mdgm-ntgrNETGEAR Employee Retired
If it is OS6 then it would be /dev/md127 not /dev/md2
Does it make any difference if you try to assemble md127 rather than md2?Best to leave forcing it online as a last resort.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!