On Sep 28, 2012, at 1:09 PM, "Edward Ned Harvey (openindiana)" <[email protected]> wrote:
> I am confused, because I would have expected a 1-to-1 mapping, if you create > an iscsi target on some system, you would have to specify which LUN it > connects to. But that is not the case... > > I read the man pages for sbdadm, stmfadm, itadm, and iscsiadm. I read some > online examples, where you first "sbdadm create-lu" which gives you a GUID > for a specific device in the system, and then "stmfadm add-view $GUID", and > then "itadm create-target." > > It's this last command that confuses me - Because it generates an iscsi > target "iqn.blahblah"... And it will create as many as you specify, > regardless of how many LUN's you have available. So how can I know which > device I'm handing out to some initiator? And if an initiator connects to > all those different iqn.blahblah addresses... What device will they actually > be mucking around with? SCSI has targets and logical units (LUs). iqns are targets. LUs are often referred to by their number (LUN) > > I'm not quite sure what in my brain is thinking wrong, but I'm guessing the > explanation is something like this: > > (can anyone tell me if this is the correct interpretation?) > > I shouldn't be thinking in such linear terms. When I create an iscsi target, > don't think of it as connecting to a device - instead, think of it as sort of > a channel. Any initiator connecting to it can see any of the devices that I > have done add-views on. But each iscsi target can only be used by one > initiator at a time. Maybe it helps to think of it like TCP/IP: targets are like IP addresses, LUs are like ports. stmfadm add-view maps a block device to a target+LU. > > Is that a good understanding? SCSI uses reservations to control concurrent access by initiators. Reservation management requires that the initiators talk to the LU, so there is no desire to prevent multiple initiators from talking to a target or LU. -- richard > ------------------------------------------- illumos-discuss Archives: https://www.listbox.com/member/archive/182180/=now RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be Modify Your Subscription: https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4 Powered by Listbox: http://www.listbox.com
