I ran a ReadyNas with 4 drives and raid5. One drive failed, I replaced it and it started rebuilding. The very moment the recovery was completed another drive failed and the NAS stopped working.
I created images from three drives (need more space for the last drive) with ddrescue.
When I try to assemble the raid5 on my computer (opensuse tumbleweed) I get the message
linux:/mnt/ddrescue # mdadm --assemble --verbose /dev/md126 /dev/loop1 /dev/loop2 /dev/loop3 /dev/sda3
mdadm: looking for devices for /dev/md126
mdadm: /dev/loop1 is identified as a member of /dev/md126, slot 0.
mdadm: /dev/loop2 is identified as a member of /dev/md126, slot 1.
mdadm: /dev/loop3 is identified as a member of /dev/md126, slot -1.
mdadm: /dev/sda3 is identified as a member of /dev/md126, slot 3.
mdadm: added /dev/loop2 to /dev/md126 as 1 (possibly out of date)
mdadm: no uptodate device for slot 2 of /dev/md126
mdadm: added /dev/sda3 to /dev/md126 as 3
mdadm: added /dev/loop3 to /dev/md126 as -1
mdadm: added /dev/loop1 to /dev/md126 as 0
mdadm: /dev/md126 assembled from 2 drives and 1 spare - not enough to start the array.
- loop1 was the first drive without any issues
- loop2 was the drive that failed when
- loop3 finished the rebuild,
- /dev/sda3 also had no issues
I guess something went wrong when finishing the rebuild and the role couldn't be changed. Is there a way to change the role?
linux:/mnt/ddrescue # mdadm --examine hd0_image
loop1, hd0_image:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
Name : 0e34c7aa:data-0
Creation Time : Thu Nov 7 02:52:09 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 7804334065 sectors (3.63 TiB 4.00 TB)
Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
Data Offset : 261760 sectors
Super Offset : 8 sectors
Unused Space : before=261480 sectors, after=753 sectors
State : clean
Device UUID : e419c18d:188c104e:666f38c6:ab25a03d
Update Time : Mon Apr 19 07:57:43 2021
Bad Block Log : 512 entries available at offset 264 sectors
Checksum : a161273b - correct
Events : 56127
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 0
Array State : A..A ('A' == active, '.' == missing, 'R' == replacing)
linux:/mnt/ddrescue # mdadm --examine hd1_image
loop2, hd1_image:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
Name : 0e34c7aa:data-0
Creation Time : Thu Nov 7 02:52:09 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 7804333681 sectors (3.63 TiB 4.00 TB)
Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
Data Offset : 261760 sectors
Super Offset : 8 sectors
Unused Space : before=261680 sectors, after=753 sectors
State : clean
Device UUID : 006a9bca:a8c77f7c:bfc822a6:8791589a
Update Time : Mon Apr 19 07:55:37 2021
Checksum : 49478213 - correct
Events : 55443
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 1
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
linux:/mnt/ddrescue # mdadm --examine hd2_image
loop3, hd2_image:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x8
Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
Name : 0e34c7aa:data-0
Creation Time : Thu Nov 7 02:52:09 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 7804334065 sectors (3.63 TiB 4.00 TB)
Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
Data Offset : 261760 sectors
Super Offset : 8 sectors
Unused Space : before=261480 sectors, after=753 sectors
State : clean
Device UUID : 867c1916:bc9627b3:c4d46505:e59c94a2
Update Time : Mon Apr 19 07:57:43 2021
Bad Block Log : 512 entries available at offset 264 sectors - bad blocks present.
Checksum : 32f280ca - correct
Events : 56127
Layout : left-symmetric
Chunk Size : 64K
Device Role : spare
Array State : A..A ('A' == active, '.' == missing, 'R' == replacing)
linux:/mnt/ddrescue # mdadm --examine /dev/sda3
/dev/sda3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 03b2a0a4:08a02a02:83ce65ff:a8a5a29f
Name : 0e34c7aa:data-0
Creation Time : Thu Nov 7 02:52:09 2013
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 7804333681 sectors (3.63 TiB 4.00 TB)
Array Size : 11706499968 KiB (10.90 TiB 11.99 TB)
Used Dev Size : 7804333312 sectors (3.63 TiB 4.00 TB)
Data Offset : 261760 sectors
Super Offset : 8 sectors
Unused Space : before=261672 sectors, after=753 sectors
State : clean
Device UUID : 9ef499c1:5373f99b:8923c2ad:09a32d0d
Update Time : Mon Apr 19 07:57:43 2021
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : da3a1870 - correct
Events : 56127
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 3
Array State : A..A ('A' == active, '.' == missing, 'R' == replacing)