Connect the storage LUN to the server
Once the LUN is connected, the storage will be available on the server as an unpartitioned disk area.
Data exchange between the storage LUN and the server is performed via iSCSI protocol using two independent network interfaces. The LUN acts as an iSCSI target that is connected to the SAN switch, and the server acts as an iSCSI initiator.
Learn more about iSCSI connectivity in the Selectel iSCSI blog article : How the protocol for organizing NAS is structured.
You must connect the storage LUN separately to each server.
- Make sure that you have requested that the storage LUN connect to this server.
- Connect to the server.
- Install the iSCSI initiator. If Windows is installed on the server, skip to step 4.
- Output information about the iSCSI initiator.
- Query the parameters for connecting the storage LUN to the server.
- Configure the iSCSI connection.
- Configure MPIO.
1. Check the request to connect the storage LUN to the server
Check that in the service order ticket you requested that the storage LUN be connected to this server.
If you have not requested connection of this server, create a ticket. In the ticket, specify the UUID or IP address of the server. You can view it in the Control Panel: in the top menu, click Products and select Dedicated Servers → Servers → Server → Server page → Operating System tab → IP field.
2. Connect to the server
Linux
Windows
3. Install the iSCSI initiator
Debian and Ubuntu
CentOS
Windows
apt-get update && apt-get install open-iscsi multipath-tools
yum install iscsi-initiator-utils device-mapper-multipath
The iSCSI initiator is included in the OS. Go to the iSCSI initiator information output in step 4.
4. Output iSCSI initiator information
Linux
Windows
cat /etc/iscsi/initiatorname.iscsi
-
Run PowerShell as an administrator.
-
Output information about the iSCSI initiator:
Get-Service MSiSCSI | Set-Service -StartupType Automatic
Start-Service MSiSCSI
(Get-InitiatorPort).NodeAddress
5. Request parameters for connecting the storage LUN to the server
-
Create a ticket requesting parameters for connecting the storage LUN to the server.Specify the iSCSI initiator information that you received when you iSCSI initiator information output.
Request network settings for iSCSI-targets and CHAP authentication settings:
- The IP addresses of the iSCSI tags that are connected to the SAN switch;
- IP addresses to be configured on servers to connect to iSCSI targets;
- user name (login) and password for CHAP authentication — the same pair is used for all servers.
-
Wait for a response in the ticket from a Selectel employee.
6. Configure the iSCSI connection
Ubuntu
Debian
CentOS
Windows
All iSCSI connection settings are saved in the iSCSI initiator folder, directory /var/lib/iscsi
.
-
Open the
netplan
utility configuration file with thevi
text editor:vi /etc/netplan/01-netcfg.yaml
-
Configure two network interfaces on the server. Add IP addresses to the network interfaces connected to the SAN switch to access iSCSI targets:
<eth_name_1>:
addresses: [<ip_address_1>/<mask_1>]
<eth_name_2>:
addresses: [<ip_address_2>/<mask_2>]Specify:
<eth_name_1>
— name of the first network interface;<eth_name_2>
— name of the second network interface;<ip_address_1>
— IP address of the first server network adapter in the segment for iSCSI. You can see it in the ticket;<mask_1>
— mask of the first server adapter in the segment for iSCSI. You can see it in the ticket;<ip_address_2>
— IP address of the second server network adapter in the segment for iSCSI. You can see it in the ticket;<mask_2>
— subnet mask of the second server adapter in the segment for iSCSI. You can see it in the ticket.
-
Press the ESC key.
-
Exit the
vi
text editor with your changes saved::wq
-
Apply the configuration:
netplan apply
-
Optional: reboot the server.
-
Check the speed of each interface. It must be at least 10 GBit/sec:
ethtool <eth_name_1> | grep -i speed
ethtool <eth_name_2> | grep -i speedSpecify
<eth_name_1>
and<eth_name_2>
as the names of the network interfaces configured in step 2. -
If the speed is below 10 Gbps, create a ticket. If the speed is greater than or equal to 10 Gbps, go to step 9.
-
Verify that the iSCSI target is available:
ping -c5 <ip_address_1>
ping -c5 <ip_address_2>Specify:
<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI.
-
Create iSCSI interfaces:
iscsiadm -m iface -I <iscsi_eth_name_1> --op new
iscsiadm -m iface -I <iscsi_eth_name_2> --op newSpecify:
<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
-
Bind the iSCSI interfaces to the network interfaces configured in step 2:
iscsiadm -m iface --interface <iscsi_eth_name_1> --op update -n iface.net_ifacename -v <eth_name_1>
iscsiadm -m iface --interface <iscsi_eth_name_2> --op update -n iface.net_ifacename -v <eth_name_2>Specify:
<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface;<eth_name_1>
— the name of the first network interface you configured in step 2;<eth_name_2>
— the name of the second network interface you configured in step 2.
-
Check the availability of the iSCSI target through the iSCSI interfaces:
iscsiadm -m discovery -t sendtargets -p <ip_address_1> --interface <iscsi_eth_name_1>
iscsiadm -m discovery -t sendtargets -p <ip_address_2> --interface <iscsi_eth_name_2>Specify:
<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
A list of iSCSI tags will appear in the response.
For example:
203.0.113.101:3260,1 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101
203.0.113.102:3260,11 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102Here:
203.0.113.101:3260
— The IP address of the first server network adapter in the segment for iSCSI;iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101
— IQN of the first iSCSI target;203.0.113.102:3260
— The IP address of the second server network adapter in the segment for iSCSI;iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102
— IQN of the second iSCSI target.
-
Copy the IQN of each iSCSI target. The IQN (iSCSI Qualified Name) is the full unique identifier of the iSCSI device.
-
Configure CHAP authentication on the iSCSI initiator:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.auth.authmethod --value CHAP
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.auth.authmethod --value CHAP
iscsiadm --mode node -T <IQN_1> --op update -n node.session.auth.username --value <username>
iscsiadm --mode node -T <IQN_2> --op update -n node.session.auth.username --value <username>
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.auth.password --value <password>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.auth.password --value <password>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<username>
— username (login) for CHAP authentication. You can see it in the ticket;<password>
— password for CHAP authentication. You can see it in the ticket.
-
Authorize on the iSCSI target through iSCSI interfaces:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --login --interface <iscsi_eth_name_1>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --login --interface <iscsi_eth_name_2>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
-
Verify that the iSCSI session for each iSCSI target has started:
iscsiadm -m session
Two active iSCSI sessions will appear in the response. For example:
tcp: [5] 203.0.113.101:3260,1 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101 (non-flash)
tcp: [6] 203.0.113.102:3260,11 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102 (non-flash)Here
[5]
and[6]
are the iSCSI session numbers. -
Duplicate an iSCSI session for each iSCSI target:
iscsiadm -m session -r <session_number_1> --op new
iscsiadm -m session -r <session_number_2> --op newSpecify
<session_number_1>
and<session_number_2>
, which are the iSCSI session numbers that you derived in step 16. -
Verify that the SCSI sessions are backed up:
iscsiadm -m session
Four active iSCSI sessions will appear in the response.
-
Make sure that when the server restarts, the settings will be applied:
iscsiadm -m node --loginall=automatic
systemctl enable iscsi.service
systemctl enable iscsid.service -
For each target, set up two iSCSI sessions that start automatically when the server reboots:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.nr_sessions --value <number_of_sessions>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.nr_sessions --value <number_of_sessions>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<number_of_sessions>
— number of iSCSI sessions that will be started automatically when the server is rebooted.
-
Optional: reboot the server.
All iSCSI connection settings are saved in the iSCSI initiator folder, directory /var/lib/iscsi
.
-
Open the network interfaces configuration file with the
vi
text editor:vi /etc/network/interfaces
-
Configure two network interfaces on the server. Add IP addresses to the network interfaces connected to the SAN switch to access iSCSI targets:
auto <eth_name_1> <eth_name_2>
iface <eth_name_1> inet static
address <ip_address_1>/<mask_1>
iface <eth_name_2> inet static
address <ip_address_2>/<mask_2>Specify:
<eth_name_1>
— name of the first network interface;<eth_name_2>
— name of the second network interface;<ip_address_1>
— IP address of the first server network adapter in the segment for iSCSI. You can see it in the ticket;<mask_1>
— mask of the first server adapter in the segment for iSCSI. You can see it in the ticket;<ip_address_2>
— IP address of the second server network adapter in the segment for iSCSI. You can see it in the ticket;<mask_2>
— subnet mask of the second server adapter in the segment for iSCSI. You can see it in the ticket.
-
Press the ESC key.
-
Exit the
vi
text editor with your changes saved::wq
-
Restart the network:
service networking restart
-
Optional: reboot the server.
-
Check the speed of each interface. It must be at least 10 GBit/sec:
ethtool <eth_name_1> | grep -i speed
ethtool <eth_name_2> | grep -i speedSpecify
<eth_name_1>
and<eth_name_2>
as the names of the network interfaces configured in step 2. -
If the speed is below 10 Gbps, create a ticket. If the speed is greater than or equal to 10 Gbps, go to step 9.
-
Verify that the iSCSI target is available:
ping -c5 <ip_address_1>
ping -c5 <ip_address_2>Specify:
<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI.
-
Create iSCSI interfaces:
iscsiadm -m iface -I <iscsi_eth_name_1> --op new
iscsiadm -m iface -I <iscsi_eth_name_2> --op newSpecify:
<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
-
Bind the iSCSI interfaces to the network interfaces configured in step 2:
iscsiadm -m iface --interface <iscsi_eth_name_1> --op update -n iface.net_ifacename -v <eth_name_1>
iscsiadm -m iface --interface <iscsi_eth_name_2> --op update -n iface.net_ifacename -v <eth_name_2>Specify:
<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface;<eth_name_1>
— the name of the first network interface you configured in step 2;<eth_name_2>
— the name of the second network interface you configured in step 2.
-
Check the availability of the iSCSI target through the iSCSI interfaces:
iscsiadm -m discovery -t sendtargets -p <ip_address_1> --interface <iscsi_eth_name_1>
iscsiadm -m discovery -t sendtargets -p <ip_address_2> --interface <iscsi_eth_name_2>Specify:
<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
A list of iSCSI tags will appear in the response.
For example:
203.0.113.101:3260,1 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101
203.0.113.102:3260,11 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102Here:
203.0.113.101:3260
— The IP address of the first server network adapter in the segment for iSCSI;iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101
— IQN of the first iSCSI target;203.0.113.102:3260
— The IP address of the second server network adapter in the segment for iSCSI;iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102
— IQN of the second iSCSI target.
-
Copy the IQN of each iSCSI target. The IQN (iSCSI Qualified Name) is the full unique identifier of the iSCSI device.
-
Configure CHAP authentication on the iSCSI initiator:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.auth.authmethod --value CHAP
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.auth.authmethod --value CHAP
iscsiadm --mode node -T <IQN_1> --op update -n node.session.auth.username --value <username>
iscsiadm --mode node -T <IQN_2> --op update -n node.session.auth.username --value <username>
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.auth.password --value <password>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.auth.password --value <password>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<username>
— username (login) for CHAP authentication. You can see it in the ticket;<password>
— password for CHAP authentication. You can see it in the ticket.
-
Authorize on the iSCSI target through iSCSI interfaces:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --login --interface <iscsi_eth_name_1>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --login --interface <iscsi_eth_name_2>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
-
Verify that the iSCSI session for each iSCSI target has started:
iscsiadm -m session
Two active iSCSI sessions will appear in the response. For example:
tcp: [5] 203.0.113.101:3260,1 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101 (non-flash)
tcp: [6] 203.0.113.102:3260,11 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102 (non-flash)Here
[5]
and[6]
are the iSCSI session numbers. -
Duplicate an iSCSI session for each iSCSI target:
iscsiadm -m session -r <session_number_1> --op new
iscsiadm -m session -r <session_number_2> --op newSpecify
<session_number_1>
and<session_number_2>
, which are the iSCSI session numbers that you derived in step 16. -
Verify that the SCSI sessions are backed up:
iscsiadm -m session
Four active iSCSI sessions will appear in the response.
-
Make sure that when the server restarts, the settings will be applied:
iscsiadm -m node --loginall=automatic
systemctl enable iscsi.service
systemctl enable iscsid.service -
For each target, set up two iSCSI sessions that start automatically when the server reboots:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.nr_sessions --value <number_of_sessions>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.nr_sessions --value <number_of_sessions>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<number_of_sessions>
— number of iSCSI sessions that will be started automatically when the server is rebooted.
-
Optional: reboot the server.
All iSCSI connection settings are saved in the iSCSI initiator folder, directory /var/lib/iscsi
.
-
Output information about the network interfaces:
ip address
-
Create a configuration file for the first network interface connected to the SAN switch IP address to access the iSCSI target:
vi /etc/sysconfig/network-scripts/ifcfg-<eth_name_1>
Specify
<eth_name_1>
is the name of the first network interface. -
Add or change the values of the network interface settings:
NAME="<eth_name_1>"
ONBOOT=yes
BOOTPROTO=none
IPADDR="<ip_address_1>"
NETMASK="<mask_1>"Specify:
<eth_name_1>
— name of the first network interface;<ip_address_1>
— IP address of the first server network adapter in the segment for iSCSI. You can see it in the ticket;<mask_1>
— mask of the first server adapter in the segment for iSCSI. You can see it in the ticket.
-
Press the ESC key.
-
Exit the
vi
text editor with your changes saved::wq
-
Create a configuration file for the second network interface connected to the SAN switch IP address to access the iSCSI target:
vi /etc/sysconfig/network-scripts/ifcfg-<eth_name_2>
Specify
<eth_name_2>
is the name of the second network interface. -
Add or change the values of the network interface settings:
NAME="<eth_name_2>"
ONBOOT=yes
BOOTPROTO=none
IPADDR="<ip_address_2>"
NETMASK="<mask_2>"Specify:
<eth_name_2>
— name of the second network interface;<ip_address_2>
— IP address of the second server network adapter in the segment for iSCSI. You can see it in the ticket;<mask_2>
— subnet mask of the second server adapter in the segment for iSCSI. You can see it in the ticket.
-
Press the ESC key.
-
Exit the
vi
text editor with your changes saved::wq
-
Restart the network:
systemctl restart network
-
Optional: reboot the server.
-
Check the speed of each interface. It must be at least 10 GBit/sec:
ethtool <eth_name_1> | grep -i speed
ethtool <eth_name_2> | grep -i speedSpecify
<eth_name_1>
and<eth_name_2>
as the names of the network interfaces configured in step 2 and 6. -
If the speed is below 10 Gbps, create a ticket. If the speed is greater than or equal to 10 Gbps, go to step 14.
-
Verify that the iSCSI target is available:
ping -c5 <ip_address_1>
ping -c5 <ip_address_2>Specify:
<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI.
-
Create iSCSI interfaces:
iscsiadm -m iface -I <iscsi_eth_name_1> --op new
iscsiadm -m iface -I <iscsi_eth_name_2> --op newSpecify:
<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
-
Bind the iSCSI interfaces to the network interfaces configured in step 2 and 6:
iscsiadm -m iface --interface <iscsi_eth_name_1> --op update -n iface.net_ifacename -v <eth_name_1>
iscsiadm -m iface --interface <iscsi_eth_name_2> --op update -n iface.net_ifacename -v <eth_name_2>Specify:
<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface;<eth_name_1>
— the name of the first network interface you configured in step 3;<eth_name_2>
— the name of the second network interface you configured in step 7.
-
Check the availability of the iSCSI target through the iSCSI interfaces:
iscsiadm -m discovery -t sendtargets -p <ip_address_1> --interface <iscsi_eth_name_1>
iscsiadm -m discovery -t sendtargets -p <ip_address_2> --interface <iscsi_eth_name_2>Specify:
<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
A list of iSCSI tags will appear in the response.
For example:
203.0.113.101:3260,1 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101
203.0.113.102:3260,11 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102Here:
203.0.113.101:3260
— The IP address of the first server network adapter in the segment for iSCSI;iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101
— IQN of the first iSCSI target;203.0.113.102:3260
— The IP address of the second server network adapter in the segment for iSCSI;iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102
— IQN of the second iSCSI target.
-
Copy the IQN of each iSCSI target. The IQN (iSCSI Qualified Name) is the full unique identifier of the iSCSI device.
-
Configure CHAP authentication on the iSCSI initiator:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.auth.authmethod --value CHAP
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.auth.authmethod --value CHAP
iscsiadm --mode node -T <IQN_1> --op update -n node.session.auth.username --value <username>
iscsiadm --mode node -T <IQN_2> --op update -n node.session.auth.username --value <username>
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.auth.password --value <password>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.auth.password --value <password>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<username>
— username (login) for CHAP authentication. You can see it in the ticket;<password>
— password for CHAP authentication. You can see it in the ticket.
-
Authorize on the iSCSI target through iSCSI interfaces:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --login --interface <iscsi_eth_name_1>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --login --interface <iscsi_eth_name_2>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<iscsi_eth_name_1>
— name of the first iSCSI interface;<iscsi_eth_name_2>
— name of the second iSCSI interface.
-
Verify that the iSCSI session for each iSCSI target has started:
iscsiadm -m session
Two active iSCSI sessions will appear in the response. For example:
tcp: [5] 203.0.113.101:3260,1 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101 (non-flash)
tcp: [6] 203.0.113.102:3260,11 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102 (non-flash)Here
[5]
and[6]
are the iSCSI session numbers. -
Duplicate an iSCSI session for each iSCSI target:
iscsiadm -m session -r <session_number_1> --op new
iscsiadm -m session -r <session_number_2> --op newSpecify
<session_number_1>
and<session_number_2>
, which are the iSCSI session numbers that you derived in step 21. -
Verify that the SCSI sessions are backed up:
iscsiadm -m session
Four active iSCSI sessions will appear in the response.
-
Make sure that when the server restarts, the settings will be applied:
iscsiadm -m node --loginall=automatic
systemctl enable iscsi.service
systemctl enable iscsid.service -
For each target, set up two iSCSI sessions that start automatically when the server reboots:
iscsiadm --mode node -T <IQN_1> -p <ip_address_1> --op update -n node.session.nr_sessions --value <number_of_sessions>
iscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.nr_sessions --value <number_of_sessions>Specify:
<IQN_1>
— IQN of the first iSCSI target;<IQN_2>
— IQN of the second iSCSI target;<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<number_of_sessions>
— number of iSCSI sessions that will be started automatically when the server is rebooted.
-
Optional: reboot the server.
-
Check to see if MPIO is installed on your server:
Get-WindowsFeature -Name Multipath-IO
Example output if MPIO is installed:
Display Name Name Install State
------------ ---- --------------
[X] Multipath I/O Multipath-IO Installed -
If MPIO is installed on the server, uninstall it:
Remove-WindowsFeature -Name Multipath-IO
-
Download and install UltraPath for Windows is a software from Huawei for managing multipathing access to storage.UltraPath is used to provide fault tolerance and load balancing when accessing disk arrays over a SAN network.For more information, see the OceanStor UltraPath for Windows documentation.
-
Restart the server.
-
Run PowerShell as an administrator.
-
Configure two network interfaces on the server. Add the IP addresses of the iSCSI TARGETs that are connected to the SAN switch to the network interfaces:
Get-NetIPInterface
New-NetIPAddress -InterfaceAlias "<eth_name_1>" -IPAddress <ip_address_1> -PrefixLength <mask_1>
New-NetIPAddress -InterfaceAlias "<eth_name_2>" -IPAddress <ip_address_2> -PrefixLength <mask_2>Specify:
<eth_name_1>
— name of the first network interface;<eth_name_2>
— name of the second network interface;<ip_address_1>
— IP address of the first server network adapter in the segment for iSCSI. Can be viewed in the ticket;<mask_1>
— mask of the first server adapter in the segment for iSCSI. You can look it up in ticket;<ip_address_2>
— IP address of the second server network adapter in the segment for iSCSI. Can be viewed in the ticket;<mask_2>
— subnet mask of the second server adapter in the segment for iSCSI. You can look it up in the ticket.
-
Verify that the speed of each interface is at least 10 GBit/sec:
Get-NetAdapter | Where-Object { $_.Name -eq "<eth_name_1>" } | Select-Object -Property Name,LinkSpeed
Get-NetAdapter | Where-Object { $_.Name -eq "<eth_name_2>" } | Select-Object -Property Name,LinkSpeedSpecify
<eth_name_1>
and<eth_name_2>
as the names of the network interfaces configured in step 6. -
If the speed is below 10 Gbps, create a ticket.
-
Check that the targeting is available:
ping <ip_address_1>
ping <ip_address_2>Specify:
<ip_address_1>
— IP address of the first server network adapter in the segment for iSCSI. You can see it in the ticket;<ip_address_2>
— IP address of the second server network adapter in the segment for iSCSI. You can see it in the ticket.
-
ConnectiSCSI target portals:
New-IscsiTargetPortal -TargetPortalAddress <ip_address_portal_1> -TargetPortalPortNumber 3260 -InitiatorPortalAddress <ip_address_1>
New-IscsiTargetPortal -TargetPortalAddress <ip_address_portal_2> -TargetPortalPortNumber 3260 -InitiatorPortalAddress <ip_address_2>Specify:
<ip_address_1>
— The IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>
— The IP address of the second server network adapter in the segment for iSCSI;<ip_address_portal_1>
— IP address of the first iSCSI targeting portal. Can be viewed in the ticket;<ip_address_portal_2>
— IP address of the second iSCSI targeting portal. You can see it in the ticket.
-
Output a list of targets:
Get-IscsiTarget
-
Configure authentication on the target through iSCSI interfaces:
$iusr="<username>"
$ipasswd="<password>"
$sts=$(Get-IscsiTarget | Select-Object -ExpandProperty NodeAddress)
foreach ($st in $sts) {
$tpaddr=($st -split ":")[-1]
Connect-IscsiTarget -NodeAddress $st -TargetPortalAddress $tpaddr -TargetPortalPortNumber 3260 -IsPersistent $true -AuthenticationType ONEWAYCHAP -ChapUsername $iusr -ChapSecret $ipasswd
}Specify:
<username>
— username (login) for CHAP authentication. You can see it in the ticket;<password>
— password for CHAP authentication. You can see it in the ticket.
-
Output a list of targets:
Get-IscsiTarget
Example output:
IsConnected NodeAddress PSComputerName
----------- ----------- --------------
True iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101
True iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020001:203.0.113.102 -
Make sure that
IsConnected is
set toTrue
. -
Start UltraPath Concole.
-
In the navigation tree, select Host → Disk array.
-
Select a disk array LUN.
-
Make sure that the LUN is accessible via two paths: select the disk and open the Path tab.
7. Customize MPIO
MPIO configuration combines multiple I/O routes between the server and the storage LUN into one.
Linux
-
Open the configuration file of the
Device Mapper Multipath
utility with thevi
text editor:vi /etc/multipath.conf
-
Add the devices section. For the LUN of the Huawei OceanStor Dorado 5000 V6 storage system, we recommend using the parameter values from the example.
Example of a devices section:
devices {
device {
vendor "HUAWEI"
product "XSG1"
path_grouping_policy multibus
path_checker tur
prio const
path_selector "service-time 0"
failback immediate
dev_loss_tmo 30
fast_io_fail_tmo 5
no_path_retry 15
}
} -
Exit the
vi
text editor with your changes saved::wq
-
Activate and start the service:
systemctl enable --now multipathd.service
systemctl status multipathd -
Check the availability of the storage LUN:
multipath -ll
The response will display a message about the connection topology of the multipath device.