tgt-admin functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux