On 09/05/13 at 12:47am, WANG Chao wrote:
1st kernel uses ip=ibft and rd.iscsi.firmware to log in ibft lun. In
2nd
kernel, ibft lun can be logged in automatically, because 2nd kernel
inherit 1st kernel cmdline.
Currently kdump will configure netroot=iscsi:xxx if we find iscsi lun
being used. In case of ibft, ip=ibft and rd.iscsi.firmware is enough for
dracut to be aware of, otherwise netroot=iscsi:xxx will only confuse
dracut and fail to log in ibft lun.
So in kdump module, we should avoid handling iscsi lun if ibft.
Hi, Vivek
Could you review this patch? does it make sense?
Signed-off-by: WANG Chao <chaowang(a)redhat.com>
---
dracut-module-setup.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 517099c..252d17a 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -268,6 +268,16 @@ kdump_install_conf() {
rm -f /tmp/$$-kdump.conf
}
+kdump_is_ibft() {
+ local path=$1
+ local tgt_name fw_tgt_name
+
+ tgt_name=$(kdump_iscsi_get_rec_val "$path" "node.name")
+ fw_tgt_name=$(/sbin/iscsiadm -m fw 2>/dev/null | awk '$1 ==
"node.name" {print $3}')
+
+ [ -n "$fw_tgt_name" ] && strstr "$fw_tgt_name"
"$tgt_name"
+}
+
kdump_iscsi_get_rec_val() {
local result
@@ -323,6 +333,11 @@ kdump_setup_iscsi_device() {
return 1
fi
+ if kdump_is_ibft ${path}; then
+ dinfo "${path} is ibft, skip"
+ return 0
+ fi
+
tgt_name=$(kdump_iscsi_get_rec_val ${path} "node.name")
tgt_ipaddr=$(kdump_iscsi_get_rec_val ${path} "node.conn\[0\].address")
--
1.8.3.1
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec