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:

  1. Pull out the non-working drive and replace it with a new unpartitioned drive.
  2. Rescan the bus using echo "- - -" > /sys/class/scsi_host/host3/scan - this caused the new disk to show up as /dev/sde
  3. 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.
  4. Attempted (2) again to see if it made the partitions visible, it didn't.
  5. Pulled out the drive, reinserted, rescanned - sde re-established but no partitions found.
  6. I used kpartx -a /dev/sde which created /dev/mapper/sdeX partitions, which I'm rebuilding the RAID on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.