For lvm, multipath, iscsi modules they do not care about the filesystem,
Also there could be devcie in host_devs but it does not get formated.
For these kind of modules, use for_each_host_dev_and_slaves will be better than use
for_each_host_dev_fs, here add a new function to iterate the host_devs and
their slave devices.
In original for_each_host_dev_fs, it will call check_block_and_slaves which
will return once helper function return 0, but this is not enough for kdump
iscsi setup. For kdump iscsi case, it need setup each slave devices so that
the iscsi target can be properly setuped in initramfs.
Thus, this patch also add new functions check_block_and_slaves_all and
for_each_host_dev_and_slaves_all.
Signed-off-by: Dave Young <dyoung@redhat.com>
Tested-by: WANG Chao <chaowang@redhat.com>
A multipath partition's uuid will be presented like:
# cat /sys/dev/block/$_dev/dm/uuid
part1-mpath-360060e801047103004f2c4b300000008
So in this case, change the match regexp from '^mpath-' to 'mpath-'.
Signed-off-by: Chao Wang <chaowang@redhat.com>
Another solution could be searching in directories found at
/etc/ld.so.conf.d/*.conf or adding a new parameter. Here is a patch
which adds a new --libdirs parameter, and also a new inst_libdir_file
function which will try to expand metacharacters on each lib
directory:
inst_libdir_file "libdevmapper-event-lvm*.so"
Use bash "[[ string =~ pattern ]]" instead of "egrep -q".
Replace control-dominated serial fondling
for var in $(proc1); do proc2 var; done
with data-dominated parallel pipeline
proc1 | while read var; do proc2 var; done
Together this is a large savings.
[harald@redhat.com: fixed network kernel module filter]
install /etc/multipath/wwids
With the proper 40-multipath.rules and new udev device-mapper mechanism,
we don't need the multipath scan anymore.
rhbz#595719
If multipath isn't installed, don't use it. If we're in hostonly mode,
only install the multipath module if it's used for / . Otherwise, if
the user was dumb enough to install it, they get it during bootup.
Install all modules that are any of:
- scsi device handler
- dm log handler
- dm path selector
- dm target
It would be nice if we could tell which log handlers and targets are
multipath related, but we really can't.