[stgt] Specify controller tid in targets.conf
Tomasz Chmielewski
mangoo at wpkg.org
Fri Jun 17 09:57:28 CEST 2011
On 17.06.2011 08:35, FUJITA Tomonori wrote:
> On Thu, 16 Jun 2011 09:38:30 +0200 (CEST)
> **UNKNOWN CHARSET**<fredrik.aslund at adm.umu.se> wrote:
>
>> On Thu, 16 Jun 2011, frederik.vos at linvirt.nl wrote:
>>
>>> In our VMware environment, we're using the following configuration,
>>> and it works (also with the vmware nmp multipathing method). It's
>>> already possible to specify vendor and scsi_id (the scsi id will
>>> become the T10 address), but you'll have to use the direct-store method
>>>
>>> <target iqn.2004-01.nl.xtg:iscsi-server1>
>>> direct-store /dev/sdb
>>> initiator-address ALL
>>> incominguser xxxx xxxx
>>> scsi_id 00010001
>>> vendor_id XTG
>>> lun 12
>>> </target>
>>>
>> I believe this may still result in several tgt servers running with the
>> same scsi id and scsi sn.
>
> I'm not against having this feature. But I think that tgt-admin should
> enable admins to configure scsi_id and vendor_id. Why it doesn't?
It does: the above config would generate the following commands (assuming /dev/sdb is a WD disk):
# Adding target: iqn.2004-01.nl.xtg:iscsi-server1
tgtadm -C 0 --lld iscsi --op new --mode target --tid 1 -T iqn.2004-01.nl.xtg:iscsi-server1
tgtadm -C 0 --lld iscsi --op new --mode logicalunit --tid 1 --lun 12 -b /dev/sdb
tgtadm -C 0 --lld iscsi --op update --mode logicalunit --tid 1 --lun=12 --params scsi_id="00010001"
tgtadm -C 0 --lld iscsi --op update --mode logicalunit --tid 1 --lun=12 --params vendor_id="XTG"
tgtadm -C 0 --lld iscsi --op update --mode logicalunit --tid 1 --lun=12 --params product_id="WDC WD10EADS-00M"
tgtadm -C 0 --lld iscsi --op update --mode logicalunit --tid 1 --lun=12 --params product_rev="01.0"
tgtadm -C 0 --lld iscsi --op update --mode logicalunit --tid 1 --lun=12 --params scsi_sn="WD-WMAV50144868"
# Write cache is enabled (default) for lun 12.
tgtadm -C 0 --lld iscsi --mode account --op delete --user=xxxx
tgtadm -C 0 --lld iscsi --mode account --op new --user=xxxx --password=xxxx
tgtadm -C 0 --lld iscsi --mode account --op bind --tid=1 --user=xxxx
tgtadm -C 0 --lld iscsi --op bind --mode target --tid 1 -I ALL
--
Tomasz Chmielewski
http://wpkg.org
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list