Configure host-side networking
To configure host-side networking, you must perform several steps.
You configure iSCSI networking on the host side by setting the number of node sessions per physical path, turning on the appropriate iSCSI services, configuring the network for the iSCSI ports, creating iSCSI face bindings, and establishing the iSCSI sessions between initiators and targets.
In most cases, you can use the inbox software-initiator for iSCSI CNA/NIC. You do not need to download the latest driver, firmware, and BIOS. Refer to the NetApp Interoperability Matrix Tool to determine code requirements.
-
Check the
node.session.nr_sessions
variable in the /etc/iscsi/iscsid.conf file to see the default number of sessions per physical path. If necessary, change the default number of sessions to one session.node.session.nr_sessions = 1
-
Change the
node.session.timeo.replacement_timeout
variable in the /etc/iscsi/iscsid.conf file to20
, from a default value of120
.node.session.timeo.replacement_timeout = 20
-
Optionally, you can set
node.startup = automatic
in /etc/iscsi/iscsid.conf before running anyiscsiadm
commands to have sessions persist after reboot. -
Make sure
iscsid
and(open-)iscsi
services are on and enabled for boot.# systemctl start iscsi # systemctl start iscsid # systemctl enable iscsi # systemctl enable iscsid
-
Get the host IQN initiator name, which will be used to configure the host to an array.
# cat /etc/iscsi/initiatorname.iscsi
-
Configure the network for iSCSI ports. These are example instructions for RHEL and SLES:
In addition to the public network port, iSCSI initiators should use two or more NICs on separate private segments or vLANs. -
Determine the iSCSI port names using the
ifconfig -a
command. -
Set the IP address for the iSCSI initiator ports. The initiator ports should be present on the same subnet as the iSCSI target ports.
Red Hat Enterprise Linux 7 and 8 (RHEL 7 and RHEL 8)
Create the example file
/etc/sysconfig/network-scripts/ifcfg-<NIC port>
with the following contents.TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no NAME=<NIC port> UUID=<unique UUID> DEVICE=<NIC port> ONBOOT=yes IPADDR=192.168.xxx.xxx PREFIX=24 NETMASK=255.255.255.0 NM_CONTROLLED=no MTU=
Optional additions with regards to IPv6:
IPV6INIT=yes IPV6_AUTOCONF=no IPV6ADDR=fdxx::192:168:xxxx:xxxx/32 IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=eui64
Red Hat Enterprise Linux 9 (RHEL 9)
Use the
nmtui
tool to activate and edit a connection. The tool will generate a<NIC port>.nmconnection
file within/etc/NetworkManager/system-connections/
.SUSE Linux Enterprise Server 12 and 15 (SLES 12 and SLES 15)
Create the example file
/etc/sysconfig/network/ifcfg-<NIC port>
with the following contents.IPADDR='192.168.xxx.xxx/24' BOOTPROTO='static' STARTMODE='auto'
Optional addition with regards to IPv6:
IPADDR_0='fdxx::192:168:xxxx:xxxx/32'
Be sure to set the address for both iSCSI initiator ports. -
Restart network services.
# systemctl restart network
-
Make sure the Linux server can ping all of the iSCSI target ports.
-
-
Establish the iSCSI sessions between initiators and targets (four total) by one of two methods.
-
(Optional) When using ifaces, configure the iSCSI interfaces by creating two iSCSI iface bindings.
# iscsiadm -m iface -I iface0 -o new # iscsiadm -m iface -I iface0 -o update -n iface.net_ifacename -v <NIC port1>
# iscsiadm -m iface -I iface1 -o new # iscsiadm -m iface -I iface1 -o update -n iface.net_ifacename -v <NIC port2>
To list the interfaces, use iscsiadm -m iface
. -
Discover iSCSI targets. Save the IQN (it will be the same with each discovery) in the worksheet for the next step.
Method 1 (with ifaces)
# iscsiadm -m discovery -t sendtargets -p <target_ip_address>:<target_tcp_listening_port> -I iface0 # iscsiadm -m discovery -t sendtargets -p 192.168.0.1:3260 -I iface0
Method 2 (without ifaces)
# iscsiadm -m discovery -t sendtargets -p <target_ip_address>:<target_tcp_listening_port> # iscsiadm -m discovery -t sendtargets -p 192.168.0.1:3260
The IQN looks like the following: iqn.1992-01.com.netapp:2365.60080e50001bf1600000000531d7be3
-
Create the connection between the iSCSI initiators and iSCSI targets.
Method 1 (with ifaces)
# iscsiadm -m node -T <target_iqn> -p <target_ip_address>:<target_tcp_listening_port> -I iface0 -l # iscsiadm -m node -T iqn.1992-01.com.netapp:2365.60080e50001bf1600000000531d7be3 -p 192.168.0.1:3260 -I iface0 -l
Method 2 (without ifaces)
# iscsiadm -m node -L all
-
List the iSCSI sessions established on the host.
# iscsiadm -m session
-