I have a server (with 4 SATA disks - 2 sets of RAID1, in a chassis which supports hot swapping), set up with software raid using mdadm. One of the disks failed, so I have replaced it, but things did not work as expected. FWIW, I'm using CentOS6.
Can anyone shine some light on why the partitions (ie /dev/sdeX) are not listed, if there is a significant inpact using /dev/mapper/sdeX), and if there is a way I can recreate the partitions without rebooting.
What I did was as follows:
- Pull out the non-working drive and replace it with a new unpartitioned drive.
- Rescan the bus using echo "- - -" > /sys/class/scsi_host/host3/scan - this caused the new disk to show up as /dev/sde
- dd if=/dev/sdc of=/dev/sde bs=1024 count=1024 - this copied the first meg of the drive, which created the partition table and presumably grub etc.
- Attempted (2) again to see if it made the partitions visible, it didn't.
- Pulled out the drive, reinserted, rescanned - sde re-established but no partitions found.
- I used kpartx -a /dev/sde which created /dev/mapper/sdeX partitions, which I'm rebuilding the RAID on.