I am using RHEL5.0(2.6.18-8.el5) and iscsi-initiator-
utils-6.2.0.742-0.5.el5 with EMC CX3-20c.
The host cannot see LUNs when the system startup with the following
error.
---------------
"Setting up iSCSI targets: Login session [192.168.0.10:3260 iqn.
1992-04.com.emc.cx.apm00000000000.a0]
iscsiadm: Could not login session (err 4).
iscsiadm: initiator reported error (4 - encountered connection
failure)"
---------------
After the system bootup, when I login the session to targets
manually(# iscsiadm -m node -p 192.168.0.10 -T XXXXXX -l), the host
can see LUNs normally.
Does anyone have same experience such as above situation?
I want to see LUNs automatically when the host bootup.
Thanks in advance,
Fumi
If you run "/etc/init.d/iscsi start" after the system has booted and
settled a bit does it then work?
So, everytime the host has booted, I have to run "iscsiadm -m node -p
XX.XX.XX.XX -T XXXX -l" or "iscsiadm -m node --loginall=automatic".
Oh this sounds like that problem where the network is not ready yet or
is settling or something. If Hannes or the EMC guys do not chime in we
can ping them to find out exactly.
echo -n $"Setting up iSCSI targets: "
sleep 4
iscsiadm -m node --loginall=automatic
Mark
Thank you for your help,
Fumito
> > can ping them to find out exactly.- Hide quoted text -
>
> - Show quoted text -
Mike can you think of something we can test to make sure in scripts that
iscsi_tcp/iscsid are ready?
Boaz
If you are getting
iscsiadm: initiator reported error (4 - encountered connection
failure
then it does not have much to do with iscsi_tcp or iscsi. We are still
trying to complete the connect() call. When the iscsi_tcp module_init
completes and modprobe/insmod returns it is ready to go.
Back in the iscsi_sfnet/linux-iscsi days, when we had a ioctl and a char
device for the ioctl, we had a
while (/dev/iscsi_sfnet_char_device not repsent)
sleep 1
in the start up script, because udev took a while to make the char
device's /dev node, but we do not need that in open-iscsi since we use
netlink.
What NICs are people using and having troubles? Hannes reported that
with tg3 there was a problem where it was taking a long time to get ready.
I think in some distros the network will initially start up and wait for
things like dhcp to acquire a address, but if it takes too long then it
will be done in the background and the rest of the start up will
continue. So when iscsi starts if the network is not ready, we still try
to connect and login for node.conn[0].timeo.login_timeout seconds, and
if not successful give up and return the error that was reported.
So we can do some simple things to work around the problem, like
increase the login timeout, but we also probably need to implement
reopen_max for normal session mode so we do not give up on the first
try. I will send a patch for this later.
Or maybe iscsi should be started off some network hotplug event that
would signal that the network is ready to go, but I am not sure about that.
echo -n $"Setting up iSCSI targets: "
sleep 4
iscsiadm -m node --loginall=automatic
Mark