Preparing for Storage Resources (iSCSI)
Scenarios
In the scenario where KunLun servers are highly available, iSCSI disks can be used as SBD volumes for storage. Perform operations in this section only in this scenario. In this scenario, three ECSs are required and must belong to the same ECS group. Each ECS is bound to a SCSI disk and iSCSI configuration is required for SBD. Table 1 lists the ECS specifications.
Prerequisites
You have created three ECSs.
Procedure
Software installation
Before installing the software, update the software source. To do so, run the following command:
zypper ar --refresh Software source network address
The open-iscsi version must be 2.0.873-46.10.1, the yast2-iscsi-lio-server version must be 3.1.19-4.5, and the targetcli version must be 2.1-17.1.
- Run the following command to install open-iscsi on the server side (three ECSs):
zypper in open-iscsi yast2-iscsi-lio-server targetcli
- Run the following command to install open-iscsi on the client side (SAP HANA node):
zypper in open-iscsi
Server side configuration
- Log in to a server side ECS.
- Run the following commands to configure automatic service startup:
systemctl enable targetcli
systemctl enable target
- Run the following command to create an Iblock device named stonith_bd using the drive letter /dev/sda:
targetcli /backstores/iblock create stonith_bd /dev/sda
/dev/sda is the drive letter of the data volume. Set it based on the actual condition.
- Query the iSCSI IQN.
iscsi-iname
Information similar to the following is displayed:iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5
- Create a target using the queried IQN.
targetcli /iscsi create Queried IQN
Information similar to the following is displayed:
server:~ # targetcli /iscsi create iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5 Created target iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5. Selected TPG Tag 1. Created TPG 1.
- Run the following command to create a LUN:
targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1/luns create /backstores/iblock/stonith_bd
Information similar to the following is displayed:
server:~ # targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1/luns create /backstores/fileio/stonith_bd Selected LUN 0. Created LUN 0.
- iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5 is the ID of iqn, which can be queried by running the targetcli ls command.
- /backstores/iblock/stonith_bd is the Iblock device created in 5.
- Run the following command to create a portal:
targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1/portals create
Information similar to the following is displayed:
server:~ # targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1/portals create Using default IP port 3260 Automatically selected IP address 192.168.124.10. Created network portal 192.168.124.10:3260.
/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5 is the ID of iqn.
- Create an ACL.
- Run the following command to view the initiatorname.iscsi file and obtain value of InitiatorName:
cat /etc/iscsi/initiatorname.iscsi
server:~ #cat /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.1996-04.de.suse:01:f3cdb3b6ea6a
- Run the following command to create an ACL using the value of InitiatorName:
targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1/acls create iqn.1996-04.de.suse:01:f3cdb3b6ea6a
Information similar to the following is displayed:
server:~ # targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1/acls create iqn.1996-04.de.suse:01:f3cdb3b6ea6a Created Node ACL for iqn.1996-04.de.suse:01:f3cdb3b6ea6a Created mapped LUN 0.
- Run the following command to view the initiatorname.iscsi file and obtain value of InitiatorName:
- Run the following command to disable the authentication:
targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1 set attribute authentication=0
Information similar to the following is displayed:
server:~ # targetcli /iscsi/iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5/tpg1 set attribute authentication=0 Parameter authentication is now '0'.
- Run the following command to save the configuration:
targetcli saveconfig
If an error is reported, locate the error, delete .aslist (), and save the configuration.
- Log in to the other two ECSs of the server side one by one and repeat 4 to 12 to configure the server side.
Client side configuration
- Log in to an SAP HANA node (client side) and attach the iSCSI disk of a server side ECS to the SAP HANA node.
iscsiadm -m discovery -t sendtargets -p 10.0.3.250:3260
iscsiadm -m node -p 10.0.3.250:3260 --login
- 10.0.3.250 is the IP address of the server side ECS and 3260 is the default port number of iSCSI.
- Attach three iSCSI disks of three server side ECSs to the SAP HANA node.
- You can run the fdisk –l command to view the newly attached disks.
- Run the following command to attach iSCSI disks automatically once the SAP HANA node starts:
iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5 -p 10.0.3.250 --op update -n node.startup -v automatic
- iqn.2003-01.org.linux-iscsi.scsi-0003.x8664:sn.38370da481a5 is the ID of iqn
- 10.0.3.250 is the IP address of a server side ECS.
- Log in to other SAP HANA nodes and repeat 14 to 15 to configure all SAP HANA nodes of the client side.
Last Article: Configuring Mapping Between Hostnames and IP Addresses
Next Article: Preparing for Storage Resources (DESS)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.