Re: IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-12 Thread Mike Christie

Padmanabhan wrote:
 Hello
 
 
 So if you do
 iscsiadm -m node -T target -p ip:port -o update -n node.startup -v manual

 for just one portal, then restart the system that portal will not get auto
 logged into. The other portal on that taget will still get auto logged
 into. Does that make sense?
 
 Yes,, it made sense... now upon reboot only one iscsi session
 established over the preferred portal.

Ok good. You just know too much about iscsi terminology so open-iscsi 
messed up naming messed you up :)

 
 When you write the fstab entry use the /dev/disk/by-id/scsi-XXX value. Do
 not use the /dev/sdX ones.
 
 I edited the fstab entry with /dev/disk/by-id/scsi- value. It is
 NOT mounted ti iscsi directory.
 /dev/disk/by-id/scsi-XXX /mnt/iscsi   auto   _netdev 0 0
 
 Is there additional configuration that I am missing out ?
 

What distro are you using?

--~--~-~--~~~---~--~~
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: IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-10 Thread Padmanabhan

Hello


 So if you do
 iscsiadm -m node -T target -p ip:port -o update -n node.startup -v manual

 for just one portal, then restart the system that portal will not get auto
 logged into. The other portal on that taget will still get auto logged
 into. Does that make sense?

Yes,, it made sense... now upon reboot only one iscsi session
established over the preferred portal.

 When you write the fstab entry use the /dev/disk/by-id/scsi-XXX value. Do
 not use the /dev/sdX ones.

I edited the fstab entry with /dev/disk/by-id/scsi- value. It is
NOT mounted ti iscsi directory.
/dev/disk/by-id/scsi-XXX /mnt/iscsi   auto   _netdev 0 0

Is there additional configuration that I am missing out ?



--~--~-~--~~~---~--~~
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: IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-07 Thread Michael Christie

On Tue, 6 May 2008, Padmanabhan wrote:


 Hello Mike,
 Let me explain the sequence of events
 -- The system reboots
 -- Open iscsi is enabled at start up
 Issue 1 == From the database, the initiator logins twice to the same
 target via TWO TCP connections which are established on IPv4 and IPv6


It will not do this if you set one of the portals to not auto login like I 
told you before.


 sockets.

 Yes, if i disable automatic node startup, then it is fine, I can login
 to the target via specific portal by using iscsiadm comamands.
 But problem is when it configured for automatic login. As said
 earlier, I am looking for a solution at iSCSI layer.


Your reply is confusing because you say the disbaling auto startup works, 
but you have to run iscsiadm to get it to work. Did you set the autologin 
for just one portal?

Did you try the iscsiadm update command for just one portal, and did you 
try the reboot?

The node.startup name is a little confusing. It should be portal.startup, 
because it just means that for the record do we want auto login or not. 
And we do a record per portal more or less.

So if you do
iscsiadm -m node -T target -p ip:port -o update -n node.startup -v manual

for just one portal, then restart the system that portal will not get auto 
logged into. The other portal on that taget will still get auto logged 
into. Does that make sense? The autologin feature will only log into one 
the one portal that has the node.startup value as automatic. The other 
portal will not get auto logged into because it's record has manual even 
though the the setting says node.startup and both portals are on the same 
iscsi node.

You do not need to disbale this globally or  for the entire target - just 
one portal on the target. But you use the node.startup setting of the 
record which is akward because it does not mean the entire node - just the
one portal that the record is for.

So just try it out, then reply.


 == for the second issue, I searched further but still need your
 help .

 Yes, I find an entry under /dev/disk/by-id as say 
 scsi-149455400123456 ?
 Here is where I am not able to get you how to make it consistent.

 1. mount /dev/disk/by-id/scsi-XXX /mnt/iscsi
 2. output of mount
   /dev/sdd on /mnt/iscsi type ext3 (rw)
 3. Created fstab entry
/dev/sdd /mnt/iscsi   auto   _netdev 0 0
 4. Reboot

 fstab retains the entry, but the mount output does not have it. When
 it logged in this time, it has different sdX.
 I am not using udev rules.



When you write the fstab entry use the /dev/disk/by-id/scsi-XXX value. Do 
not use the /dev/sdX ones.


 Once again, thanks for your time and suggestions.
 


--~--~-~--~~~---~--~~
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: IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-05 Thread Konrad Rzeszutek

On Sun, May 04, 2008 at 12:56:46AM -0700, Padmanabhan wrote:
 
 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.

Look in the README file for ' 5.1 How to setup iSCSI interfaces (iface) for 
binding'

 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 ?

I don't believe it can be without some hacking. The SCSI middle-layer is
the one that gives us the 'host' number which is what we use. Every time
you open/tear down a session, we open/tear down an SCSI Host and the 
SCSI layer gives us a host-number.

 3. How to persistently map iscsi target to fixed sdX id ?

Use multipath or convert the scsi_id to retain a cache so that when it
returns a value the device-mapper can re-create a /dev/mapper/XX to
point to the old block device.

Multipath is probably a better choice - as that is easily installed
on most distros and it automaticly map block devices to uniquely
identified devices that won't change between reboots.


 
 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: IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-05 Thread Mike Christie

Padmanabhan wrote:
 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.

Ummm, I either do not understand what you mean or it the answer is 
really simple.

When you run iscsiadm by hand if you do

iscsiadm -m discovery -t st -p ip:port

and you get

10.15.84.19:3260,2 iqn.my_taget
[ipv6 addr],2 iqn.my_taget

Then to log into a specific one you use the -p/--portal argument:
iscsiadm -m nodde -T iqn.my_taget -p 10.15.84.19:3260,2 -l

If you wanted to set this up so this one is logged into automatically 
set the node.startup setting to automatic. Or if you do not want the 
portal to be logged into automatically set it to manual.

iscsiadm -m node -T targetname -p ip:port --op update -n node.startup -v 
automatic

iscsiadm -m node -T targetname -p ip:port --op update -n node.startup -v 
manual



See the README for how to pass in ipv6 addrs.


 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 ?

not yet.

 3. How to persistently map iscsi target to fixed sdX id ?
 

Are you sure you want to map the target to a fixed sd id? What distro 
are you using? What is wrong with their udev naming scheme? Have you 
looked in /dev/disk ?

--~--~-~--~~~---~--~~
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: IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-05 Thread Padmanabhan

Hello Mike,
Here again, let me try to explain the problem
Initiator  Target
10.1.1.210.1.1.1
2001::2 2001::1
node.startup=automatic

When the system reboots, the initiator login twice (TWO TCP
connections) with target on both IPv4/IPv6 addresses
where only one is required. Is there a way to limit this session at
iSCSI level, preferably on initiator?

Output of fdisk -l on initiator, the same target volume is listed as

/dev/sdc
/dev/sdd

Yes, under /dev/disk the exported volume is updated in by-id,by-uuid..
directories.
Th by-id is same(scsi- is prepended) as the ScsiId param which I
configure in ietd.conf
/dev/disk/by-id/
scsi-149455400313323334353637383930313233343536

I configured udev rule as per Redhat kbase
http://kbase.redhat.com/faq/FAQ_85_8082.shtm

KERNEL=sd*, BUS=scsi, PROGRAM=/sbin/scsi_id,
RESULT=149455400313323334353637383930313233343536,
NAME=sdb%n

So the two issues,
--initiator should login only once ( i can set to either IPv4/IPv6)
--the exported volume should be listed as /dev/sdb on the initiator
--~--~-~--~~~---~--~~
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: IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-05 Thread Mike Christie

Padmanabhan wrote:
 Hello Mike,
 Here again, let me try to explain the problem
 Initiator  Target
 10.1.1.210.1.1.1
 2001::2 2001::1
 node.startup=automatic

you can set the node.startup value for each portal on the target.

 
 When the system reboots, the initiator login twice (TWO TCP
 connections) with target on both IPv4/IPv6 addresses
 where only one is required. Is there a way to limit this session at
 iSCSI level, preferably on initiator?

Run iscsiadm -m node. What do you see? Something like
iscsiadm -m node
10.1.1.1:3260,2 iqn.1992-08.com.mytarget
[2001::1]:3260,3 iqn.1992-08.com.mytarget

If you only want to log into the first one do

iscsiadm -m node -T iqn.1992-08.com.mytarget -p 10.1.1.1:3260,2 -o 
update -n node.startup -v manual


If you only want to log into the second one do

iscsiadm -m node -T iqn.1992-08.com.mytarget -p  [2001::1]:3260,3 -o 
update -n node.startup -v manual


If you are running iscsiadm by hand pass in the specific portal you want 
to log into instead of just the target name.


 
 Output of fdisk -l on initiator, the same target volume is listed as
 
 /dev/sdc
 /dev/sdd
 
 Yes, under /dev/disk the exported volume is updated in by-id,by-uuid..
 directories.

I am asking why couldn't you just use those?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



IPv4/IPv6 initiator-target--automatic mapping of targets

2008-05-04 Thread Padmanabhan

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
-~--~~~~--~~--~--~---