On 07/28/2009 06:59 PM, Matthew Schumacher wrote:
> Mike Christie wrote:
>> This is what we do in Red Hat. It is a little tricky, because when
>> iscsid restarts it relogins into the target to make sure its state is
>> all in sync with the kernel and session. So the network has to be up
>> first, then restart iscsid. iscsid will then kill the running session
>> and relogin. There will be a delay of a couple seconds at this time, but
>> it should relogin and then the boot process should proceed.
> This seems to work:
> -------------------------------------------------------------------
> #!/bin/sh
> # cache this stuff
> iscsid>  /dev/null
> iscsiadm>  /dev/null
> killall iscsid

When you kill iscsid, are there sessions running? If there are then when 
you run iscsid below you should not have to rerun your discovery command 
and run the login command. iscsid basically looks at 
/sys/class/iscsi_session and will logout those session and then relogin 
to make sure they are in sync with iscsid and the kernel.

If you are running the discovery command and login command below to 
login into other targets then it is fine.

> iscsid
> iscsiadm -m discovery -t sendtargets -p 192.168.x.101:3260
> iscsiadm -m node -T database -p 192.168.x.101:3260 -l
> -------------------------------------------------------------------
> Does that look sane to you?  It does pause for 20 seconds, but appears
> to work.  Do you know why it pauses?

Because when iscsid restarts it will logout the running sessions then 
relogin. I do not think it should take 20 seconds, but it could 
depending on your network and target.

> Also, thank you very much for your help with this, you have saved me a
> tremendous amount of time and for that I appreciate it.

No problem. Next time use a distro that just has this stuff done 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 
For more options, visit this group at http://groups.google.com/group/open-iscsi

Reply via email to