Operating System - Linux
1753947 Members
7387 Online
108811 Solutions
New Discussion юеВ

multipath extra /dev/dm-* files

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

multipath extra /dev/dm-* files

Wondering if anyone has seen this..

I have extra /dev/dm-x files that do not show when issuing a multipath -ll but they seem to be actual devices..

e.g. /dev/dm-8 is a working device that shows when excuting multipath -ll

/dev/dm-16 does not show in mulitpath -ll but it is a working device that seems to be a duplicate for /dev/dm-1


if I knew how to show the WWID for /dev/dm-16 I could prove it was the same I am gussing by size and by a dd, that this is the same device and I am not crazy. but....


6 REPLIES 6
Tim Nelson
Honored Contributor

Re: multipath extra /dev/dm-* files

oops.. typo.

e.g. /dev/dm-8 is a working device that shows when excuting multipath -ll

/dev/dm-16 does not show in mulitpath -ll but it is a working device that seems to be a duplicate for /dev/dm-8
Tim Nelson
Honored Contributor

Re: multipath extra /dev/dm-* files

found the issue, it is still weird, but probably just that way.

The devices being used by ASM and are partitioned. the whole disk device is one dm- device and the partion is another..

e.g.
/dev/mapper/nice-name1 equates to /dev/dm-8
/dev/mapper/nice-name1p1 equates to /dev/dm-16

confusing but I guess normal :(




Matti_Kurkela
Honored Contributor
Solution

Re: multipath extra /dev/dm-* files

You might wish to run "dmsetup ls --tree" if you need to figure out which /dev/dm-* device is attached to which actual disk device.

The command displays the major/minor device numbers of each mapped device in the form (major:minor), prefixed with the "human-readable" names. For the actual disk devices, only the (major:minor) is shown.

The device-mapper is a low-level subsystem used to implement multiple disk management features, like software RAID, disk encryption, multipathing and LVM. That's why you'll see /dev/dm-* files used for several purposes.

I hope you don't set up anything to rely on /dev/dm-* names: these names are not persistent and are very likely to change at system reboot.

The kernel does not really check for partitioning on /dev/dm-* devices like it does for real disk devices. That's why you need kpartx if you wish to implement partitions on multipath devices.

If you see /dev/dm-* devices in the output of your LVM configuration commands, you should probably edit /etc/lvm/lvm.conf.

Comment out the default value of

preferred_names = [ ]

and instead uncomment the commented-out alternative just below it:

# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]

If the preferred_names keyword is not there, you might wish to update your LVM tools: I think it was added at some RHEL 4 Update release.

See also:
http://kbase.redhat.com/faq/docs/DOC-5551

MK
MK
Tim Nelson
Honored Contributor

Re: multipath extra /dev/dm-* files

Thanks Matti, your hat is well deserved..

yes, this is an Oracle RAC configuration and yes I am using the /dev/mapper/nice-names for all configurations.. ASM is now requiring that the disk be partitioned.

I ran into this as I have a disk_configuration script that presents me with a report on disk configs, I could not figure out where the extra 7 /dev/dm-* were coming from..not easy to script when there are soooo many different ways.. ( I am an HPUX persona by heart, I am slowly getting use to the less diciplined world of Linux)


Thanks again !!
Tim

Michael Leu
Honored Contributor

Re: multipath extra /dev/dm-* files

Thanks a lot Matti for the info about preferred_names in lvm.conf! Always great posts from you :-)

Tim, if you want to grab the WWID you could try:
/lib/udev/scsi_id --whitelisted --page=0x83 --device=/dev/dm-x
At least that's what I use on SLES11...
Tim Nelson
Honored Contributor

Re: multipath extra /dev/dm-* files

Thanks Michael,

I will give this a try..

Having the darnedest time trying to tie all these together in my storage info script.

sda,g,l,p => /dev/dm-x => /dev/mapper/something

and then put a partion on and now have another multitude of device names to sort out.