Skip to content

Configure ASM Storage on RHEL 8.10 over iSCSI on a 2 Node Cluster

A detailed guide to create an iSCSI target server on RHEL 8.10 with 3 drives, and share them with two nodes (initiators). The iSCSI targets will be automatically available after reboot.


โœ… Scenario

  • OS: RHEL 8.10 (iSCSI Target server)
  • Disks: 3 block devices (e.g., /dev/sda,/dev/sdb, /dev/sdc, /dev/sdd)
  • iSCSI Initiators: Two nodes (clients) that will connect to the target
  • Goal: Export all 3 drives via iSCSI and ensure they're available post-reboot.

๐Ÿ”ง On the iSCSI Target Server

Step 1: Install Required Packages

sudo dnf install -y targetcli

Step 2: Verify the 3 Disks

Ensure the drives are available:

lsblk
# Example expected output:
/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd

Step 3: Configure iSCSI Targets

Launch targetcli:

sudo targetcli

Now run the following commands inside the targetcli shell:

# Create a new backstore for each disk
/backstores/block create disk1 /dev/sda
/backstores/block create disk2 /dev/sdb
/backstores/block create disk3 /dev/sdc
/backstores/block create disk4 /dev/sdd

# Create an iSCSI target
/iscsi create iqn.2025-07.com.homelab:asmtgt1

# Enter into the target and create a TPG
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1 set attribute authentication=0
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1/luns create /backstores/block/disk1
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1/luns create /backstores/block/disk2
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1/luns create /backstores/block/disk3
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1/luns create /backstores/block/disk4

# Allow access to initiators (use wildcard or restrict to IPs)
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1/acls create iqn.2025-07.com.homelab:node1
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1/acls create iqn.2025-07.com.homelab:node2

# Enable listening on default port
/iscsi/iqn.2025-07.com.homelab:asmtgt1/tpg1/portals create 0.0.0.0 3260

# Save and exit
exit

๐Ÿ” Enable Services to Start on Boot

sudo systemctl enable target
sudo systemctl start target

The config is stored persistently under /etc/rtslib-fb-target/saveconfig.json.


๐Ÿ”’ (Optional) Firewall Configuration

sudo firewall-cmd --permanent --add-port=3260/tcp
sudo firewall-cmd --reload

๐Ÿงช On Each iSCSI Initiator Node (Client)

Step 1: Install the iSCSI initiator tools

sudo dnf install -y iscsi-initiator-utils

Step 2: Set Initiator Name

Edit /etc/iscsi/initiatorname.iscsi on:

  • Node 1:

InitiatorName=iqn.2025-07.com.homelab:node1
* Node 2:

InitiatorName=iqn.2025-07.com.homelab:node2

Then restart the service:

sudo systemctl restart iscsid

Step 3: Discover and Login to Target

sudo iscsiadm -m discovery -t sendtargets -p <TARGET-IP>
sudo iscsiadm -m node -T iqn.2025-07.com.homelab:asmtgt1 -p <TARGET-IP> --login

Make the login persistent:

sudo iscsiadm -m node -T iqn.2025-07.com.homelab:asmtgt1 -p <TARGET-IP> --op update -n node.startup -v automatic

๐Ÿ” Test Persistence

  1. Reboot the iSCSI server.
  2. Reboot both initiator nodes.
  3. Run lsblk on initiator nodes โ€“ you should see /dev/sdX mapped LUNs.

Comments