On 10/15/14 at 03:35pm, Minfei Huang wrote:
From: mhuang <mhuang(a)redhat.com>
The device which is exclude by root device, must specify option in
/etc/dasd.conf to make it online on s390x when the machine is booting.
The kdump will fail to generate the vmcore in the 2nd kernel, if
the kdump target is not the root device.
In the initramfs, we will generate the config dasd.conf which contains
all of the online devices by sysfs.
I am trying to reorganize the description as below, just for reference.
The device which is not root device, an option need be specified in
/etc/dasd.conf to make it be online on s390x during the machine is
booting. Othersise if it's specified as kdump target and it's not in
/etc/dasd.conf, it won't be offline in kdump kernel too. Then kdump will
fail to generate vmcore.
In this patch, we need add this device as an option into
/$initdir/etc/dasd.conf. Then this can make that device which is the
kdump target be online in 2nd kernel. With this it can work well.
Thanks
Baoquan
Signed-off-by: mhuang <mhuang(a)redhat.com>
---
dracut-module-setup.sh | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 38801de..48307e6 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -569,6 +569,29 @@ kdump_install_random_seed() {
bs=$poolsize count=1 2> /dev/null
}
+specify_dasd_conf() {
+ local dasd_dev
+ local dasd_conf="${initdir}/etc/dasd.conf"
+
+ [[ -f $dasd_conf ]] || touch $dasd_conf
+
+ for dasd_dev in /sys/block/dasd*
+ do
+ if [ `cat $dasd_dev/device/online` -eq 1 ]; then
+ dasd_dev=$(basename $(readlink $dasd_dev/device))
+ if ! grep -q "$dasd_dev" $dasd_conf 2>/dev/null; then
+ echo $dasd_dev >> $dasd_conf
+ fi
+ fi
+ done
+}
+
+kdump_specify_conf() {
+ if [ "$(uname -m)" = "s390x" ]; then
+ specify_dasd_conf
+ fi
+}
+
install() {
kdump_install_conf
@@ -601,6 +624,8 @@ install() {
# target. Ideally all this should be pushed into dracut iscsi module
# at some point of time.
kdump_check_iscsi_targets
+
+ kdump_specify_conf
}
installkernel() {
--
1.8.3.1
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec