default config for HP MSA2[02]12fc|MSA2012i uses prio_callout /bin/true
add multipath.conf if present, if not defaults are used (empty config file)
use /dev/mapper/* in filter to avoid waiting for udev to create /dev/mpath/*

Related: rhbz#510691

Signed-off-by: Michael Burns <[email protected]>
---
 scripts/ovirt-config-boot |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/scripts/ovirt-config-boot b/scripts/ovirt-config-boot
index 342ebd2..36fdf41 100755
--- a/scripts/ovirt-config-boot
+++ b/scripts/ovirt-config-boot
@@ -147,7 +147,7 @@ set -e\
 ' $init_script
     # fix emergency shell
     sed -i 's/^    bash$/    bash < \/dev\/console/' $init_script
-    mkdir -p bin
+    mkdir -p bin etc sbin
     bit=
     if [ -e /lib64 ]; then
         bit=64
@@ -160,8 +160,7 @@ set -e\
         # lvm is not static in Fedora
         cp /lib$bit/libreadline.so.5 /lib$bit/libncurses.so.5 lib$bit
     fi
-    # add multipath executables
-    mkdir -p sbin
+    # add multipath executables and config
     if [ -e /sbin/multipath.static ]; then
         cp /sbin/multipath.static sbin/multipath
         cp /sbin/scsi_id sbin/scsi_id
@@ -170,6 +169,15 @@ set -e\
         for M in /sbin/mpath_prio_*.static ; do
             cp ${M} $/${M%%.static};
         done
+        # default config for HP MSA2[02]12fc|MSA2012i
+        # prio_callout /bin/true
+        cp /bin/true bin
+        if [ -f /etc/multipath.conf ]; then
+            cp /etc/multipath.conf etc
+        else
+            # defualt config
+            touch etc/multipath.conf
+        fi
     fi

     # add udev rules, so we can use /dev/disk/by-id/* in LVM filter
@@ -180,7 +188,7 @@ set -e\
     mkdir -p $lud
     cp -pv /$lud/ata_id /$lud/scsi_id /$lud/usb_id $lud
     ln -s /sbin/modprobe $lud
-    find $init_script $scsiwait bin/lvm lib$bit $rules $lud sbin -type f -o 
-type l |
+    find $init_script $scsiwait lib$bit $lud bin etc sbin -type f -o -type l |
         cpio -H newc --quiet -o |
         gzip -9 |
         cat $live/$syslinux/initrd0.img - > /boot/initrd0.img
@@ -190,6 +198,13 @@ set -e\
     # reorder tty0 to allow both serial and phys console after installation
     bootparams="ro root=/dev/HostVG/Root roottypefs=ext3 console=tty0 \
                 $(echo $bootparams | sed s/console=tty0//g)"
+    # append mpath and filter if selected disk is /dev/mpath/*
+    if [[ "$disk" =~ "^/dev/mpath/" ]]; then
+        # convert to /dev/mapper/* which is created directly by device-mapper
+        # to avoid waiting for udev
+        mpath_id=${disk#/dev/mpath/}
+        bootparams="$bootparams mpath filter=/dev/mapper/$mpath_id"
+    fi
     # add multipath executables
     mkdir -p sbin
     if [ -e /sbin/multipath.static ]; then
-- 
1.6.2.5

_______________________________________________
Ovirt-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ovirt-devel

Reply via email to