SAN storage on physical servers

Latest response

I have all 4 servers sharing the same LUNS in a cluster but the device mapper # are different on each server. How to make the dm's to be in snyc ? I have to set both mpath# and DM# same on all 4 servers?

Responses

How is the LUN seen or detected on all 4 systems? Yes, if you wish to keep an unique device name or alias and if the device (storage lun) qualifies to be a multipath device then kernel would certainly create a proper device-mapper name (such as mpathx if user-friendly-names is set to yes) which is default options Or can also set aliases.

Yes, you could create an unique name (alias) using the WWID of the LUN and then update mutlpath.conf on one system, flush out and restart multipath service on rest systems to get it updated, please be careful if that lun is on production.

With the default multipathing configuration (thinking you are using RHEL6.x here), device name would be unique per device and not guaranteed to be unique across all nodes using same multipath device. Hence, to keep device name unique, set "user_friendly_names" to "no" in which case system would use WWID which is unique across all nodes.

If you prefer to use user_friendly_names then you would need to stop multipathd service on all nodes (flush out paths) and configure multipathing (/etc/multipath.conf file) on one device (with alias), then copy "multipath.conf" file to other systems, then start multipathd service.

Yes, the user_friendly_names is set to no and used WWID unigue across all nodes. Below is the reference.. defaults { user_friendly_names no } { multipath { wwid 660008ac000000000050084u00000z21u alias mpath0 } However the device mapper (dm#) looks different on all 4 servers, which needs to be unique as well. dm8 should be the value on all 4 nodes.

server1-mpath0 (660008ac000000000050084u00000z21u) dm-8 server2-mpath0 (660008ac000000000050084u00000z21u) dm-6 server3-mpath0 (660008ac000000000050084u00000z21u) dm-11 server4-mpath0 (660008ac000000000050084u00000z21u) dm-18

mpath is same for all the servers but not the device mapper

That looks okay. Those device names (/dev/dm8..) are created by kernel and should not be used, instead user need to use device name which is created as /dev/mapper/...... in this format, so as long as you get to access the shared Lun using name /dev/mapper/$(hostname -s)-mpath0 ( as written by you) then all looks fine for me.

Right, That's the requirement to make the device mapper # consistent as well. Not sure how to go about?

This is the correct answer. The /dev/dm-* and /dev/mpath names are internal to the kernel and shouldn't even be considered by sysadmins. The path for proper usage of device-mapper devices is under /dev/mapper/* and those names can be made persistent and consistent under multipath with the bindings file.

A requirement to have /dev/dm-* names the same across all servers is unrealistic requirement which demonstrates a lack of understanding of how device-mapper works. That's like asking that all logical RAM pages are mapped to the same physical RAM pages on two systems running different workloads, it's just not going to happen.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.