IPv4/IPv6 initiator-target--automatic mapping of targets
Hello All, I have a case where both initiator and target are configured with IPv4 and IPv6 address. The target listens ob both sockets. When i login to the target without mentioning the portal , it logins and creates two sessions for the same target. Questions 1.How to force the initiator to login with a specific IP version ? It is configured for automatic login and both systems have to retain dual ip address version. 2.The session id always get incremented after each new login. Can this be changed to reset /start from least available after for each new session ? 3. How to persistently map iscsi target to fixed sdX id ? for third Question, I came across couple of threads in forum and IET for similar issue. I am trying to configure the ScsiId in the ietd.conf and create the udev rule on the initiator. But no success. == Ietd.conf== Target iqn.2008-03.storageserver:storage.target1 Lun 1 Path=/dev/VolGroup00/target1,Type=blockio,ScsiId=1234567 Initiator Udev rule and ScsiId === [EMAIL PROTECTED] rules.d]$ sudo scsi_id -g -s /block/sdc 1494554003736353433323100 [EMAIL PROTECTED] rules.d]$ cat 20-names.rules KERNEL=sd*, BUS=scsi, PROGRAM=/sbin/scsi_id, RESULT=1234567, NAME=sdb%n [EMAIL PROTECTED] rules.d]$ sudo iscsiadm --version iscsiadm version 2.0-865 === Once, I am successful with a single system,it has to be replicated on other systems. Is there feature in consideration on future initiator software releases to extract this info and provide a option to automate this event ? thanks in advance for your time and suggestions Regards Padmanabhan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups open-iscsi group. To post to this group, send email to open-iscsi@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~--~~~~--~~--~--~---
Re: [PATCH] Fix indentation
Erez Zilber wrote: Mike Christie wrote: Erez Zilber wrote: Fix indentation and remove trailing spaces. Signed-off-by: Erez Zilber [EMAIL PROTECTED] Mike? Are you ok with this patch? It is already broken. Did you run a script for this? Could you send the script? Then when I merge Eli's patch I can just run the script and you do not have to worry about the breakage? The kernel modules in the open-iscsi.git tree are also different from upstream and the bnx2i tree, so a script that I can run against them would make it easier for use to sync up, unless you want to send patches for those messes. I have a script that finds indentation problems (attached). It doesn't fix them, but that should be really easy to do. Mike, Were you able to use it? Erez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups open-iscsi group. To post to this group, send email to open-iscsi@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~--~~~~--~~--~--~---
[PATCH] fix host number sysfs parsing
I need this on top of git head to be able to get status from iscsi using 2.6.25-rc1. You'll probably want to go looking for host in both sysfs paths, to handle old and new kernels. Here's an example of how it works in a recent one. Others testing recent kernels may want to hack this in temporarily. Here are the error message from old iscsi utils, iscsi-initiator-utils-6.2.0.868-0.3.fc9.x86_64. aib01# iscsiadm -m session iscsiadm: Could not get host for sid 1. iscsiadm: could not get host_no for session 6. iscsiadm: could not find session info for session1 iscsiadm: Can not get list of active sessions (6) aib01# iscsiadm -m node -p 10.100.2.32,3260 -T aib02 -u iscsiadm: Could not get host for sid 1. iscsiadm: could not get host_no for session 6. iscsiadm: could not find session info for session1 -- Pete Sysfs layout changed yet again. Accommodate new kernels (2.6.25-rc1 at least), but probably break the parsing on older ones. Signed-off-by: Pete Wyckoff [EMAIL PROTECTED] --- usr/iscsi_sysfs.c | 19 +++ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c index 7b65d6d..361eff0 100644 --- a/usr/iscsi_sysfs.c +++ b/usr/iscsi_sysfs.c @@ -279,7 +279,7 @@ void get_negotiated_session_conf(int sid, uint32_t get_host_no_from_sid(uint32_t sid, int *err) { char *buf, *path, *tmp; - uint32_t host_no; + uint32_t host_no = 0; *err = 0; @@ -290,28 +290,23 @@ uint32_t get_host_no_from_sid(uint32_t sid, int *err) } path = buf + PATH_MAX; - sprintf(path, ISCSI_SESSION_DIR/session%d/device, sid); + sprintf(path, ISCSI_SESSION_DIR/session%d, sid); if (readlink(path, buf, PATH_MAX) 0) { log_error(Could not get link for %s., path); *err = errno; goto free_buf; } - /* buf will be .bus_info/hostX/sessionY */ + /* buf will be ../../devices/platform/hostX/sessionY/iscsi_session/sessionY */ /* find hostX */ - tmp = strrchr(buf, '/'); - *tmp = '\0'; - - /* find bus and increment past it */ - tmp = strrchr(buf, '/'); - tmp++; - - if (sscanf(tmp, host%u, host_no) != 1) { - log_error(Could not get host for sid %u., sid); + tmp = strstr(buf, host); + if (tmp == NULL) { + log_error(could not find host in session link %s, buf); *err = ENXIO; goto free_buf; } + host_no = atoi(tmp + 4); free_buf: free(buf); -- 1.5.4.1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups open-iscsi group. To post to this group, send email to open-iscsi@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~--~~~~--~~--~--~---