summaryrefslogtreecommitdiff
path: root/usr/iscsiadm.c
diff options
context:
space:
mode:
authorGorka Eguileor <geguileo@redhat.com>2017-02-21 20:01:39 +0100
committerGorka Eguileor <geguileo@redhat.com>2017-02-21 20:07:08 +0100
commit5e32aea95741a07d53153c658a0572588eae494d (patch)
tree3ca897de51ddcf1b8c2e5fb8211b70e94341ed1c /usr/iscsiadm.c
parent86e88927d1ffbadff37f5d2137e5c73c50845843 (diff)
downloadopen-iscsi-5e32aea95741a07d53153c658a0572588eae494d.tar.gz
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.
Diffstat (limited to 'usr/iscsiadm.c')
-rw-r--r--usr/iscsiadm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 4b2bd34..90e2828 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -773,7 +773,7 @@ static int rescan_portal(void *data, struct session_info *info)
iscsi_sysfs_for_each_device(NULL, host_no, info->sid,
iscsi_sysfs_rescan_device);
/* now scan for new devices */
- iscsi_sysfs_scan_host(host_no, 0);
+ iscsi_sysfs_scan_host(host_no, 0, 1);
return 0;
}