[stgt] [PATCH] add --driver option to use different lld then iscsi.

Tomasz Chmielewski mangoo at wpkg.org
Thu Oct 16 10:55:35 CEST 2008


Doron Shoham schrieb:
> Tomasz Chmielewski wrote:
>> Doron Shoham schrieb:
>>> add --driver option to use different lld then iscsi.
>>> if driver is not  provided the default is iscsi.
>> You can already specify it in the config file, per target, i.e.:
>>
>>
>> <target ...>
>>   driver iscsi
>> </target>
>>
>>
>> or for each target, unless overridden per target (I see it's not
>> documented in targets.conf.example):
>>
>> default-driver iscsi
>> <target ...>
>>   driver fcoe
>> </target>
>>
>>
>> Defaults to iscsi, if not specified.
>>
>>
> 
> Yes, but if for example, you want to use the show command with different driver?

"tgtadm --op show --mode target" shows all type of targets (i.e., iscsi and fcoe).

"tgtadm --lld iscsi --op show --mode target" will also show all targets, even fcoe.


Similarly, "tgtadm --lld fcoe --op show --mode target" will show everything - iscsi 
and fcoe target. So adding --lld is not needed here.


> Right now, you can show only the iscsi targets.

That's incorrect.


> With this patch you will be able to show different drivers targets.

You can do it without the patch.


> Same for delete, offline/online etc...

I don't think it changes anything here.


Furthermore:
- new option was not added to --help
- it doesn't even work:

# ./tgt-admin --driver fcoe --update ALL -v

# Removing target: iqn.2007-02.net.syneticon:superthecus.backup1
tgtadm --lld fcoe --mode target --op delete --tid=2

# Adding target: iqn.2007-02.net.syneticon:superthecus.backup1
tgtadm --lld iscsi --op new --mode target --tid 2 -T iqn.2007-02.net.syneticon:superthecus.backup1


Which comes from:

                                        if (not defined $target_options{"driver"}) {
                                                $target_options{"driver"} = $default_driver;
                                        }
                                        my $driver = $target_options{"driver"};

So even though $driver is set in the command line, it is overridden later.


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