Mike Christie wrote:
Daniel P. Berrange wrote:
On Fri, Jan 16, 2009 at 12:17:19PM -0600, Mike Christie wrote:
Hans de Goede wrote:
- No API for enumerating the LUNs in a target once you're logged in ?
open-iscsi / iscsiadm does not do this, it merely creates a virtual
scsi adapter and then the generic kernel scsi code does this (AFAIK).
I think you guys are talking about different things.
open-iscsi/iscsiadm just does the iscsi parts and so it asks the scsi
layer to find and setup/destroy luns. However, I think Daniel just
wanted a way to see the mapping of a iscsi session to its target and
luns (so the session to host/target/lun mappings see when you do
iscsiadm -m session -P 3).
What we curretly do to find LUNs is
- Read all entries in /sys/class/iscsi_session/session$SID/device
until we find the one matching the targetXXXX we want
- Read all entries in
/sys/class/iscsi_session/session$SID/device/$TARGET/
and if it matches pattern A.B.C.D its a LUN.
Now read /sys/bus/scsi/devices/A.B.C.D/type and see if
if this LUN corresponds to an actual device (with someo
initiators there's a LUN which doesn't have corresponding
/dev/sdXX device node)
You mean for tape devices or disks? All disks should have a /dev/sdXXX.
Oh yeah, for lus like tape, and weird lus like the ones you get that are
really management lus, or pretty much any non disk luns you are going to
have this problem. This occurs in FC and iSCSI and SAS or whatrever SCSI
transport you use.
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list