SAN storage on physical servers
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.
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.
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
