Linux – Must partprobe before using drive

debianhard drivehardwarelinuxmdadm

This is a followup question to Cannot mount /dev/sdc1 on Debian 5.0, special device /dev/sdc1 doesn't exist

Basically, I have 6 SATA hard drives in a machine and I'm trying to create a RAID6 array with them. When I try to run the mdadm command to create (with the verbose option) a raid array, I see messages like "mdadm: super1.x cannot open /dev/sdf1: No such device or address" which are resolved by doing partprobe /dev/sdf and then re-running the mdadm command.

The problem is that I have to run partprobe after each reboot, and from experience I don't think this is normal behaviour — on no other linux machine do I have to partprobe the device before I can use it. Something must be going wrong, but how do I troubleshoot this to find out what? Could this be caused by a hardware problem?

Edit: Additional note – before I seemed to only have this problem with one drive, but now I'm having it with 3 drives.

Best Answer

It looks like the kernel is trying to add a whole drive into the array instead of the partition. Had you created an array using the whole drives before you created it using the partitions? If so, maybe md is seeing two superblocks.

Edit /etc/mdadm/mdadm.conf and add:

DEVICE /dev/sda1
DEVICE /dev/sdc1
DEVICE /dev/sdd1
DEVICE /dev/sde1
DEVICE /dev/sdf1
DEVICE /dev/sdg1