Comment 3 for bug 816475

Revision history for this message
Pedro Monteiro (ptsmonteiro) wrote :

Found the reason for the problem and a workaround.

The problem:

The problem is having a RAID partition as the last partition of the device. Because the superblock location of a partition that is the last on the device and the superblock location of an entire device is the same (both on the end of the device) the superblock metadata should be used to find which RAID device it's related to.
Apparently grub-probe misunderstands this info. In my case it was assuming I had a full hard drive RAID device instead of a single partition at the end.

The workaround:

Having found this erratic behavior, I changed my disk partition layout so that the RAID partition wouldn't be at the end of the disk. Now, the last partition was the swap partition.
That change itself didn't work because the mkswap command didn't erase the raid superblock data still in the partition at the end of the drive. I had to do a "mdadm --zero-superblock" at the disk device so that the only valid superblock would be the RAID partition superblock.

After all this, I finally got grub-probe to detect my configuration successfully.