Some users may try to stop openibd while open-iscsi over iSER is
running. When stopping openibd, the script should check if there
are open-iscsi sessions that use the iSER transport and ask the
user to logout from these sessions before shutting down openibd.
Signed-off-by: Erez Zilber <[EMAIL PROTECTED]>
---
ofed_scripts/openibd | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index 4e317a7..0e1325d 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -1190,6 +1190,19 @@ stop()
fi
done
+ # Check if open-iscsi is running and if there are open iSER sessions
+ if [ $(pidof iscsid | wc -w) -gt 0 ]; then
+ iser_session_cnt=$(iscsiadm -m session 2>&1 | grep -c "^iser")
+
+ if [ $iser_session_cnt -gt 0 ]; then
+ echo
+ echo "Please logout from all open-iscsi over iSER
sessions"
+ echo "Then run \"$0 $ACTION\""
+ echo
+ exit 1
+ fi
+ fi
+
# Stop Gen1 modules if they are UP after uninstall
if is_module ib_tavor; then
stop_gen1
--
1.5.4.4
_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg