X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=blobdiff_plain;f=PVE%2FStorage%2FZFSPlugin.pm;h=1fac811aedca36adc55e318e63c38507269a0b0d;hp=f88fe947cb458ed5559802f6a435dcc281f50c79;hb=46c6107eb1a9e2a096a4ba89600788d9bea3c2f4;hpb=a6a3786889c866270e3241426eabf3ad3c857fff diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm index f88fe94..1fac811 100644 --- a/PVE/Storage/ZFSPlugin.pm +++ b/PVE/Storage/ZFSPlugin.pm @@ -12,6 +12,7 @@ use base qw(PVE::Storage::ZFSPoolPlugin); use PVE::Storage::LunCmd::Comstar; use PVE::Storage::LunCmd::Istgt; use PVE::Storage::LunCmd::Iet; +use PVE::Storage::LunCmd::LIO; my @ssh_opts = ('-o', 'BatchMode=yes'); @@ -31,7 +32,7 @@ my $lun_cmds = { my $zfs_unknown_scsi_provider = sub { my ($provider) = @_; - die "$provider: unknown iscsi provider. Available [comstar, istgt, iet]"; + die "$provider: unknown iscsi provider. Available [comstar, istgt, iet, LIO]"; }; my $zfs_get_base = sub { @@ -43,6 +44,8 @@ my $zfs_get_base = sub { return PVE::Storage::LunCmd::Istgt::get_base; } elsif ($scfg->{iscsiprovider} eq 'iet') { return PVE::Storage::LunCmd::Iet::get_base; + } elsif ($scfg->{iscsiprovider} eq 'LIO') { + return PVE::Storage::LunCmd::LIO::get_base; } else { $zfs_unknown_scsi_provider->($scfg->{iscsiprovider}); } @@ -63,6 +66,8 @@ sub zfs_request { $msg = PVE::Storage::LunCmd::Istgt::run_lun_command($scfg, $timeout, $method, @params); } elsif ($scfg->{iscsiprovider} eq 'iet') { $msg = PVE::Storage::LunCmd::Iet::run_lun_command($scfg, $timeout, $method, @params); + } elsif ($scfg->{iscsiprovider} eq 'LIO') { + $msg = PVE::Storage::LunCmd::LIO::run_lun_command($scfg, $timeout, $method, @params); } else { $zfs_unknown_scsi_provider->($scfg->{iscsiprovider}); } @@ -188,6 +193,10 @@ sub properties { description => "host group for comstar views", type => 'string', }, + lio_tpg => { + description => "target portal group for Linux LIO targets", + type => 'string', + }, }; } @@ -204,6 +213,7 @@ sub options { sparse => { optional => 1 }, comstar_hg => { optional => 1 }, comstar_tg => { optional => 1 }, + lio_tpg => { optional => 1 }, content => { optional => 1 }, bwlimit => { optional => 1 }, };