发现成功:
[root @ ncdqd0110 iqn.11351.com.xxx:AAA]# iscsiadm -m Discoverydb -t sendtargets -p 127.0.0.1:54541 --discover
127.0.0.1:54541,-1 iqn.2495.com.xxx:AAA
登录失败:
[root @ ncdqd0110〜]#iscsiadm --mode node --target iqn.2495.com.xxx:AAA --portal 127.0.0.1:54541 --login
登录到[iface:默认值,目标:iqn.2495.com.xxx:AAA,门户网站:127.0.0.1,54541](多个)
iscsiadm:无法登录[iface:默认,目标:iqn.2495.com.xxx:AAA,门户:127.0.0.1,54541]。
iscsiadm:启动程序报告错误(8-连接超时)
iscsiadm:无法登录所有门户
这是在Redhat v7.0中发生的。在Suse中可以正常工作。
以下是一些命令的结果:
[root @ ncdqd0110 iqn.2495.com.xxx:AAA]# netstat -rn
内核IP路由表
目标网关Genmask标志MSS窗口irtt Iface
0.0.0.0 10.31.224.1 0.0.0.0 UG 0 0 0 eno16780032
10.31.224.0 0.0.0.0 255.255.252.0 U 0 0 0 eno16780032
[root @ ncdqd0110〜]#IP路由显示
默认通过10.31.224.1 dev eno16780032 proto静态指标1024
10.31.224.0/22 dev eno16780032原始内核范围链接src 10.31.227.110
开始记录6.2.0.873-21
node.name = iqn.2495.com.xxx:AAA
node.tpgt = -1
node.startup =自动
node.leading_login =否
iface.net_ifacename = eno16780032
iface.iscsi_ifacename =默认
iface.transport_name = TCP
iface.vlan_id = 0
iface.vlan_priority = 0
iface.iface_num = 0
iface.mtu = 0
iface.port = 0
iface.tos = 0
iface.ttl = 0
iface.tcp_wsf = 0
iface.tcp_timer_scale = 0
iface.def_task_mgmt_timeout = 0
iface.erl = 0
iface.max_receive_data_len = 0
iface.first_burst_len = 0
iface.max_outstanding_r2t = 0
iface.max_burst_len = 0
node.discovery_address = 127.0.0.1
node.discovery_port = 54541
node.discovery_type = send_targets
node.session.initial_cmdsn = 0
node.session.initial_login_retry_max = 8
node.session.xmit_thread_priority = -20
node.session.cmds_max = 128
node.session.queue_depth = 32
node.session.nr_sessions = 1
node.session.auth.authmethod =无
node.session.timeo.replacement_timeout = 120
node.session.err_timeo.abort_timeout = 15
node.session.err_timeo.lu_reset_timeout = 30
node.session.err_timeo.tgt_reset_timeout = 30
node.session.err_timeo.host_reset_timeout = 60
node.session.iscsi.FastAbort =是
node.session.iscsi.InitialR2T =否
node.session.iscsi.ImmediateData =是
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.session.iscsi.DefaultTime2Retain = 0
node.session.iscsi.DefaultTime2Wait = 2
node.session.iscsi.MaxConnections = 1
node.session.iscsi.MaxOutstandingR2T = 1
node.session.iscsi.ERL = 0
node.conn [0]。地址= 127.0.0.1
node.conn [0] .port = 54541
node.conn [0] .startup =手动
node.conn [0] .tcp.window_size = 524288
node.conn [0] .tcp.type_of_service = 0
node.conn [0] .timeo.logout_timeout = 15
node.conn [0] .timeo.login_timeout = 15
node.conn [0] .timeo.auth_timeout = 45
node.conn [0] .timeo.noop_out_interval = 5
node.conn [0] .timeo.noop_out_timeout = 5
node.conn [0] .iscsi.MaxXmitDataSegmentLength = 0
node.conn [0] .iscsi.MaxRecvDataSegmentLength = 262144
node.conn [0] .iscsi.HeaderDigest =无
node.conn [0] .iscsi.IFMarker =否
node.conn [0] .iscsi.OFMarker =否
结束记录
如果有人知道此问题,请告诉我如何解决此问题。
最佳答案
这似乎是SELinux策略的选择。发现会话在iscsiadm内运行,但是iscsid受其可以连接到的端口的限制。
一种选择是使用来自policycoreutils的audit2why / audit2allow utils创建本地策略模块,从而扩展了默认系统SELinux策略以允许此操作。
关于linux - iscsiadm除3260之外无法登录任何端口,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34805686/