Thank you very much all.Problem is solved,but I am having doubt.

@Mike

On Apr 21, 5:08 am, Mike Christie <micha...@cs.wisc.edu> wrote:
> HIMANSHU wrote:
> > I discovered 2 machine,192.168.7.50(containing 10 targets,out of which
> > performed login on 2) and  192.168.7.51(containing 5 targets,out of
> > which performed login on 3).I am using IET target and 'iscsi-initiator-
> > utils-6.2.0.868-0.7.el5' initiator.
>
> > So at present there are 5 connections on initiator.suddenly if
> > initiator reboots.
>
> > we are having following code in 'iscsi' service
> > iscsiadm -m node --logoutall=all(stop function)
> > iscsiadm -m node --loginall=automatic(start function)
>
> > But disadvantage is that it will login to all 15 targets from both
> > 7.50 and 7.51 machines,and not 5 which already were there.This is
>
> Do you have only the target records you want to log into automatically
> marked as node.startup=automatic?

Yes,I am having all the targets marked as node.startup=automatic.

> > because previous discovery entry is still there in "/var/lib/iscsi/
> > nodes" and "/var/lib/iscsi/send_targets".
>
> I didn't follow you when you meantioned the previous entry. Are you
> running the iscsiadm discovery command at some point during startup?

No,I am not running 'iscsiadm discovery' command at startup.

> > If I commented above 2 lines from 'iscsi' service,It works fine for
> > stop,start,restart service operations.i.e.initiator is restoring only
> > connections which were there previously.
>
> are you running a custom script that logs into specific targets or how
> do you log into targets if the init script does not run loginall=automatic?

User will specify IP addr for discovering targets.discovery command
followed by login command for particular target selected by user.so I
will fire 'iscsiadm update command to set node.startup as automatic'
for this

> > But this doesn't work across reboot.I lost my 5 connections after
> > reboot though above 2 lines were commented.
>
> > Thus,what should I do for persistent connections across reboot?
>
> I think you just want to set the targets you want to log into with the
> node.startup = automatic. When that loginall=automatic gets run, it will
> only log into those targets.

Yeah.This worked for me.I specified 'node.startup=manual' in
'iscsid.conf'.
so running update command to change it to 'automatic' only on login(or
I will give option for persistent connection across reboot).
But my problem these changes vanish after another discovery command.

I login to one target say TAR1, from 30.51 and fired update command to
change 'node.startup' to 'automatic'.
and then after some time,If I want to login to another target from
30.51,I need to fire discovery command,which will make 'node.startup'
of TAR1 changed to 'manual' again due to 'iscsid.conf'.

So what can be the solution for this?
How can I stop discovery command overwriting previous configuration?
or I need to again fire 'update command'(for all those logged on that
IP) after repeated discovery command?

> iscsiadm -m node -T target -p ip:port -o update -n node.startup -v startup
>
> I think with IET you can set up lists to control how can log into which
> target. Does that work for you?

--~--~---------~--~----~------------~-------~--~----~
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 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to