Bug 1305589 - RFE: Request for warning if multipathd is not running/active
Summary: RFE: Request for warning if multipathd is not running/active
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: device-mapper-multipath
Version: 6.7
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Lin Li
Milan Navratil
URL:
Whiteboard:
Depends On:
Blocks: 1269194 1324930 1359510
TreeView+ depends on / blocked
 
Reported: 2016-02-08 16:10 UTC by John Pittman
Modified: 2020-09-10 09:32 UTC (History)
15 users (show)

Fixed In Version: device-mapper-multipath-0.4.9-94.el6
Doc Type: Release Note
Doc Text:
Users are now warned if they create multipath devices while *multipathd* is not running With this update, multipath prints a warning message for adding and listing multipath devices when the *multipathd* service is not running.
Clone Of:
: 1359510 (view as bug list)
Environment:
Last Closed: 2017-03-21 10:49:00 UTC
Target Upstream Version:


Attachments (Terms of Use)
Proposed Patch v1 (3.11 KB, patch)
2016-07-24 13:19 UTC, Milan P. Gandhi
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2139121 None None None 2016-02-11 02:30:40 UTC
Red Hat Product Errata RHBA-2017:0697 normal SHIPPED_LIVE device-mapper-multipath bug fix and enhancement update 2017-03-21 12:39:06 UTC

Description John Pittman 2016-02-08 16:10:52 UTC
Description of problem:

Opening at customer request.  Is it possible to get a warning if the dm_multipath module is loaded, multipath devices are present, but multipathd is not set to on?  Perhaps when using the 'multipath' command.  The idea is that most users never use the multipathd command; they configure multipathing and use the multipath command. 

The multipathd service is an integral part of multipathing, so we should at least give an informative message if it is not running and the system is using multipath.

Why do we not auto-start multipathd if the module is in use?  Are there use cases where we would want to have multipath devices, but not use multipathd?  I have seen many cases where proper failover/mapping was not acheived because multipathd was not running and no one knew.  Could we request an auto load for multipathd instead of the warning?  Maybe both?  

Thanks for your time.  Please let me know if I can be of any help.

Version-Release number of selected component (if applicable):

device-mapper-multipath-0.4.9-87.el6.x86_64

Expected Results:

- multipathd service autostart with module load
- warning if service is not running when using multipath command

Comment 1 Ben Marzinski 2016-02-08 20:04:02 UTC
Loading the module can't autostart the service. There's no hook for anything like that in the module code. Besides, if there are no multipath devices, we don't want to start the service.  If the service is enabled in systemd, it will autostart on boot, as long a /etc/multipath.conf exists.  Creating the configuration file the recommended way, with

# mpathconf --enable

does enable the service in systemd. However, it does not autostart the service at that point.  This is because users often want to actually edit the configuration file before starting the service the first time. The service will autostart on the next reboot.

There are two ways to actually create multipath devices. Either multipathd will automatically create them, or they can be created manually by running multipath.  I can make multipath print a warning message if multipathd isn't running. This should solve the case where there are multipath devices but multipathd isn't running.

Does this sound reasonable?

Comment 2 John Pittman 2016-02-08 20:12:22 UTC
Yes Ben that sounds perfect.
Thanks a lot.

John

Comment 3 Milan P. Gandhi 2016-07-24 13:19:40 UTC
Created attachment 1183368 [details]
Proposed Patch v1

With the attached patch, dm-multipath commands e.g. multipath -v2, multipath -ll etc. now checks if there are multipath device maps created, and multipathd service is running or not?

If the multipath device maps are created, but multipathd service is not running, then in such case there will be a warning message displayed to inform the user that IO failover/failback may not work as expected without multipathd process running.

Comment 4 Milan P. Gandhi 2016-07-24 13:27:42 UTC
Hello,

The attached patch is for dm-multipath package in RHEL 7.
There are significant differences in dm-multipath in RHEL 6 and 7 about how to verify if the multipathd process is running or not. So this patch would not be applicable for RHEL 6 dm-multipath package. I have cloned the RHEL 7 BZ#1359510 from current BZ, and have attached this patch in BZ#1359510.

Sorry for the noise.

Many thanks,
Milan.

Comment 7 Ben Marzinski 2016-10-15 18:20:17 UTC
Thanks for the patch. Applied (in a slightly modified form).

Comment 10 Lin Li 2017-01-09 03:12:03 UTC
Reproduced on device-mapper-multipath-0.4.9-72.el6
1. [root@storageqe-71 ~]# rpm -qa | grep multipath
device-mapper-multipath-libs-0.4.9-72.el6.x86_64
device-mapper-multipath-0.4.9-72.el6.x86_64

2. [root@storageqe-71 ~]# mpathconf --enable 
3. [root@storageqe-71 ~]# service multipathd restart
ok
Stopping multipathd daemon: [  OK  ]
Starting multipathd daemon: [  OK  ]

4. [root@storageqe-71 ~]# service multipathd stop
Stopping multipathd daemon: [  OK  ]

5. [root@storageqe-71 ~]# multipath -ll
mpathb (3600140515efaacbb9854dbf91428aa0d) dm-3 LIO-ORG,IBLOCK
size=10G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 1:0:0:1 sdd 8:48 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 0:0:0:1 sdb 8:16 active ready running
mpatha (36001405cca4c176848d4482853c9962c) dm-4 LIO-ORG,IBLOCK
size=50G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 0:0:0:0 sda 8:0  active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 1:0:0:0 sdc 8:32 active ready running
<----------------List multipath devices while multipathd is stopped, multipath doesn't  print a warning message



Verified on device-mapper-multipath-0.4.9-100.el6
1. [root@storageqe-71 ~]# rpm -qa | grep multipath
device-mapper-multipath-debuginfo-0.4.9-100.el6.x86_64
device-mapper-multipath-0.4.9-100.el6.x86_64
device-mapper-multipath-libs-0.4.9-100.el6.x86_64

2. [root@storageqe-71 ~]# mpathconf --enable
3. [root@storageqe-71 ~]# service multipathd restart
ux_socket_connect: No such file or directory
Stopping multipathd daemon: [FAILED]
Starting multipathd daemon: [  OK  ]

4. [root@storageqe-71 ~]# multipath -ll
mpathb (3600140515efaacbb9854dbf91428aa0d) dm-3 LIO-ORG,IBLOCK
size=10G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 0:0:0:1 sdb 8:16 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 1:0:0:1 sdc 8:32 active ready running
mpatha (36001405cca4c176848d4482853c9962c) dm-4 LIO-ORG,IBLOCK
size=50G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 0:0:0:0 sda 8:0  active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 1:0:0:0 sdd 8:48 active ready running

5. [root@storageqe-71 ~]# service multipathd stop
Stopping multipathd daemon: [  OK  ]

6. [root@storageqe-71 ~]# multipath -ll
mpathb (3600140515efaacbb9854dbf91428aa0d) dm-3 LIO-ORG,IBLOCK
size=10G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 0:0:0:1 sdb 8:16 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 1:0:0:1 sdc 8:32 active ready running
mpatha (36001405cca4c176848d4482853c9962c) dm-4 LIO-ORG,IBLOCK
size=50G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 0:0:0:0 sda 8:0  active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 1:0:0:0 sdd 8:48 active ready running

multipath device maps are present, but 'multipathd' service is not running
IO failover/failback will not work without 'multipathd' service running   

<----------------List multipath devices while multipathd is stopped, multipath  prints a warning message now.



Test result: list or create multipath devices while multipathd is stopped.  Multipath should now print a warning message, where before it wouldn't

Comment 14 errata-xmlrpc 2017-03-21 10:49:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0697.html


Note You need to log in before you can comment on or make changes to this bug.