My QNAP had 4 disks. The QNAP died and took one of the drives with it. I have moved the three other drives and a new replacement drive to a new system. I am attempting to assemble the RAID5 and add the new drive, but mdadm does not see the three drives as RAID5; it starts as RAID0.
Then mdadm can’t add the new drive because it dies with
mdadm: Cannot get array info for /dev/md123
The QNAP built the RAID array on the third partition, using the first two for the OS. I cloned the partition table from the first disk to the new disk and rebuilt the first two partitions with issues.
How can I rebuild my RAID5? How can I start the md device in RAID5, degraded?
grep ^ARRAY /etc/mdadm/mdadm.conf
ARRAY /dev/md121 level=raid1 num-devices=4 metadata=1.0 UUID=13fd2d40:35dfc014:b9a39068:df7d7983
ARRAY /dev/md122 level=raid1 num-devices=2 metadata=1.0 UUID=80b47b0f:307b4394:f708382e:9760fab4
ARRAY /dev/md123 level=raid5 num-devices=4 metadata=1.0 UUID=bfd2e558:78ef34a3:dd7a3e89:ef0887c6
# mdadm --stop /dev/md123
mdadm: stopped /dev/md123
# mdadm --assemble /dev/md123 --uuid bfd2e558:78ef34a3:dd7a3e89:ef0887c6
mdadm: /dev/md123 assembled from 2 drives and 1 spare - not enough to start the array.
# mdadm --add /dev/md123 /dev/sde3
mdadm: Cannot get array info for /dev/md123
# mdadm --detail /dev/md123
/dev/md123:
Version : 1.0
Raid Level : raid0
Total Devices : 3
Persistence : Superblock is persistent
State : inactive
Name : 1
UUID : bfd2e558:78ef34a3:dd7a3e89:ef0887c6
Events : 12786
Number Major Minor RaidDevice
- 8 83 - /dev/sdf3
- 8 51 - /dev/sdd3
- 8 35 - /dev/sdc3
Examin can see the correct RAID5 on each of the surviving drives
root@pve-Orthrus:~# mdadm --examine /dev/sd[cdef]3
/dev/sdc3:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x0
Array UUID : bfd2e558:78ef34a3:dd7a3e89:ef0887c6
Name : 1
Creation Time : Sun Feb 19 00:00:49 2023
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 15608143240 (7442.54 GiB 7991.37 GB)
Array Size : 17551702848 (16738.61 GiB 17972.94 GB)
Used Dev Size : 11701135232 (5579.54 GiB 5990.98 GB)
Super Offset : 15608143504 sectors
Unused Space : before=0 sectors, after=3907008264 sectors
State : clean
Device UUID : bc9c5783:f4e46f47:435fa110:0d4baa33
Update Time : Sun Jun 23 19:31:58 2024
Bad Block Log : 512 entries available at offset -8 sectors
Checksum : cc676e82 - correct
Events : 13100
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 0
Array State : AA.A ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd3:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x0
Array UUID : bfd2e558:78ef34a3:dd7a3e89:ef0887c6
Name : 1
Creation Time : Sun Feb 19 00:00:49 2023
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 11701135240 (5579.54 GiB 5990.98 GB)
Array Size : 17551702848 (16738.61 GiB 17972.94 GB)
Used Dev Size : 11701135232 (5579.54 GiB 5990.98 GB)
Super Offset : 11701135504 sectors
Unused Space : before=0 sectors, after=264 sectors
State : active
Device UUID : 6185270d:fa5eb7de:5a702d2e:80180af8
Update Time : Sun Jun 23 19:32:00 2024
Bad Block Log : 512 entries available at offset -8 sectors
Checksum : fda943b6 - correct
Events : 13100
Layout : left-symmetric
Chunk Size : 64K
Device Role : Active device 3
Array State : AA.A ('A' == active, '.' == missing, 'R' == replacing)
mdadm: No md superblock detected on /dev/sde3.
/dev/sdf3:
Magic : a92b4efc
Version : 1.0
Feature Map : 0x0
Array UUID : bfd2e558:78ef34a3:dd7a3e89:ef0887c6
Name : 1
Creation Time : Sun Feb 19 00:00:49 2023
Raid Level : raid5
Raid Devices : 4
Avail Dev Size : 11701135240 (5579.54 GiB 5990.98 GB)
Array Size : 17551702848 (16738.61 GiB 17972.94 GB)
Used Dev Size : 11701135232 (5579.54 GiB 5990.98 GB)
Super Offset : 11701135504 sectors
Unused Space : before=0 sectors, after=264 sectors
State : active
Device UUID : 623a01e5:62c24bf3:8ebb61d3:f01ab11f
Update Time : Sun Jun 23 19:29:43 2024
Bad Block Log : 512 entries available at offset -8 sectors
Checksum : b6f3a802 - correct
Events : 12786
Layout : left-symmetric
Chunk Size : 64K
Device Role : spare
Array State : AA.A ('A' == active, '.' == missing, 'R' == replacing)