I have had a long-standing raid1 array with two member disks that was degraded when the power connector to one of the raid1 disks was accidentally disconnected while the system was powered off and subsequently rebooted. On boot, the INTEL Rapid Storage Tech bios reported that the disconnected drive was removed from the raid array. The system is running a 5.4 linux kernel. The array was originally created in 2011 with two identical 2Tb western digital disks. The raid array was constructed from whole disks, sda and sdb, each with 3 identical primary and one extended ext partitions. To emphasize, the partitions are ext, not raid identified partitions. The original disk installed as sdb failed years ago and was replaced by a similar sized, but not identical Seagate drive. The raid mirror array was automatically reconstructed when that drive was installed years ago and functioned properly until this problem arose.
Using operating system tools (mdadm, /proc data), sdb is now reportedly removed from the raid array, although physically present and defect free according to a smartools test.
**proc/mdstat shows two raid arrays, although only one is in use:
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md126 : active raid1 sda 1953511424 blocks super external:/md127/0 [2/1] [U_] md127 : inactive sda(S) sdb(S) 6320 blocks super external:imsm unused devices: none
Attempts to re-add sdb back to /dev/md126 fail as follows:
mdadm /dev/md126 --re-add /dev/sdb mdadm: Cannot add disks to a 'member' array, perform this operation on the parent container
From what I have gathered, the parent container is /dev/md127 or /dev/md/imsm0 (linked to each other), but attempts to re-add the device to the parent container also fail.
mdadm /dev/md127 --re-add /dev/sdb mdadm: Cannot open /dev/sdb: Device or resource busy
Currently /dev/md126p5 is mounted as /home on the system. According to the system, md126 is contained within md127. How this architecture was established is unclear to me, as is its necessity, which seems unnecessarily complex. My understanding of raid arrays was and is weak and I never intentionally created this structure. As I recall, the array was originally referenced as /dev/md0 prior to the real disk drive failure years ago.
If all else fails, I have a full backup of the data, but it seems to me that this problem should be easily solved with the proper sequence of mdadm commands. The operating system/ functioning boot data are not on this raid array. However, when originally constructed, redundant boot data was placed on partitions /dev/sda1 and /dev/sdb1 (/dev/md126p1) for possible emergency use, but the system boots from /dev/sdc1, not a raid member.
Can I stop /dev/md127 which is inactive even though it seems to contain /dev/md126?
Do I then mark /dev/sdb as failed then re-add it in /dev/md126?
If I understand correctly, md127 contains inactive "spares" that are physically the same drives as assembled in md126.
Thanks for your help.