From: Harald Hoyer Date: Fri, 5 Aug 2011 11:05:21 +0000 (+0200) Subject: 90lvm/lvm_scan.sh: use "--partial" to force assembly incomplete VGs X-Git-Tag: 012~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e23f46e86f804b91fc77588307ded896aecfee7e;p=platform%2Fupstream%2Fdracut.git 90lvm/lvm_scan.sh: use "--partial" to force assembly incomplete VGs If our internal loop counter is bigger than half of the maximum count, try to assemble lvm device partially with the "--partial" option. https://bugzilla.redhat.com/show_bug.cgi?id=723548 --- diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules index b2af3120..487d08ac 100644 --- a/modules.d/90lvm/64-lvm.rules +++ b/modules.d/90lvm/64-lvm.rules @@ -13,6 +13,7 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && GOTO="lvm_end" RUN+="/sbin/initqueue --settled --onetime --unique /sbin/lvm_scan" +RUN+="/sbin/initqueue --timeout --onetime --unique /sbin/lvm_scan --partial" RUN+="/bin/sh -c '>/tmp/.lvm_scan-%k;'" LABEL="lvm_end" diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh index 96ec4f80..3c0094e5 100755 --- a/modules.d/90lvm/lvm_scan.sh +++ b/modules.d/90lvm/lvm_scan.sh @@ -4,6 +4,7 @@ # run lvm scan if udev has settled +extraargs="$@" type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh VGS=$(getargs rd.lvm.vg rd_LVM_VG=) @@ -71,8 +72,11 @@ sub=${sub%%\(*}; check_lvm_ver 2 2 57 $maj $min $sub && \ nopoll="--poll n" -check_lvm_ver 2 2 65 $maj $min $sub && \ - sysinit=" --sysinit " +if check_lvm_ver 2 2 65 $maj $min $sub; then + sysinit=" --sysinit $extraargs" +fi + +unset extraargs export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1