From: Harald Hoyer Date: Tue, 31 Jul 2012 10:37:35 +0000 (+0200) Subject: document rd.retry and change the default value to 30s X-Git-Tag: 023~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cd7c104bdf107ba005ce12f6e9955748caae0ea;p=thirdparty%2Fdracut.git document rd.retry and change the default value to 30s Also start the timeout scripts after 2/3 of the time. --- diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc index 884b22390..e27c1521e 100644 --- a/dracut.cmdline.7.asc +++ b/dracut.cmdline.7.asc @@ -104,6 +104,12 @@ Misc force loading kernel module after all automatic loading modules have been loaded. This parameter can be specified multiple times. +**rd.retry=**__:: + specify how long dracut should wait for devices to appear. + The default is 30 seconds. After 2/3 of the time, degraded raids are force + started and the timer is reset to 0. If you have hardware, which takes a very long + time to announce its drives, you might want to extend this value. + [[dracutkerneldebug]] Debug ~~~~~ diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh index 1ee6be15a..e9da432b0 100755 --- a/modules.d/98systemd/dracut-initqueue.sh +++ b/modules.d/98systemd/dracut-initqueue.sh @@ -13,7 +13,7 @@ source_conf /etc/conf.d getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" RDRETRY=$(getarg rd.retry -d 'rd_retry=') -RDRETRY=${RDRETRY:-20} +RDRETRY=${RDRETRY:-30} RDRETRY=$(($RDRETRY*2)) export RDRETRY @@ -52,7 +52,7 @@ while :; do sleep 0.5 - if [ $main_loop -gt $(($RDRETRY/2)) ]; then + if [ $main_loop -gt $((2*$RDRETRY/3)) ]; then for job in $hookdir/initqueue/timeout/*.sh; do [ -e "$job" ] || break job=$job . $job diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh index c33f1825f..16c8958ca 100755 --- a/modules.d/99base/init.sh +++ b/modules.d/99base/init.sh @@ -146,7 +146,7 @@ udevadm trigger --type=devices --action=add >/dev/null 2>&1 getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" RDRETRY=$(getarg rd.retry -d 'rd_retry=') -RDRETRY=${RDRETRY:-20} +RDRETRY=${RDRETRY:-30} RDRETRY=$(($RDRETRY*2)) export RDRETRY main_loop=0 @@ -183,7 +183,7 @@ while :; do sleep 0.5 - if [ $main_loop -gt $(($RDRETRY/2)) ]; then + if [ $main_loop -gt $((2*$RDRETRY/3)) ]; then for job in $hookdir/initqueue/timeout/*.sh; do [ -e "$job" ] || break job=$job . $job