Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I do

localhost:~# iscsiadm -m discovery -t st -p 192.168.0.4
192.168.0.4:3260,1 iqn.2004-04.com.qnap:ts-509:iscsi.linux02.ba4731
192.168.0.4:3260,1 iqn.2004-04.com.qnap:ts-509:iscsi.linux01.ba4731
192.168.0.4:3260,1 iqn.2004-04.com.qnap:ts-509:iscsi.linux03.ba4731
localhost:~# 

I see the available targets, but how do I see which or what target is actually connected on my CentOS5 server?

Edit:

Can can of course do this, but can't a program like iscsiadm tell me it instead?

localhost:~# ls /dev/disk/by-path/
ip-192.168.0.4:3260-iscsi-iqn.2004-04.com.qnap:ts-509:iscsi.linux02.ba4731-lun-0@  pci-0000:00:1f.2-scsi-0:0:0:0-part2@
pci-0000:00:1f.1-ide-0:0@                                                          pci-0000:00:1f.2-scsi-0:0:0:0-part3@
pci-0000:00:1f.2-scsi-0:0:0:0@                                                     pci-0000:00:1f.2-scsi-1:0:0:0@
pci-0000:00:1f.2-scsi-0:0:0:0-part1@                                               pci-0000:00:1f.2-scsi-1:0:0:0-part1@
share|improve this question
    
on the target (server)'s side, try cat /proc/net/iet/session – user317446 Oct 19 '15 at 11:17
up vote 12 down vote accepted

does iscsiadm -m session tell you what you want to know? (or I think iscsiadm -m session -P 3 might give more info)

share|improve this answer
    
Exactly! Thanks a lot =) – Sandra Aug 21 '10 at 11:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.