On Wed, Oct 15, 2014 at 03:35:22PM +0800, Minfei Huang wrote:
From: mhuang <mhuang(a)redhat.com>
The device which is exclude by root device, must specify option in
You mean "A dasd device which is not root device"?
/etc/dasd.conf to make it online on s390x when the machine is
booting.
So some service goes through /etc/dasd.conf and brings everything
mentioned there online? Which service is that?
The kdump will fail to generate the vmcore in the 2nd kernel, if
the kdump target is not the root device.
You can add more context here.
"If some device is not part of /etc/dasd.conf, then it will not be
brought up in second kernel and hence saving dump to that device
wil fail".
In the initramfs, we will generate the config dasd.conf which contains
all of the online devices by sysfs.
Why are we putting all dasd devices in $initramfs/etc/dasd.conf. Shouldn't
we only add those devices which fall in dump path. System might have
many other dasd devices and we don't want to bring these up. These
will just add to extra memory usage.
Thanks
Vivek
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