***tech-preview*** "mpath" boot parameter starts multipath in the initrd, enabling usage
multipath executables are included in the initrd when installed to the disk and there's related rhev-hypervisor ks change to include multipath kernel modules. To use this, /dev/mpath/... needs to be specified manually in the Storage Configuration menu, after starting multipath manually from Support Menu->Shell Resolves: rhbz#510691 Signed-off-by: Alan Pevec <[email protected]> Signed-off-by: Michael Burns <[email protected]> --- scripts/ovirt-config-boot | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/scripts/ovirt-config-boot b/scripts/ovirt-config-boot index 7c5943b..342ebd2 100755 --- a/scripts/ovirt-config-boot +++ b/scripts/ovirt-config-boot @@ -109,11 +109,15 @@ ovirt_boot_setup() { fi sed -i '/^\/sbin\/udev.*trigger/ a \ filter=\ +mpath=\ for o in `cat /proc/cmdline` ; do\ case $o in\ filter=*)\ filter=${o#filter=}\ ;;\ + mpath)\ + mpath=1\ + ;;\ esac\ done\ if [ -n "$filter" ]; then\ @@ -124,6 +128,11 @@ fi\ echo SCSI wait for scans\ /sbin/modprobe scsi_wait_scan\ /sbin/modprobe -r scsi_wait_scan\ +if [ -n "$mpath" ]; then\ + modprobe dm_multipath || :\ + multipath -v3\ + dmsetup ls --target multipath --exec "kpartx -a -p p"\ +fi\ set +e\ while true; do\ echo Scanning logical volumes\ @@ -151,6 +160,18 @@ 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 + if [ -e /sbin/multipath.static ]; then + cp /sbin/multipath.static sbin/multipath + cp /sbin/scsi_id sbin/scsi_id + cp /sbin/dmsetup.static sbin/dmsetup + cp /sbin/kpartx.static sbin/kpartx + for M in /sbin/mpath_prio_*.static ; do + cp ${M} $/${M%%.static}; + done + fi + # add udev rules, so we can use /dev/disk/by-id/* in LVM filter rules=etc/udev/rules.d mkdir -p $rules @@ -159,7 +180,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 -type f -o -type l | + find $init_script $scsiwait bin/lvm lib$bit $rules $lud sbin -type f -o -type l | cpio -H newc --quiet -o | gzip -9 | cat $live/$syslinux/initrd0.img - > /boot/initrd0.img @@ -169,6 +190,18 @@ 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)" + # add multipath executables + mkdir -p sbin + if [ -e /sbin/multipath.static ]; then + cp /sbin/multipath.static sbin/multipath + cp /sbin/scsi_id sbin/scsi_id + cp /sbin/dmsetup.static sbin/dmsetup + cp /sbin/kpartx.static sbin/kpartx + for M in /sbin/mpath_prio_*.static ; do + cp ${M} $/${M%%.static}; + done + fi + cat > /boot/grub/grub.conf << EOF default=0 timeout=5 -- 1.6.2.5 _______________________________________________ Ovirt-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/ovirt-devel
