multipath: simplify and install wwids (rhbz 595719)
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#595719master
parent
ed8c7bf5c2
commit
dcdf5c8801
|
@ -1,9 +0,0 @@
|
||||||
# scan for multipath devices
|
|
||||||
SUBSYSTEM!="block", GOTO="end_mpath_scan"
|
|
||||||
KERNEL!="sd*", GOTO="end_mpath_scan"
|
|
||||||
PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", GOTO="end_mpath_scan"
|
|
||||||
RUN+="/sbin/modprobe dm-multipath"
|
|
||||||
RUN+="/bin/echo 'queuing multipath scan'"
|
|
||||||
RUN+="/sbin/initqueue --settled --onetime --unique --name mpscan /sbin/multipath-scan"
|
|
||||||
RUN+="/bin/sh -c '>/tmp/.multipath-scan-%k;'"
|
|
||||||
LABEL="end_mpath_scan"
|
|
|
@ -1,9 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -f /etc/multipath.conf ]; then
|
|
||||||
inst /etc/multipath.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ldd $(which multipath) 2>/dev/null |grep -q lib64; then
|
if ldd $(which multipath) 2>/dev/null |grep -q lib64; then
|
||||||
LIBDIR="/lib64"
|
LIBDIR="/lib64"
|
||||||
else
|
else
|
||||||
|
@ -19,6 +15,8 @@ for f in \
|
||||||
/sbin/xdrgetuid \
|
/sbin/xdrgetuid \
|
||||||
/sbin/xdrgetprio \
|
/sbin/xdrgetprio \
|
||||||
/etc/xdrdevices.conf \
|
/etc/xdrdevices.conf \
|
||||||
|
/etc/multipath.conf \
|
||||||
|
/etc/multipath/wwids \
|
||||||
$(ls $LIBDIR/libmultipath* $LIBDIR/multipath/* 2>/dev/null) \
|
$(ls $LIBDIR/libmultipath* $LIBDIR/multipath/* 2>/dev/null) \
|
||||||
;do
|
;do
|
||||||
[ -e "$f" ] && inst "$f"
|
[ -e "$f" ] && inst "$f"
|
||||||
|
@ -28,5 +26,3 @@ inst_hook pre-trigger 02 "$moddir/multipathd.sh"
|
||||||
inst_hook pre-pivot 02 "$moddir/multipathd-stop.sh"
|
inst_hook pre-pivot 02 "$moddir/multipathd-stop.sh"
|
||||||
inst_rules 40-multipath.rules
|
inst_rules 40-multipath.rules
|
||||||
|
|
||||||
inst "$moddir/multipath-scan.sh" /sbin/multipath-scan
|
|
||||||
inst_rules "$moddir/9-multipath-scan.rules"
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# scan for multipaths if udev has settled
|
|
||||||
|
|
||||||
. /lib/dracut-lib.sh
|
|
||||||
|
|
||||||
[ -d /etc/multipath ] || mkdir -p /etc/multipath
|
|
||||||
mpdevs=$(
|
|
||||||
for f in /tmp/.multipath-scan-* ; do
|
|
||||||
[ -e "$f" ] || continue
|
|
||||||
echo -n "${f##/tmp/.multipath-scan-} "
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
[ -e /etc/multipath.conf ] || exit 1
|
|
||||||
multipath ${mpdevs}
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -e /etc/multipath.conf ]; then
|
if [ -e /etc/multipath.conf ]; then
|
||||||
|
modprobe dm-multipath
|
||||||
multipathd
|
multipathd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue