Skip to contentSkip to conversation

multipath: Determine which device to use for grub device.map file

DISCUSSION David Huffman 4 participants 5 messages Feb 19, 2010 – Feb 22, 2010 Device mapper

lore
Share & tools
lore
#0 lore raw

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 device (sd[a-z]).

I know which devices make up my multipath disk. Here is an example that shows my problem.

mpatha (36006016094511600449d92ae1937d611) dm-0 DGC,DISK [size=50G][features=1 queue_if_no_path][hwhandler=1 emc][rw] \_ round-robin 0 [prio=2][active]
\_ 2:0:1:0 sdd 8:48 [active][ready]
\_ 3:0:1:0 sdf 8:80 [active][ready]
\_ round-robin 0 [prio=0][enabled]
\_ 2:0:0:0 sdc 8:32 [active][ready]
\_ 3:0:0:0 sde 8:64 [active][ready]

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 results:

(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 be helpful.

- David

#1 lore raw

Re: multipath: Determine which device to use for grubdevice.map file

Hi David.

For SLES you should be using
/dev/disk/by-id/36006016094511600449d92ae1937d611-part2 for a typical root partition.

Regards,
Wayne.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of David Huffman
Sent: Thursday, February 18, 2010 8:15 PM
To: [email protected]
Subject: [dm-devel] multipath: Determine which device to use for grubdevice.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 device (sd[a-z]).

I know which devices make up my multipath disk. Here is an example that shows my problem.

mpatha (36006016094511600449d92ae1937d611) dm-0 DGC,DISK [size=50G][features=1 queue_if_no_path][hwhandler=1 emc][rw] \_ round-robin 0 [prio=2][active]
\_ 2:0:1:0 sdd 8:48 [active][ready]
\_ 3:0:1:0 sdf 8:80 [active][ready]
\_ round-robin 0 [prio=0][enabled]
\_ 2:0:0:0 sdc 8:32 [active][ready]
\_ 3:0:0:0 sde 8:64 [active][ready]

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 results:

(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

be helpful.

- David

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#2 lore raw

Re: multipath: Determine which device to use for grubdevice.map file

Thanks for the response Wayne, but this does me no good. You cannot use the /dev/disk/by-id/* entries for device.map. You have to use the block device and not a link or dm-* device name.

Essentially, I need to know which underlying paths can be written to directly.

-David

Quoted 61 lines · [email protected] wrote:

Hi David.

For SLES you should be using
/dev/disk/by-id/36006016094511600449d92ae1937d611-part2 for a typical root partition.

Regards,
Wayne.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of David Huffman
Sent: Thursday, February 18, 2010 8:15 PM
To: [email protected]
Subject: [dm-devel] multipath: Determine which device to use for grubdevice.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 device (sd[a-z]).

I know which devices make up my multipath disk. Here is an example that shows my problem.

mpatha (36006016094511600449d92ae1937d611) dm-0 DGC,DISK [size=50G][features=1 queue_if_no_path][hwhandler=1 emc][rw] \_ round-robin 0 [prio=2][active]
\_ 2:0:1:0 sdd 8:48 [active][ready]
\_ 3:0:1:0 sdf 8:80 [active][ready]
\_ round-robin 0 [prio=0][enabled]
\_ 2:0:0:0 sdc 8:32 [active][ready]
\_ 3:0:0:0 sde 8:64 [active][ready]

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 results:

(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

be helpful.

- David

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#3 lore raw

Re: multipath: Determine which device to use for grubdevice.map file

Quoted 9 lines

mpatha (36006016094511600449d92ae1937d611) dm-0 DGC,DISK [size=50G][features=1 queue_if_no_path][hwhandler=1 emc][rw] \_ round-robin 0 [prio=2][active]
\_ 2:0:1:0 sdd 8:48 [active][ready]
\_ 3:0:1:0 sdf 8:80 [active][ready]
\_ round-robin 0 [prio=0][enabled]
\_ 2:0:0:0 sdc 8:32 [active][ready]
\_ 3:0:0:0 sde 8:64 [active][ready]

Quoted 4 lines

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.

You can probably get it from "dmsetup status <device>", but it may be even harder to parse!

Thanks, Malahal.

#4 lore raw

Re: multipath: Determine which device to use for grubdevice.map file

In reply to David Huffman
Quoted 4 lines · David Huffman

Thanks for the response Wayne, but this does me no good. You cannot use the /dev/disk/by-id/* entries for device.map. You have to use the block device and not a link or dm-* device name.

Hm. Works here in my setup ...

# cat /boot/grub/device.map
(hd0)   /dev/disk/by-id/scsi-35000c5000042f3f3
(hd1)   /dev/disk/by-id/scsi-SATA_WDC_WD800JD-23L_WD-WMAM9K563627

What are the errors you see?

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)