multipathd queue_if_no_path And no_path_retry Explained

If you configure your multipath device to use “no_path_retry N” explicitly you may still see queue_if_no_path in multipath -ll output as a listed feature:

$ multipath -ll
mpathc (3600601608de04200c24aed5886c9b28e) dm-3 DGC ,VRAID 
size=2.0T features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='1 alua' wp=rw

Does it mean the no_path_retry setting was not applied at all? According to multipath.conf man page both, queue_if_no_path and no_path_retry, are identical:

Queue IO if no path is active; identical to the no_path_retry keyword.

But which policy is in use: queue or fail?

Unfortunately, it was not made clear in documentation but if no_path_retry is set to anything but fail, you will see queue_if_no_path in multipath -ll output.

If no_retry_path was set to fail, the output would look like this:

$ multipath -ll 
mpathc (3600601608de04200c24aed5886c9b28e) dm-3 DGC ,VRAID 
size=2.0T features='1 retain_attached_hw_handler' hwhandler='1 alua' wp=rw

This means, that yes, “no_path_retry N” is actually used as a path failure handling policy but queue_if_no_path is displayed instead anyway.

Also, no_path_retry is recommended over queue_if_no_path. Straight from multipath.conf man page:

The usage of queue_if_no_path option can lead to D state processes being hung and not killable in situations where all the paths to the LUN go offline. It is advisable to use the no_path_retry option instead.

If you want to set no_path_retry option explicitly, in an attempt to make sure that failed I/O requests are not queuing up and waiting patiently for a path to come back online, you need to add to your /etc/multipath.conf this:

devices {
 device {
 vendor "DGC" 
 product "VRAID" 
 no_path_retry fail

Obviously, you need to match your vendor and product.

Another way to do the same is to use dmsetup command. Assuming you have three different multipath devices: mpatha, mpathb and mpathc.

$ dmsetup message mpatha 0 "fail_if_no_path" 
$ dmsetup message mpathb 0 "fail_if_no_path" 
$ dmsetup message mpathc 0 "fail_if_no_path"

If you have a compatible device it will be most likely configured automatically by multipathd. If that’s the case your multipath.conf would look not very different from this real-life example:

$ grep -v ^# /etc/multipath.conf                                                                                                                                                                                                  
defaults {
        user_friendly_names yes
        find_multipaths yes
devices {
        device {
                vendor                  "DGC" 
                product                 "VRAID" 
                no_path_retry           fail

blacklist {

To apply your changes just run these commands:

$ multipath -d
$ multipath -v2
$ multipathd reconfigure

To verify the changes, look up runtime configuration and look for no_path_retry:

$ multipathd show config

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s