From 63d086c9cb84b881e13ce8a5b4ddb80234948258 Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Tue, 3 Feb 2015 16:28:15 -0800 Subject: iscsid safe session logout Implement a safe logout option, which uses libmount from util-linux to check for active mounts (and swaps) over devices, their partitions, and any holders (like LVM and multipath device maps). When enabled iscsid will refuse to logout of sessions actively being used for mounts, returning a status of EBUSY to the ipc request. I've made it a configuration option (iscsid.safe_logout) that defaults to "No" to preserve the existing behavior as the default, while making it available for users that prefer a safety check. This does add a new dependency on libmount. Signed-off-by: Chris Leech --- etc/iscsid.conf | 3 +++ 1 file changed, 3 insertions(+) (limited to 'etc') diff --git a/etc/iscsid.conf b/etc/iscsid.conf index ef76dc0..6d9a5c0 100644 --- a/etc/iscsid.conf +++ b/etc/iscsid.conf @@ -22,6 +22,9 @@ # Default for upstream open-iscsi scripts (uncomment to activate). iscsid.startup = /sbin/iscsid +# Check for active mounts on devices reachable through a session +# and refuse to logout if there are any. Defaults to "No". +# iscsid.safe_logout = Yes ############################# # NIC/HBA and driver settings -- cgit v1.2.1