[stgt] tgt-admin functionality
James Pattinson
james at pattinson.org
Fri Apr 8 10:43:01 CEST 2011
Hi
I've made a small patch against tgt-admin that's hardly worth sharing
but it is useful for me as it adds support for device-type and bs-type.
While browsing the code it seems to be that tgt-admin is currently
limited in that it can only effectively configure 1 LUN per target with
the correct options.
Are there bigger plans for tgt-admin or an alternative way to have
persistent configuration?
Cheers
James
[root at centos ~]# diff old/tgt-1.0.15/scripts/tgt-admin
tgt-1.0.15/scripts/tgt-admin
838c838,844
<
---
>
> my $bs_type = show_target_info($current_target, "bs_type");
> print "\tbs-type $bs_type\n";
>
> my $device_type = show_target_info($current_target,
"device_type");
> print "\tdevice-type $device_type\n";
>
936a943,955
> # Returns Backing store type:
> } elsif ($task eq "bs_type") {
> if ($tgtadm_output{$existing_target} =~ m/Backing store type:
(?!null)(.+)/ ) {
> return $1
> }
> # Returns Backing store LUN type:
> } elsif ($task eq "device_type") {
> if ($tgtadm_output{$existing_target} =~ m/Type:
(?!controller)(.+)/ ) {
> if ($1 eq "passthrough" ) {
> return "pt";
> }
> return $1
> }
--
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