From 5e32aea95741a07d53153c658a0572588eae494d Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Tue, 21 Feb 2017 20:01:39 +0100 Subject: Allow disabling auto LUN scans Existing behavior of auto scanning LUNs is problematic for some deployments, particularly in cases where we are: - Accessing different LUNs from the same target on different machines and we don't want the other LUNs automatically exposed in other systems. - LUNs are constantly being created and removed from the target by another machine and we don't want our systems polluted by no longer available logical units, since default udev rules don't remove them automatically from the system once they have been added automatically. This is a little more problematic when working with multipaths as we end up with a lot of leftover device maps. This patch introduces a new configuration option at the session level called "scan", with "auto" and "manual" as acceptable values, that allows us to disable the autoscan in the following cases: - On iscsid start - On login - On AEN/AER messages reporting LUNs data has changed. For HW drivers all sessions will use the value defined in the configuration file. Default value for this new option is "auto" to maintain existing behavior. --- etc/iscsid.conf | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'etc') diff --git a/etc/iscsid.conf b/etc/iscsid.conf index f7ecb6b..cb77a77 100644 --- a/etc/iscsid.conf +++ b/etc/iscsid.conf @@ -305,3 +305,11 @@ node.session.iscsi.FastAbort = Yes # a task management function like an ABORT TASK or LOGICAL UNIT RESET, that # it continue to respond to R2Ts. To enable this uncomment this line # node.session.iscsi.FastAbort = No + +# To prevent doing automatic scans that would add unwanted luns to the system +# we can disable them and have sessions only do manually requested scans. +# Automatic scans are performed on startup, on login, and on AEN/AER reception +# on devices supporting it. For HW drivers all sessions will use the value +# defined in the configuration file. This configuration option is independent +# of scsi_mod scan parameter. (The default behavior is auto): +node.session.scan = auto -- cgit v1.2.1