The point is my root is on md2 . I can never reassemble the RAID devices. This is just the same of using a --force with mkraid of mdadm with reassemble . There seems no other way to update buggy superblocks online or even do something with reboot? Can I just modify the field and reset the machine after a "sync"?
OK, I find out there is a problem in the superblock which is descrbed as follows. The "Total Devices" is wrong. It should be 2 instead of 3. This is probably a bug of the mkraid (from raidtools) which when I created the array with a "failed-disk" in degraded mode. mkraid incorrectly made a wrong superblock even I put "nr-raid-disk 2" and "nr-spare-disks 0" in the raidtab. Ok, the superblock is incorrect, but how can I change the total devices and spare device pramaters without re-initialize the
array?
It is actuallt "Active Devices" that is the problem. As this is the same as "Raid Devices", it doesn't bother doing a reconstruction.
The following patch adds --update=summaries to mdadm-1.3.0, which updates the various summary fields in the superblock (Total, Active, Working, Failed, Spare - Devices). It is untested but should work. If you patch mdadm-1.3.0 and compile it, then
mdadm --assemble /dev/md2 --update=summaries /dev/sda3 /dev/sdb3
then it should update these fields and start the array (you might need a --run as well).
Let me know how it goes.
David
- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html