[Stgt-devel] [RFC] target configuration tool?

Tomasz Chmielewski mangoo
Thu Mar 13 11:05:54 CET 2008


Right now, to add a new target at least three commands have to be started:

tgtadm --lld iscsi --op new --mode target --tid 1 -T 
iqn.2006-08.com.example:san.target
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b 
/dev/san/target
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL


It is cumbersome with more targets - there is a lot of error prone 
typing here (tgtadm syntax), tid has to be incremented each time etc.


Are there any configuration tools for tgtd?

If not, I'd like to propose a config tool written in perl, which would 
parse a config file similar to the one below:

include /etc/stgt/xen/*.conf
include /etc/stgt/vmware/*.conf
include /etc/stgt/temp/*.conf
 

<target iqn.2007-04.com.example:san.monitoring>
backing-store /dev/san/monitoring
</target>

<target iqn.2007-02.com.example:san.xen1>
backing-store /dev/san/xen1
</target>



Right now, it would only support:
- adding targets, since removing connected targets is not yet supported,
- targetname,
- backing store,
- several separate config files (include /some/config/file.conf).


Adding other config parameters (lun, initiator address etc.) could be 
easily added later.


Comments (other than "there is such a tool already", which would be just 
great)?


-- 
Tomasz Chmielewski
http://wpkg.org



More information about the stgt mailing list