From 4b625774e413a57b3d2b44d1991157346e287199 Mon Sep 17 00:00:00 2001 From: Brian Meagher Date: Mon, 29 Jan 2024 12:31:32 -0800 Subject: [PATCH] When stopping scst turn off cluster_mode in parallel --- scstadmin/init.d/scst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index 9490e1b29..f7dcb3a01 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -269,6 +269,17 @@ stop_scst() { return 1 fi + # Disable iSCSI + if [ -f /sys/kernel/scst_tgt/targets/iscsi/enabled ]; then + echo 0 > /sys/kernel/scst_tgt/targets/iscsi/enabled + fi + + # Turn off any cluster_mode in parallel + for cm in /sys/kernel/scst_tgt/devices/*/cluster_mode ; do + echo 0 > "$cm" & + done + wait + unload_scst }