命令: iscsiadm -m discovery -t sendtargets -p dx-it-iscsi-target06 --login
报错1:
iscsiadm: Could not scan
/sys/class/iscsi_transport
.
iscsiadm: Could not scan
/sys/class/iscsi_transport
.
iscsiadm: can not connect to iSCSI daemon (111)!
iscsiadm: Cannot perform discovery. Initiatorname required.
iscsiadm: Discovery process to 10.188.16.155:3260 failed to create a discovery session.
iscsiadm: Could not perform SendTargets discovery.
原因:没有启动iscsi服务:
解决办法:
/etc/init.d/open-iscsi status
/etc/init.d/open-iscsi start
命令: iscsiadm -m discovery -t sendtargets -p dx-it-iscsi-target06 --login
报错2:
10.32.209.115:3260,1 iqn.2017-02.com.sankuai:dx-it.target0
10.32.209.115:3260,1 iqn.2017-02.com.sankuai:dx-it.target0
Logging in to [iface: eth3, target: iqn.2017-02.com.sankuai:dx-it.target0, portal: 10.32.209.115,3260]
Logging in to [iface: eth2, target: iqn.2017-02.com.sankuai:dx-it.target0, portal: 10.32.209.115,3260]
iscsiadm: Could not login to [iface: eth3, target: iqn.2017-02.com.sankuai:dx-it.target0, portal: 10.32.209.115,3260]:
iscsiadm: initiator reported error (4 - encountered connection failure)
iscsiadm: Could not login to [iface: eth2, target: iqn.2017-02.com.sankuai:dx-it.target0, portal: 10.32.209.115,3260]:
iscsiadm: initiator reported error (4 - encountered connection failure)
解决办法:rm /etc/iscsi/ifaces/eth*
挂载成功如下:
# iscsiadm -m discovery -t sendtargets -p dx-it-iscsi-target06 --login
10.32.209.115:3260,1 iqn.2017-02.com.sankuai:dx-it.target0
Logging in to [iface: default, target: iqn.2017-02.com.sankuai:dx-it.target0, portal: 10.32.209.115,3260]
Login to [iface: default, target: iqn.2017-02.com.sankuai:dx-it.target0, portal: 10.32.209.115,3260]: successful