Document Type | Technical Information
Category | Administration
Applicable Product Versions | 7FS04PS, 6FS07_CS_2005
Document Number | TADTI228
Overview
This is a simple example of setting up an environment for those who need to run and test DBMS in an ISCSI Multipath environment.
Method
Example Configuration Environment
ISCSI consists of a Target server that provides storage and an Initiator that receives the storage.
In this example, since multiple paths need to be established on the same disk, two IPs that the Initiator can communicate with the Target must be prepared on the Target.
If you only plan to allocate storage without configuring Multipath, it is possible to prepare the Target with a single IP.
It is also possible to proceed with partitioned volumes instead of preparing the entire single disk as the Target,
but in this document, a simple environment for Multipath setup is used, so a single disk is allocated as a LUN.
ISCSI Target Setup Goals
Disk Preparation Details
Prepare two 20GB disks mounted as /dev/sdc and /dev/sdb respectively.
Install targetcli package for ISCSI Target setup
yum install targetcli -y
Check installation using the targetcli command
targetcli
<targetcli ls command query result screen>
Create Disk Objects
/> /backstores/block create iscsi_disk01 /dev/sdb /> /backstores/block create iscsi_disk02 /dev/sdc
<Error messages displayed in case of incorrect configuration>
You can verify the addition of disk objects by checking the allocation results with the ls command.
Create IQN
Creating an IQN is the process of making a unique address for the server.
- When creating an IQN, a TPG is created simultaneously.
- TPG stands for Target Portal Group, which is a group of settings that allow initiators to connect to the target.
/iscsi create iqn.2025-10.com.ps1.tibero:server1
You can confirm that the IQN has been assigned by checking the ls results.
Create ACL (Access Control List)
You can specify the list of initiators allowed to access the ISCSI target as an ACL.
Move to tpg1
/> cd /iscsi/iqn.2025-10.com.ps1.tibero:server1/tpg1/
/> acls/ create iqn.2025-10.com.ps1.tibero:client1
Change default portal IP for external access
cd portals delete 0.0.0.0 3260 create 10.0.10.4 3260 create 10.0.10.5 3260
Create LUN
Create a LUN on the initially created disk objects and map it.
This name will be provided to the target.
/> cd /iscsi/iqn.2025-10.com.ps1.tibero:server1/tpg1/
Create LUN using the created disk objects
cd /iscsi/iqn.2025-10.com.ps1.tibero:server1/tpg1/ luns/ create [created volume object name]
/> /iscsi/iqn.20...:server1/tpg1> luns/ create /backstores/block/iscsi_disk01 /> /iscsi/iqn.20...:server1/tpg1> luns/ create /backstores/block/iscsi_disk02
Check Results
- /dev/sdb โ assigned to lun0
- /dev/sdc โ assigned to lun1
- Portals 10.0.10.3, 10.0.10.5 confirmed
Storage can now be allocated from the Initiator using the ISCSI Portal IP and IQN.
Initiator (Client) Setup
The following steps are performed on the Initiator server to enable disk allocation.
Install ISCSI initiator package to receive LUN allocation
yum install iscsi-initiator-utils -y
Enable daemon
systemctl enable --now iscsi iscsid
Check IQN specified on the target
vi /etc/iscsi/initiatorname.iscsi
Edit to the following content
InitiatorName=iqn.2025-10.com.ps1.tibero:client1
Confirm
cat /etc/iscsi/initiatorname.iscsi
Discover target
iscsiadm -m discovery --type sendtargets --portal 10.0.10.3
If necessary, disable firewall
systemctl stop firewalld systemctl disable firewalld
Login to target
iscsiadm -m node -T iqn.2025-10.com.ps1.tibero:server1 --login
Test two paths (connection confirmation)
iscsiadm -m node -T iqn.2025-10.com.ps1.tibero:server1 -l -p 10.0.10.3
iscsiadm -m node -T iqn.2025-10.com.ps1.tibero:server1 -l -p 10.0.10.5
You can see that the same disk is assigned under different names.
lsscsi
Check iscsi sessions
iscsiadm -m session -o show
Confirm that the WWID values of the two devices are the same (meaning the target devices are essentially the same device)
/lib/udev/scsi_id -g -u -d /dev/sdb /lib/udev/scsi_id -g -u -d /dev/sdd
Configure Multipath with the Allocated ISCSI Disks
Install multipath package
yum install device-mapper-multipath -y
Verify installation
multipath -ll
Copy and edit the multipath.conf example file to /etc/multipath.conf
cp /usr/share/doc/device-mapper-multipath/multipath.conf /etc/
vi /etc/multipath.conf
We will group sdb and sdd as one multipath and sdc and sde as another multipath.
[root@localhost ~]# /lib/udev/scsi_id -g -u -d /dev/sdb 36001405f455cae7657d4377812f36455 [root@localhost ~]# /lib/udev/scsi_id -g -u -d /dev/sdd 36001405f455cae7657d4377812f36455 [root@localhost ~]# /lib/udev/scsi_id -g -u -d /dev/sdc 3600140541a58a71120e4102a678cb7ae [root@localhost ~]# /lib/udev/scsi_id -g -u -d /dev/sde 3600140541a58a71120e4102a678cb7ae
On Rocky 9, multipath v0.8.7 is installed, and if a parsing error occurs with wwid "",*
register the entire wwid with a regular expression in the blacklist
If you register in the blacklist by devnode, exceptions cannot be handled by wwid.
devnode blacklist is for exceptions by devnode
wwid blacklist is for exceptions by wwid.
Example configuration
blacklist {
wwid 26353900f02796769
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z]"
}
multipaths {
multipath {
wwid 36001405f455cae7657d4377812f36455
path_grouping_policy multibus
failback manual
rr_weight priorities
no_path_retry 5
}
multipath {
wwid 3600140541a58a71120e4102a678cb7ae
path_grouping_policy multibus
failback manual
rr_weight priorities
no_path_retry 5
}
}
When using user_friendly_names - yes, multipath devices are created using names like mpathX.
Start multipath service
service multipathd start
After starting, you can confirm that devices are grouped as multipath by checking lsblk
lsblk
Check multipath
multipath -ll
Multipath can be confirmed in fdisk
References
[Linux] Device-Mapper multipath detailed settings (multipath.conf parameters)