Q: How do I force a rebuild? The following describes the scenario.
I've been experimenting with forcing a RAID10 to rebuild, so I could see what dmsetup status output should look like when a RAID is rebuilding, and also so I could get some experience with doing recoveries. The setup was using dmraid in Ubuntu. This is how I did the experiment:
I caused one of the RAID member disks to become listed as "disabled" (looking at the status using dmsetup) by doing an ftp transfer onto the RAID and then during the transfer, unplugging a RAID member disk. I noted the major:minor number of the device, as well as its /dev filename (let's say it was /dev/sde) before I did the unplug. The reason why I did this was so that I could write some data onto that individual RAID member disk (see my next step) and, so this would mean that the mirror would be out of sync.
I replugged the RAID member disk, I noted that when I replug, the major:minor number that dmsetup status outputs from before is different, so I get the /dev/sd* filename that is associated with this new major:minor number. Then issuing a "shred -z /dev/sdf" (where /dev/sdf is the new device filename that's associated with the new major:minor number).
Restart the server.
But, now that I've restarted, dmsetup status says that all of the RAID member disks are "active" - the major:minor numbers for all of the devices go back to the way they were from before the start of the experiment. Doing a "dmraid -s -s" says that the RAID array is ok - but of course it wouldn't be, since I wrote a bunch of zeros on one of the mirror disks. Also, trying to mount the RAID array gives an output of: "mount: Structure needs cleaning".