diff --git a/iscsi-client/iscsi-client-lib.pl b/iscsi-client/iscsi-client-lib.pl index 5c299ef90..54b55b111 100644 --- a/iscsi-client/iscsi-client-lib.pl +++ b/iscsi-client/iscsi-client-lib.pl @@ -153,6 +153,12 @@ foreach my $l (@lines) { elsif ($l =~ /iSCSI\s+Session\s+State:\s+(\S+)/) { $conn->{'session'} = $1; } + elsif ($l =~ /scsi(\d+)\s+Channel\s+(\d+)\s+Id\s+(\d+)\s+Lun:\s+(\d+)/) { + $conn->{'scsihost'} = $1; + $conn->{'scsichannel'} = $2; + $conn->{'scsiid'} = $3; + $conn->{'scsilun'} = $4; + } elsif ($l =~ /Attached\s+scsi\s+disk\s+(\S+)/) { $conn->{'device'} = "/dev/$1"; } @@ -161,6 +167,13 @@ foreach my $l (@lines) { $conn->{$1} = $2; } } +foreach my $c (@rv) { + my $dev = "/dev/disk/by-path/ip-$c->{'ip'}:$c->{'port'}-". + "iscsi-$c->{'name'}:$c->{'target'}-lun-$c->{'scsilun'}"; + if (-e $dev) { + $conn->{'longdevice'} = $dev; + } + } return \@rv; } diff --git a/iscsi-client/lang/en b/iscsi-client/lang/en index 94cf087a1..ba1b3c5ff 100644 --- a/iscsi-client/lang/en +++ b/iscsi-client/lang/en @@ -164,6 +164,7 @@ vconn_password_in=Client password vconn_none=None required vconn_device=Local device file vconn_device2=Local device name +vconn_device3=Constant device name vconn_delete=Disconnect Connection vconn_users=Current users vconn_size=Disk size diff --git a/iscsi-client/view_conn.cgi b/iscsi-client/view_conn.cgi index 1d523fee3..89a177c77 100755 --- a/iscsi-client/view_conn.cgi +++ b/iscsi-client/view_conn.cgi @@ -52,6 +52,11 @@ if ($conn->{'device'}) { print &ui_table_row($text{'vconn_device2'}, &mount::device_name($conn->{'device'})); + if ($conn->{'longdevice'}) { + print &ui_table_row($text{'vconn_device3'}, + "$conn->{'longdevice'}"); + } + my @disks = &fdisk::list_disks_partitions(); my ($disk) = grep { $_->{'device'} eq $conn->{'device'} } @disks; if ($disk) {