[stgt] targets.conf problem, setting up tape drives

Tomasz Chmielewski mangoo at wpkg.org
Sun Oct 25 13:14:33 CET 2009


Albert Pauw wrote:
> On 10/25/2009 12:57 PM, Tomasz Chmielewski wrote:
>>
>> I'll look at this one. The problem is, "element_type" and "media_home" 
>> are not yet supported in targets.conf.
>>
>> Could you provide me with a tgtadm line which would use both 
>> "element_type" and "media_home"?
>>
> Do you mean something like this?
> 
> tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 4 
> --params element_type=3,start_address=10,quantity=5,media_home=/root/tapes
> 
> Please note that media_home is not related to the actual element type, 
> in fact my script used an extra tgtadm line to define media_home
> after setting up the element types, but I checked and the line above 
> works fine as well.

So, with your config:

        element_type "1,start_address=1,quantity=1"
        element_type "2,start_address=1000,quantity=24"
        element_type "3,start_address=10,quantity=5"
        element_type "4,address=500,tid=1,lun=1"
        element_type "4,address=500,tid=1,lun=2"
        element_type "4,address=500,tid=1,lun=3"
        media_home "/root/tapes" 

that would translate to:

tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 4 (starting each command,
and then the below --params in each command):

--params element_type "1,start_address=1,quantity=1",media_home=/root/tapes
--params element_type "2,start_address=1000,quantity=24",media_home=/root/tapes
--params element_type "3,start_address=10,quantity=5",media_home=/root/tapes
--params element_type "4,address=500,tid=1,lun=1",media_home=/root/tapes
--params element_type "4,address=500,tid=1,lun=2",media_home=/root/tapes
--params element_type "4,address=500,tid=1,lun=3",media_home=/root/tapes


Is it possible to specify multiple "media_home" parameters or is it one, and only one?

-- 
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