重启iscsi报19 - encountered non-retryable iSCSI login failure

来源:互联网 发布:python数据分析 视频 编辑:程序博客网 时间:2024/05/21 14:02
[root@node1 iscsi]# service iscsi restart
Stopping iscsi:                                            [  OK  ]
Starting iscsi: iscsiadm: Could not login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.a5fe1648bc51, portal: 10.3.4.150,3260].
iscsiadm: initiator reported error (19 - encountered non-retryable iSCSI login failure)
iscsiadm: Could not login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.a5fe1648bc51, portal: 10.3.4.162,3260].
iscsiadm: initiator reported error (19 - encountered non-retryable iSCSI login failure)
iscsiadm: Could not log into all portals
                                                           [  OK  ]
                                                           
                                                           
出现这种错误的原因:是原先login存储一些信息保留在系统环境中
iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.a5fe1648bc51 -p 192.168.2.254:3260 -l

查看iscsiadm的命令行发现如下信息:
 man iscsiadm
 .......
 .....
  -I, --interface=[iface]
              The interface argument specifies the iSCSI interface to use for the operation.  iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces.  For  hardware
              iSCSI  (qla4xxx) the iface config must have the hardware address (iface.hwaddress = port?. MAC address) and the driver/transport_name (iface.transport_name).
              The iface?. name is then the filename of the iface config. For software iSCSI, the iface config must have either the hardware address  (iface.hwaddress),  or
              the network layer?. interface name (iface.net_ifacename), and it must have the driver/transport_name
 ......
 
iscsi interface的定义存放在/var/lib/iscsi/ifaces 中,于是cd /var/lib/iscsi/ifaces
[root@node1 ifaces]# ll -a
total 8
drwxr-xr-x. 2 root root 4096 May 11  2015 .
drwxr-xr-x. 8 root root 4096 Oct 20 05:30 ..
[root@node1 ifaces]# cd ..
[root@node1 iscsi]# cd nodes/
[root@node1 nodes]# ll
drw-------. 4 root root 4096 Oct 20 04:36 iqn.2006-01.com.openfiler:asm.data
drw-------. 4 root root 4096 Oct 20 04:36 iqn.2006-01.com.openfiler:asm.fra
drw-------. 4 root root 4096 Oct 20 04:36 iqn.2006-01.com.openfiler:asm.ocr
drw-------. 4 root root 4096 Oct 19 23:51 iqn.2006-01.com.openfiler:tsn.a5fe1648bc51
[root@node1 nodes]# rm -rf iqn.2006-01.com.openfiler:tsn.a5fe1648bc51
[root@node1 nodes]# ll
drw-------. 4 root root 4096 Oct 20 04:36 iqn.2006-01.com.openfiler:asm.data
drw-------. 4 root root 4096 Oct 20 04:36 iqn.2006-01.com.openfiler:asm.fra
drw-------. 4 root root 4096 Oct 20 04:36 iqn.2006-01.com.openfiler:asm.ocr
[root@node1 nodes]# service iscsi restart
Stopping iscsi:                                            [  OK  ]
Starting iscsi:                                            [  OK  ]

致些报错信息解决
0 0