[stgt] Specify controller tid in targets.conf
Fredrik Åslund
fredrik.aslund at adm.umu.se
Wed Jun 15 16:53:16 CEST 2011
Is there a way to specify the tid of a target controller in targets.conf?
By default, tid 1 is used by tgt-admin. This means that all instances of
tgtd at different servers will have the same SCSI ID (and SCSI SN),
confusing iSCSI initiators (as VMware).
This patch will allow targets.conf to include:
--
<target iqn.2011-06.com.example:storage1>
backing-store /dev/system/iscsi_storage1
scsi_id storage1_
scsi_sn storage1_
controller_tid 11
</target>
--
--- /usr/sbin/tgt-admin 2010-08-27 00:58:10.000000000 +0200
+++ tgt-admin 2011-06-15 16:50:28.000000000 +0200
@@ -283,6 +283,10 @@
$target_options_ref = \%target_options;
$data_key = make_key($target_options_ref, "lun", "allow-in-use");
}
+
+ if (defined $target_options{"controller_tid"}) {
+ $next_tid = $target_options{"controller_tid"};
+ }
if (not defined $target_options{"driver"}) {
$target_options{"driver"} = $default_driver;
Is there a better way to accomplish this?
/Fredrik
Fredrik Åslund
----------------------------------
Systemadministratör
IT-stöd och systemutveckling (ITS)
Umeå universitet
901 87 Umeå
----------------------------------
Telefon: +46 (0)90 786 65 43
Mobil: +46 (0)70 303 78 36
----------------------------------
fredrik.aslund at adm.umu.se
www.its.umu.se
More information about the stgt
mailing list