Thanks a lot Mike. That really cleared the confusion I had between all the various iscsi structures and the device structures held inside them, and I found what I was looking for.
Regards, Aastha. On 25 February 2013 19:44, Mike Christie <[email protected]> wrote: > On 02/23/2013 05:38 AM, Aastha Mehta wrote: >> Hello, >> >> I am trying to understand how a device is discovered by the initiator >> and registered at the client side. Specifically I would like to know >> how does the target show up as a /dev/sd* to the client. > > When the iscsi layer is logged into the target, we will ask the scsi > layer to do a scan for devices. We do this by doing > > echo - - - > /sys/class/scsi_host/hostX/scan > > from iscsid (see open-iscsi/usr code for that). > > The scsi layer then sends reports luns and inquirys and creates > scsi_device and scsi_target objects. > >> >> I see in the kernel code a iscsi_endpoint structure which holds a >> device and a connection for the device. But I am not sure if and how >> this endpoint is used. > > The device structs embedded in the iscsi conn, endpoint and session are > not the type of devices you are asking about. They are linux kernel > driver model device structs and are only used for sysfs/refcount stuff. > >> >> Or else, where is the device structure maintained at the initiator for >> a particular iscsi target? >> >> If there is any documentation available on this, clearly I have missed >> it. Please direct me to the same. >> >> Thanks in advance. >> >> Regards, >> Aastha. >> > -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/open-iscsi?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
