On Thu, Sep 05, 2013 at 12:47:22AM +0800, 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.
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"
So this is relying on the fact that ip=ibft and rd.iscsi.firmware has
been passed on command line. Is it always the case in first kernel? Can't
I bring up ibft luns from user space later?
If yes, it might be better to always append ip=ibft and rd.iscsi.firmware
to command line option.
Thanks
Vivek