Wait for all DASDs to be online after autodetection (#558881).
When a user boots with cio_ignore=all,!0.0.0009 on s390x, it tells the
kernel to only bring device 0.0.0009 online before booting. Device
0.0.0009 is the 3270 console. The idea behind cio_ignore is to prevent
long bootups when the kernel will see thousands of devices and have to
bring up each one and gather stats. With cio_ignore, you get in to
Linux faster and then specifically enable the devices you want.
We support this in anaconda via linuxrc.s390. Your CMS conf file can
specify the devices or device ranges to use during installation. If you
don't specify that information, linuxrc.s390 prompts you. If you don't
know what information to provide, you can just press Enter and the
entire system is scanned.
When a DASD scan happens and each one is brought online, make sure we
wait until the devices enter the 'active' or 'unformatted' states. The
other states indicate we should continue waiting for the device to come
up.
---
loader/linuxrc.s390 | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
+function dasd_settle_all() {
+ for dasdccw in $(cut -d '(' -f 1 /proc/dasd/devices) ; do
+ if ! dasd_settle $dasdccw ; then
+ echo $"Could not access DASD $dasdccw in time"
+ return 0
+ fi
+ done
+ return 1
+}
+
function startinetd()
{
echo
@@ -2519,6 +2529,7 @@ function parse_dasd() {
done < <(echo $DASD | sed 's/,/
/g')
if [ "$handle" = "yes" ]; then
udevadm settle
+ dasd_settle_all || return 0
echo $"Activated DASDs:"
cat /proc/dasd/devices | sed -e 's/ at ([^)]*) is//' -e 's/ at/,/'
fi
@@ -2713,6 +2724,7 @@ function final_check() {
fi
;;
d) # show active DASDs with some useful details
+ dasd_settle_all || return 0
echo $"Activated DASDs:"
cat /proc/dasd/devices|sed -e 's/ at ([^)]*) is//' -e 's/ at/,/'
;;
--
1.6.6
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
02-11-2010, 09:14 AM
Hans de Goede
Wait for all DASDs to be online after autodetection (#558881).
Ack.
On 02/10/2010 11:14 PM, David Cantrell wrote:
When a user boots with cio_ignore=all,!0.0.0009 on s390x, it tells the
kernel to only bring device 0.0.0009 online before booting. Device
0.0.0009 is the 3270 console. The idea behind cio_ignore is to prevent
long bootups when the kernel will see thousands of devices and have to
bring up each one and gather stats. With cio_ignore, you get in to
Linux faster and then specifically enable the devices you want.
We support this in anaconda via linuxrc.s390. Your CMS conf file can
specify the devices or device ranges to use during installation. If you
don't specify that information, linuxrc.s390 prompts you. If you don't
know what information to provide, you can just press Enter and the
entire system is scanned.
When a DASD scan happens and each one is brought online, make sure we
wait until the devices enter the 'active' or 'unformatted' states. The
other states indicate we should continue waiting for the device to come
up.
---
loader/linuxrc.s390 | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
+function dasd_settle_all() {
+ for dasdccw in $(cut -d '(' -f 1 /proc/dasd/devices) ; do
+ if ! dasd_settle $dasdccw ; then
+ echo $"Could not access DASD $dasdccw in time"
+ return 0
+ fi
+ done
+ return 1
+}
+
function startinetd()
{
echo
@@ -2519,6 +2529,7 @@ function parse_dasd() {
done< <(echo $DASD | sed 's/,/
/g')
if [ "$handle" = "yes" ]; then
udevadm settle
+ dasd_settle_all || return 0
echo $"Activated DASDs:"
cat /proc/dasd/devices | sed -e 's/ at ([^)]*) is//' -e 's/ at/,/'
fi
@@ -2713,6 +2724,7 @@ function final_check() {
fi
;;
d) # show active DASDs with some useful details
+ dasd_settle_all || return 0
echo $"Activated DASDs:"
cat /proc/dasd/devices|sed -e 's/ at ([^)]*) is//' -e 's/ at/,/'
;;
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
02-11-2010, 08:37 PM
Steffen Maier
Wait for all DASDs to be online after autodetection (#558881).
On 02/10/2010 11:14 PM, David Cantrell wrote:
> When a user boots with cio_ignore=all,!0.0.0009 on s390x, it tells the
> kernel to only bring device 0.0.0009 online before booting.
Please don't mix up cio_ignore and onlining. These are two different
things. cio_ignore hides devices from the ccw bus so they won't appear
in sysfs and not allocate kernel object memory. Only devices not ignored
may then be set online to activate (probe and provide real device
objects) or offline to deactivate again.
> When a DASD scan happens and each one is brought online, make sure we
> wait until the devices enter the 'active' or 'unformatted' states. The
> other states indicate we should continue waiting for the device to come
> up.
Did you test this with cio_ignore=all,!0.0.0009 and not using the
workarounds I described for Jan in bug 558881 comment 6?
It seems to me as if we're still missing the part to wait for cio_ignore
to finish, i.e. the usage of dasd_cio_free. I fear we might see one of
the following linuxrc messages without explicitly waiting:
"DASD $devbusid does not provide attribute $attr"
"DASD $devbusid not found"
Only after that we can start setting DASDs online. And that also happens
asynchronously which is the reason of dasd_settle, namely to wait until
the device is fully online.
What's inside this patch seems to only care for the latter, i.e. bug
558881 comment 8.
Nice. I like the use of this to go over all DASDs without having to
refactor parse_dasd.
> + if ! dasd_settle $dasdccw ; then
> + echo $"Could not access DASD $dasdccw in time"
> + return 0
errorlevel != 0 means error case:
return 1
> + fi
> + done
> + return 1
errorlevel 0 means successful case:
return 0
> +}
> +
> function startinetd()
> {
> echo
> @@ -2519,6 +2529,7 @@ function parse_dasd() {
> done < <(echo $DASD | sed 's/,/
/g')
> if [ "$handle" = "yes" ]; then
> udevadm settle
> + dasd_settle_all || return 0
dasd_settle_all || return 1
> echo $"Activated DASDs:"
> cat /proc/dasd/devices | sed -e 's/ at ([^)]*) is//' -e 's/ at/,/'
> fi
> @@ -2713,6 +2724,7 @@ function final_check() {
> fi
> ;;
> d) # show active DASDs with some useful details
> + dasd_settle_all || return 0
Since this really only shows the current state, it should not paper over
possibly missed dasd_settle at the places where they are actually set
online. I would like to remove this added line here.
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list