From: Arne R. <ag...@po...> - 2005-11-24 07:12:27
|
Am Mittwoch, den 23.11.2005, 23:59 -0500 schrieb Charles McCabe: > If you=FFll entertain my elementary questions, I=FFll write up what I lea= rn > for inclusion in the Wiki or FAQ so as to abate these same questions in > the future ; > As this relates to both open-iscsi and IET, it would be nice to have in both project's Wikis. ;-) > This is my absolute first experience with iSCSI, but > I've been working with fibre channel SANs for some time. I have read > the README and the FAQ, etc., but I must be missing some things. >=20 > I=FFm using FC4 2.6.14 for both target (iscsitarget 0.4.13 r1266) and > initiator (open-iscsi via SVN from 2005-11-23). > =20 > The first question is, =B4How do I determine the initiator name in > initiatorname.iscsi?=A1 From the little I=FFve been able to gather on th= e > Net so far, it seems like the name is arbitrary, but . . . The initiator (and target!) name follow this scheme: iqn.<yyyy-mm>.<reversed.domainname>[:<some.unique.arbitrary.and.optional.id= entifier] with <yyyy-mm> being the date of the domain's registration. > Second question, "I do have to generate the initiatorname.iscsi > manually, right?" I've seen that with the MS and Cisco initiators, it's > done automagically. Right, open-iscsi and IET don't auto-generate initiator or target names. > Third question, "How do I get ietadm to show the existing config?" I > don't see an option to display existing targets/luns/users. Sorry, that's not implemented yet. We're aware of it - it's already on IET's wishlist in the IET wiki. You can get some partial information about targets and their mapped LUNs from /proc/net/iet/{session,volume} > After some fiddling to find versions that compile cleanly, here's what > I=FFve done. >=20 > On target: >=20 > dd if=3D/dev/zero of=3D/tmp/LUN count=3D2880 >=20 > ietadm --op new --tid=3D1 --params Name=3DLUN > ietadm --op new --tid=3D1 --lun=3D1 --params Path=3D/tmp/LUN > ietadm --op new --user > --params=3DIncomingUser=3Duser,Password=3Dpasswordpassword >=20 > Fourth question, "Are those even valid values for the TID, LUN and > password?" - TID: it's fine, given that no target with tid 1 previously existed. See procfile(s) mentioned above for this info. Though most initiators probably won't complain, the target name should follow the iqn scheme described above. - LUN: you should start with LUN 0 as that's a "well known" LU which will be used by initiators to gather some information. - User/Password: they're fine, but I'd like to make clear that without specifying a tid, these credentials will be used during discovery. Normal sessions to a particular target will not be authenticated unless you specify credentials for it. Are you aware of /etc/ietd.conf? It allows you to make persistent settings which are read on IET startup. You can still make changes with ietadm while IET's running, but they will be lost if IET is stopped / restarted. An example ietd.conf is in the tarball's etc/ directory, a more detailed explanation in the ietd.conf(5) manpage. > Fifth question, "Can I assume that OutgoingUser would only be for > mutually authenticated connections?" Yep, that's right. > On initiator: >=20 > iscsi.conf: > DiscoveryAddress=3D172.16.95.132:3260 > Username=3Duser > Password=3Dpasswordpassword >=20 > initiatorname.iscsi: > InitiatorName=3Diqn.1987-05.com.sungardrs.sas:iscsiinit >=20 > Then, 'iscsid -d8 -f' gives this output: > iscsid: IPC socket is listening... > iscsid: in ctldev_open > iscsid: created NETLINK_ISCSI socket... > iscsid: InitiatorName=3Diqn.1987-05.com.sungardrs.sas:iscsiinit > iscsid: no InitiatorAlias found in /etc/initiatorname.iscsi > iscsid: InitiatorName=3Diqn.1987-05.com.sungardrs.sas:iscsiinit > iscsid: InitiatorAlias=3Dlocalhost.localdomain > iscsid: version 0.3 variant (22-Apr-2005) > iscsid: in ktrans_list > iscsid: synced 1 transport(s) >=20 > If I then do 'iscsiadm -m discovery', iscsid says: > iscsid: detected poll event 1 >=20 > Essentially that's all I ever get. >=20 > Help? /etc/iscsi.conf is the Cisco initiator's (linux-iscsi < 5.0.0) configuration file, it's not used by open-iscsi. The default conffile of the it is /etc/iscsid.conf. Again, an example can be found in the etc/ directory of your working copy. The usage examples in open-iscsi's README should get you started: 1) SendTargets iSCSI Discovery: ./iscsiadm -m discovery --type sendtargets --portal 192.168.1.1:3260 (will give you a list of targets and their record IDs) 2) iSCSI Login: ./iscsiadm -m node --record 0f23e4 --login 3) iSCSI Logout: ./iscsiadm -m node --record 0f23e4 --logout Final note: please post IET-related questions to the IET mailing list. Arne |