Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iscsiadm "no portals found"

Tags:

centos

iscsi

I installed a iscsi targets on a Centos6 server and configure one target that can be found on one client machine (Ubuntu 1304 in network 192.168.95.x). However, when I add one more target and try to connect from another machine (Centos5 in same subnet) but it show "no portals found". Below is the printout of the settings:

iscsi target in 192.168.180.88

[root@iscsi01 ~]# tgt-admin --show

Target 1: iqn.2013-08.com.xxx:vm.01<br>
    System information:
    Driver: iscsi
    State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 1989308 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /data/iqn.2013-08.com.xxx.vm.img
            Backing store flags: 
    Account information:
        wilson
    ACL information:
        192.168.180.0/24
        192.168.163.0/24
        192.168.95.0/24
Target 2: iqn.2013-08.com.xxx:wy
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00020000
            SCSI SN: beaf20
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
        LUN: 1
            Type: disk
            SCSI ID: IET     00020001
            SCSI SN: beaf21
            Size: 107374 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /data/iqn.2013-08.com.xxx.wy.img
            Backing store flags: 
    Account information:
        wilson
    ACL information:
        192.168.95.0/24
        192.168.180.0/24

iscsi initiator in same subnet (192.168.180.x - Centos5)

[root@syslong ~]# iscsiadm -m discovery -t st -p 192.168.180.88
iscsiadm: No portals found

/etc/iscsi/iscsid.conf

    node.startup = automatic
    node.leading_login = Yes
    node.session.auth.authmethod = CHAP
    node.session.auth.username = wilson
    node.session.auth.password = xxxx
    discovery.sendtargets.auth.authmethod = CHAP
    discovery.sendtargets.auth.username = wilson
    discovery.sendtargets.auth.password = xxxx

iscsi initiator in different subnet (192.168.95.x - Ubuntu 1304)

wilson@guntank:~$ sudo iscsiadm -m discovery -t st -p 192.168.180.88
[sudo] password for wilson: 
192.168.180.88:3260,1 iqn.2013-08.com.xxx:wy

In the ubuntu machine, it only found one of the target in iscsi target server but in the iscsi target server both target can be shown by using tgt-admin command. Is there anything I configured incorrect?

Thanks a lot!

Wilson

like image 613
user2114189 Avatar asked Aug 27 '13 03:08

user2114189


1 Answers

This command was useful to me when I ran into that problem. I hope it works for anyone who has this issue. (See man page for tgtadm)

 tgtadm --lld iscsi --mode target --op bind --tid 1 --initiator-address ALL
like image 193
Kevin Avatar answered Sep 22 '22 21:09

Kevin