multipath: Determine which device to use for grub device.map file
I need to configure a dm-multipath device (mpatha) as a boot disk in a
script. For RHEL it appears I can put the mpath device in my device.map
file. However, for SLES 11 if I use the mpath device, grub fails with
"Floating point exception". For SLES I have to use the underlying path
I know which devices make up my multipath disk. Here is an example that
shows my problem.
Out of the 4 paths, only two (sdd and sdf) are active. This output is
not very good to parse through in a script to determine which disks I
can specify in my device.map file. Is there a command or better way to
determine which underlying paths I can use in my device.map file.
For clarification, here is a breakdown of my device.map entries and the
(hd0) /dev/mapper/mpatha - FAIL with "Floating point exception"
(hd0) /dev/sdc - FAIL with "Error 21: Selected disk does not exist"
(hd0) /dev/sdd - Success!!!
I would rather put the mpath device in device.map, but that does not
appear to be an option for SLES. Is there a way to determine the
underlying path device that is "active" and not just enabled?
Right now I can run "dd if=/dev/sdc of=/dev/null bs=512 count=1
2>/dev/null; echo $?"
This will tell me in the device can be written to. Any suggestions would
dm-devel mailing list