Lots of people complain that iSCSI disk will be brought up with software iSCSI mode in kdump kernel, although this disk works with iBFT mode previously in 1st kernel. In addition, kdump kernel can boot from the disk which is brought up by software iSCSI, this may be different with 1st kernel.
To make it be consistent with 1st kernel, we should use iBFT mode to bring iSCSI disk up, instead of software iSCSI.
There is a difference between iBFT and software iSCSI, the value of node.discovery_type. The value of discovery_type for iBFT is fw, and software iSCSI is send_targets.
It is safe to return immediately from kdump_setup_iscsi_device, if iBFT mode is detected, since dracut can take care of iBFT.
Signed-off-by: Minfei Huang mhuang@redhat.com --- dracut-module-setup.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 4cd7107..0a59a91 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -494,7 +494,11 @@ kdump_get_iscsi_initiator() { return 1 }
-# No ibft handling yet. +# Figure out iBFT session according to session type +is_ibft() { + [ "$(kdump_iscsi_get_rec_val $1 "node.discovery_type")" = fw ] +} + kdump_setup_iscsi_device() { local path=$1 local tgt_name; local tgt_ipaddr; @@ -517,6 +521,10 @@ kdump_setup_iscsi_device() { return 1 fi
+ if is_ibft ${path}; then + return + fi + tgt_name=$(kdump_iscsi_get_rec_val ${path} "node.name") tgt_ipaddr=$(kdump_iscsi_get_rec_val ${path} "node.conn[0].address")