Connect a storage LUN to a server
Once connected, the storage LUN will be available on the server as an unpartitioned disk space.
Data exchange between the storage LUN and the server occurs via the iSCSI protocol using two independent network interfaces. The LUN acts as an iSCSI target connected to a SAN switch, while the server acts as an iSCSI initiator.
The storage LUN must be connected to each server individually.
- Make sure that you have requested to connect the storage LUN to this server.
- Connect to the server.
- Install the iSCSI initiator. If the server is running Windows OS, proceed to step 4.
- Display information about the iSCSI initiator.
- Request the parameters for connecting the storage LUN to your server.
- Set up an iSCSI connection.
- Configure MPIO.
1. Check the request to connect the storage LUN to the server
Check that you have requested the storage LUN connection to this server in the service order ticket.
If you have not requested a connection for this server, create a ticket. In the ticket, specify the UUID or IP address of the server. You can find it in the control panel: in the top menu, click Products and select Dedicated Servers → Servers → server page → tab Operating System → field IP.
2. Connect to the server
Linux
Windows
Connect to the server via SSH or using the KVM console.
3. Install the iSCSI initiator
Debian and Ubuntu
CentOS
Windows
apt-get update && apt-get install open-iscsi multipath-tools
4. Display information about the iSCSI initiator
Linux
Windows
cat /etc/iscsi/initiatorname.iscsi
5. Request parameters for connecting the storage LUN to the server
-
Create a ticket to request connection parameters for the storage LUN. Include the information about the iSCSI initiator that you obtained during the iSCSI initiator information display.
Request network settings for iSCSI targets and CHAP authentication settings:
- IP addresses of iSCSI targets connected to the SAN switch;
- IP addresses to be configured on the servers for connection to iSCSI targets;
- username (login) and password for CHAP authentication — the same pair is used for all servers.
-
Wait for a response from a Servercore technician.
6. Set up an iSCSI connection
Ubuntu
Debian
CentOS
Windows
All iSCSI connection settings are saved in the iSCSI initiator folder, the /var/lib/iscsi directory.
-
Open the
netplanconfiguration file with thevitext editor:vi /etc/netplan/01-netcfg.yaml -
Set up two network interfaces on the server. Add IP addresses to the network interfaces connected to the SAN switch to gain access to the iSCSI targets:
network:version: 2ethernets:<eth_name_1>:mtu: 9000addresses: [<ip_address_1>/<mask_1>]<eth_name_2>:mtu: 9000addresses: [<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 find it in the ticket;<mask_1>— mask of the first server adapter in the segment for iSCSI. You can find it in the ticket;<ip_address_2>— IP address of the second server network adapter in the segment for iSCSI. You can find it in the ticket;<mask_2>— mask of the subnet of the second server adapter in the segment for iSCSI. You can find it in the ticket.
-
Press the ESC key.
-
Exit the
vitext editor with changes saved::wq -
Apply the configuration:
netplan apply -
Optional: reboot the server.
-
Check the speed of each interface. It should be at least 10 Gbps:
ethtool <eth_name_1> | grep -i speedethtool <eth_name_2> | grep -i speedSpecify
<eth_name_1>and<eth_name_2>— the names of the network interfaces configured in step 2. -
If the speed is lower than 10 Gbps, create a ticket. If the speed is 10 Gbps or higher, proceed to step 9.
-
Check that the iSCSI target is available:
ping -c5 <ip_address_1>ping -c5 <ip_address_2>Specify:
<ip_address_1>— IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>— 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 newiscsiadm -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>— name of the first network interface configured in step 2;<eth_name_2>— name of the second network interface 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>— IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>— 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 targets will appear in the response.
For example:
203.0.113.101:3260,1 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::20000:203.0.113.101203.0.113.102:3260,11 iqn.2006-08.com.huawei:oceanstor:2100d859825625ee::1020000:203.0.113.102Where:
203.0.113.101:3260— 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— 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 for 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 CHAPiscsiadm --mode node -T <IQN_2> -p <ip_address_2> --op update -n node.session.auth.authmethod --value CHAPiscsiadm --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>— IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>— IP address of the second server network adapter in the segment for iSCSI;<username>— username (login) for CHAP authentication. You can find it in the ticket;<password>— password for CHAP authentication. You can find it in the ticket.
-
Log in to the iSCSI target through the 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>— 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.
-
Check that the iSCSI session for each iSCSI target has started:
iscsiadm -m sessionTwo 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 the iSCSI session for each iSCSI target:
iscsiadm -m session -r <session_number_1> --op newiscsiadm -m session -r <session_number_2> --op newSpecify
<session_number_1>and<session_number_2>— the iSCSI session numbers you displayed in step 16. -
Check that the SCSI sessions have been duplicated:
iscsiadm -m sessionFour active iSCSI sessions will appear in the response.
-
Ensure that settings will be applied when the server is restarted:
iscsiadm -m node --loginall=automaticsystemctl enable iscsi.servicesystemctl enable iscsid.service -
For each target, set up two iSCSI sessions that start automatically when the server is restarted:
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>— IP address of the first server network adapter in the segment for iSCSI;<ip_address_2>— IP address of the second server network adapter in the segment for iSCSI;<number_of_sessions>— number of iSCSI sessions that will start automatically when the server is restarted.
-
Optional: reboot the server.
7. Configure MPIO
Configuring MPIO combines multiple I/O paths between the server and the storage LUN into one.
Linux
-
Open the
Device Mapper Multipathconfiguration file with thevitext editor.vi /etc/multipath.conf -
Add a devices section. For the Huawei OceanStor Dorado 5000 V6 storage LUN, we recommend using the parameter values from the example.
Example of a devices section:
devices {device {vendor "HUAWEI"product "XSG1"path_grouping_policy multibuspath_checker turprio constpath_selector "service-time 0"failback immediatedev_loss_tmo 30fast_io_fail_tmo 5no_path_retry 15}} -
Exit the
vitext editor with changes saved::wq -
Enable and start the service:
systemctl enable --now multipathd.servicesystemctl status multipathd -
Check the availability of the storage LUN:
multipath -llA message about the topology of the multipath device connection will appear in the response.