iscsiadm - Can't log to all targets

General support questions including new installations
Post Reply
danrs
Posts: 6
Joined: 2014/01/15 18:56:25

iscsiadm - Can't log to all targets

Post by danrs » 2014/01/15 19:56:53

Hi all, this is my first post since I'm new on CentOS.

I have CentOS 5.9 installed in two nodes connected to a mirrored iSCSI storage device.

getinfo.sh of node 1: http://pastebin.centos.org/7306/
getinfo.sh of node 2: http://pastebin.centos.org/7311/

My problem is I'm receiving the error "iscsiadm: Could not log into all portals" when trying to restart the iscsi service.

I did the following to configure node 1:

$ chkconfig iscsid on
$ service iscsid start
$ chkconfig iscsi on
$ service iscsi start
$ ifconfig eth1 mtu 9000
$ iscsiadm -m discovery -t sendtargets -p 10.9.254.1 --> This is the only IP I receive an answer. On node 2, I have to use xx.x.xxx.2

10.9.254.1:3260,1 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
10.9.254.9:3260,2 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
10.9.254.2:3260,3 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
10.9.254.10:3260,4 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
10.9.254.3:3260,5 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
10.9.254.11:3260,6 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
10.9.254.4:3260,7 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
10.9.254.12:3260,8 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc

The problem is that I receive errors when I restart the iscsi service:

$ service iscsi restart

Logging out of session [sid: 21, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260]
Logging out of session [sid: 22, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260]
Logout of [sid: 21, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260] successful.
Logout of [sid: 22, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260] successful.
Stopping iSCSI daemon:
iscsid está parado [ OK ]
Starting iSCSI daemon: [ OK ]
[ OK ]
Configurando destinos iSCSI: Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.9,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.12,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.10,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.3,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.4,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.11,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.2,3260] (multiple)
Login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260] successful.
Login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260] successful.
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.9,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.12,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.10,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.3,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.4,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.11,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.2,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not log into all portals
[ OK ]

The connections are the following:

$ iscsiadm -m session

tcp: [23] 10.9.254.1:3260,1 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc
tcp: [24] 10.9.254.1:3260,1 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc

And when I do the same on the node 2, I can make only 1 connection:

$ service iscsi restart

Logging out of session [sid: 5, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.2,3260]
Logout of [sid: 5, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.2,3260] successful.
Stopping iSCSI daemon:
iscsid está parado [ OK ]
Starting iSCSI daemon: [ OK ]
[ OK ]
Configurando destinos iSCSI: Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.10,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.4,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.11,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.9,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.2,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.3,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.12,3260] (multiple)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.10,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.4,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.1,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.11,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.9,3260].
iscsiadm: initiator reported error (8 - connection timed out)
Login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.2,3260] successful.
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.3,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com.hp:storage.p2000g3.121514b3cc, portal: 10.9.254.12,3260].
iscsiadm: initiator reported error (8 - connection timed out)
iscsiadm: Could not log into all portals

$ iscsiadm -m session

tcp: [7] 10.9.254.2:3260,3 iqn.1986-03.com.hp:storage.p2000g3.121514b3cc

By querying /proc/partitions I see half the disks on node 2.

What could be the problem? How could I troubleshoot it?

Thanks a lot.

danrs
Posts: 6
Joined: 2014/01/15 18:56:25

Re: iscsiadm - Can't log to all targets

Post by danrs » 2014/01/16 20:10:45

Nobody answered me :(

However I found the solution... hope it helps to other people:

Firstly, two sessions wasn't good, so I disconnected both and deleted the files in /var/lib/iscsi/send_targets, then discovered again and reconnected, now with only one session.

Secondly, it seems I didn't need so many loggings, so I deleted the directories in /var/lib/iscsi/nodes/iqn.1986-03.com.hp:storage.p2000g3.121514b3cc/ (except the directory containing the correct IP), and now it only connects to that IP/target, and I see no errors.

Regards!

bbchung
Posts: 1
Joined: 2014/08/12 09:34:25

Re: iscsiadm - Can't log to all targets

Post by bbchung » 2014/08/13 02:21:19

Really thx u posted back the answer.
I used many time still cannot find this path.

Thx a lot. :D

danrs
Posts: 6
Joined: 2014/01/15 18:56:25

Re: iscsiadm - Can't log to all targets

Post by danrs » 2014/08/13 13:55:57

Thanks. Anyway, I must warn you that I continued to have problems, until I realized I had to use multipath.

Each time two nodes had to access the storage, a problem occured. It was because I wasn't using multipath.

Best regards!

Post Reply