Description of problem: When anaconda sets up multipath for an mpath installation it does not comment out the following lines in multipath.conf: # Blacklist all devices by default. Remove this to enable multipathing # on the default devices. blacklist { devnode "*" } Without this change, all devices are blacklisted from multipath scanning. This means that even if the initramfs manages to bring up the root multipath device, non-root multipaths will not be started automatically. Version-Release number of selected component (if applicable): anaconda-11.1.2.36 How reproducible: 100% Steps to Reproduce: 1. Install a multipath system using "linux mpath" 2. Create some root & non-root multipath volumes 3. Reboot Actual results: Multipath devices do not start due to blacklisting in multipath.conf Expected results: All multipath devices start correctly on boot Additional info: This problem did not affect the RHEL5 GA multipath boot as this ignored multipath.conf settings for all mpaths discovered at mkinitrd time. This will not work with the support planned for 5.1.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Bryn, Does anaconda handle writing out the multipath.conf file now, is it the device-mapper tools? I can't find anything in the anaconda source that does this.
It's installed by the device-mapper-multipath RPM - to date the policy has been to leave the blacklisting in place and the daemon disabled on package installation, forcing the user to manually configure it. Adding Ben to the CC as he's the device-mapper-multipath maintainer & can probably comment on this better than I can.
As far as I can tell, anaconda leaves doesn't do anything to the /etc/multipath.conf file. It is exactly as the rpm installs it. Like Bryn said, the way the multipath package works, when you install it, it blacklists all devices, otherwise you could suddenly see your devices get multipathed (even devices with only one path). However when you are running root on it, you obviously want those devices included. The biggest problem with not fixing this is that multipathd uses the config file to determine which devices to monitor, so even if you have your multipathed devices, once a path group goes down, it will not be restored.
I think for 5.1, the better solution to this problem is to have anaconda modify and/or write out a new multipath.conf file. Anaconda knows if it has set up a system with or without multipath devices. On systems with multipath devices, we can disable that blacklist. Putting that knowledge in to a RPM postinstall scriptlet seems wrong. Thanks for the info.
Created attachment 156913 [details] anaconda-243527.patch Patch to backend.py in anaconda to comment out the blacklist {} block in /etc/multipath.conf. I'm only doing this is flags.mpath is true in anaconda, which indicates that we have set up a system with multipath devices.
Tried multipath-root installation with anaconda-11.1.2.37-2.MP.ia64.rpm. Un-blacklisting all devices doesn't work fine. As a result, we could get multipath maps for non-multipathed device. E.g., # dmsetup ls --tree SSEAGATE_ST373207LC_3KT2EX6H00007550JXE6p2 (253:22) └─SSEAGATE_ST373207LC_3KT2EX6H00007550JXE6 (253:20) └─ (65:224) We need to blacklist all but the devices used in installation. Ben, is it possible to use blacklist_exception entry in multipath.conf for this purpose? Also, the generated multipath.conf seems lacking newlines in some places. E.g., #blacklist {# devnode "*" #} and defaults { user_friendly_names yes}##
Created attachment 157127 [details] anaconda-243527.patch Modified blacklist patch. I decided to modify the patch to blacklist the non-mpath devices explicitly. The blacklist_exception method won't work if you also blacklist by devnode, or something like that. Adding blacklist lines for the non-mpath devices is easy enough in anaconda. The newline stuff is a little messed up, but I'm concerned more with functionality right now. This patch will go in the next anaconda build in dist-5E-multipath.
There is a way to blacklist with the blacklist_exceptions method. The issue is that exceptions only work against a blacklist rule of the same class that they are. I know that this is annoying, and multipath really needs a whitelist option, but you can work with it. To only allow one device, I use something like this blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^hd[a-z]" devnode "^cciss!c[0-9]d[0-9]*" wwid "*" } blacklist_exceptions { wwid "3600d0230000000000e13955cc3757804" } You need to blacklist all the types of devices that you can't be multipathed at all by devnode, because multipath has no way to get an wwid for most of them. The first three lines of my blacklist is just the default multipath blacklist, which excludes all non-multipathable devices. The next line blacklists all wwids. The result is that all devices are blacklisted, but the multipathable devices are all blacklisted by wwid, so you can just add wwid exceptions. The blacklist lines will always be the same, you just need to add exceptions for the wwids that you want multipathed. This has the benefit that if a customer adds new storage, it won't get multipathed by default.
oops. We're adding cciss device support in RHEL5.1, so the blacklist should actually look like this blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^hd[a-z]" wwid "*" }
Moving state to modified. Anaconda now changes the blacklist block to be the one mentioned in comment #12 and then adds the mpath WWIDs it finds in the bindings file to the blacklist_exception block.
Looking at bz# 185852, Comment #56, it appears that that the blacklist is still not correct, it probably should be blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^(hd|xvd)[a-z]*" wwid "*" } To blacklist xenblk devices.
(In reply to comment #14) > Looking at bz# 185852, Comment #56, it appears that that the blacklist is still > not correct, it probably should be > > blacklist { > devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" > devnode "^(hd|xvd)[a-z]*" > wwid "*" > } > > To blacklist xenblk devices. Thanks, updated anaconda in RHEL-5 with this change.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0644.html