[Bug 927540] Re: multipath ignores blacklist in multipath.conf

Peter Petrakis peter.petrakis at canonical.com
Mon Jul 9 14:24:44 UTC 2012


multipath supports POSIX regexp: libmultipath/regex.c so you do need
the "." to inform the wildcard what it's matching against e.g. (1+ more characters).

There are also examples in the multipath.conf.defaults file that provide examples
of regexp like:

#       device {
#               vendor                  "HP"
#               product                 "LOGICAL VOLUME.*"
#               getuid_callout          "/lib/udev/scsi_id --whitelisted --device=/dev/%n"

and

#       device {
#               vendor                  "DGC"
#               product                 ".*"
#               product_blacklist       "LUNZ"

If you want to wildcard an entire field, leaving out the dot works, but when you
start matching within strings, you need to specify what it is you're matching.

#blacklist {
#       devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
#       devnode "^hd[a-z]"
#       devnode "^dcssblk[0-9]*"
#}

You could try a dramatically simplified multipath.conf like this:

blacklist {
  device {
        vendor  "*"
        product "*"
  }
}

blacklist_exceptions {
  device {
    vendor  "NETAPP"
    product "LUN"
  }
}

The continue configuring your SAN under a new devices{ device {} } section.
In my case I just take the defaults. to prove to yourself that this works,
stop multipath server, flush all paths (multipath -F), and then change
the config file to include only the blacklist (exclude everything), run
multipath -v4 and observe.

===== paths list =====
uuid                              hcil    dev dev_t pri dm_st chk_st vend/prod
3600508b1001cb2fce7d75a0d5bee1ea1 3:0:0:1 sda 8:0   1   undef faulty HP,LOGICA
360a98000534b504d6834654d53793373 2:0:0:0 sdb 8:16  4   undef ready  NETAPP,LU
360a98000534b504d6834654d53793373 5:0:0:0 sdc 8:32  4   undef ready  NETAPP,LU
360a98000534b504d6834654d53793373 2:0:1:0 sdd 8:48  1   undef ready  NETAPP,LU
360a98000534b504d6834654d53793373 5:0:1:0 sde 8:64  1   undef ready  NETAPP,LU
Jul 09 15:16:07 | sda: (HP:LOGICAL VOLUME) vendor/product blacklisted
Jul 09 15:16:07 | sdb: (NETAPP:LUN) vendor/product blacklisted
Jul 09 15:16:07 | sdc: (NETAPP:LUN) vendor/product blacklisted
Jul 09 15:16:07 | sdd: (NETAPP:LUN) vendor/product blacklisted
Jul 09 15:16:07 | sde: (NETAPP:LUN) vendor/product blacklisted

root at nashira:~# lsscsi 
[0:0:0:0]    cd/dvd  hp       DVD A  DS8A5LH   1HE3  /dev/sr0
[2:0:0:0]    disk    NETAPP   LUN              8020  /dev/sdb
[2:0:1:0]    disk    NETAPP   LUN              8020  /dev/sdd
[3:0:0:0]    storage HP       P410i            3.66  -       
[3:0:0:1]    disk    HP       LOGICAL VOLUME   3.66  /dev/sda
[5:0:0:0]    disk    NETAPP   LUN              8020  /dev/sdc
[5:0:1:0]    disk    NETAPP   LUN              8020  /dev/sde

So it indeed blacklisted everything. and multipath -ll produces nothing.
Once I add my SAN to the blacklist exception block everything functions
as expected.

create: 360a98000534b504d6834654d53793373 undef NETAPP,LUN
size=16G features='1 queue_if_no_path' hwhandler='0' wp=undef
|-+- policy='round-robin 0' prio=4 status=undef
| |- 2:0:0:0 sdb 8:16 undef ready  running
| `- 5:0:0:0 sdc 8:32 undef ready  running
`-+- policy='round-robin 0' prio=1 status=undef
  |- 2:0:1:0 sdd 8:48 undef ready  running
  `- 5:0:1:0 sde 8:64 undef ready  running

root at nashira:~# multipath -ll
Error: : Inappropriate ioctl for device
cciss TUR  failed in CCISS_GETLUNINFO: Inappropriate ioctl for device
360a98000534b504d6834654d53793373 dm-0 NETAPP,LUN
size=16G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=4 status=active
| |- 2:0:0:0 sdb 8:16 active ready  running
| `- 5:0:0:0 sdc 8:32 active ready  running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 2:0:1:0 sdd 8:48 active ready  running
  `- 5:0:1:0 sde 8:64 active ready  running


** Changed in: multipath-tools (Ubuntu)
       Status: Confirmed => Incomplete

** Changed in: multipath-tools (Ubuntu)
     Assignee: (unassigned) => Peter Petrakis (peter-petrakis)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/927540

Title:
  multipath ignores blacklist in multipath.conf

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/927540/+subscriptions



More information about the Ubuntu-server-bugs mailing list