Part 2 – Create a Centralised iSCSI SAN for the Storage Scale Lab

A while back i wrote an article of how setup Create Centralized iSCSI SAN on Linux and that was on a rhel build so we will now use the same config and apply to our Ubuntu based servers

ISCSI is an Internet Protocol that allows multiple servers and users to access network drives remotely over a TCP/IP network by setting up a shared storage network and this works great for a Scale Lab.

As part of this assignment, I’ve connected a second disk (/dev/sdb) to my iSCSI target server sitea-san. We will carve it into 11 LUNs and attach them to our servers sitea-mgmt01, sitea-nsd01 and sitea-nsd02, which will form an IBM Storage Scale cluster in subsequent chapters. The SAN listens on its own storage network, 172.16.17.19, kept apart from the management network.

Installing iSCSI Target

Open the terminal and use the apt command to install targetcli, the tool to add, monitor and remove iSCSI storage interconnects.

root@sitea-san:~# apt install targetcli-fb -y

Start and enable the target service on boot time.

root@sitea-san:~# systemctl enable --now rtslib-fb-targetctl

The Ubuntu firewall is disabled by default. If ufw is enabled on your host, open port 3260.

root@sitea-san:~# ufw allow 3260/tcp

View the targetcli layout using the below command.

root@sitea-san:~# targetcli
/> ls

Workflow for creating an iSCSI target

To configure an iSCSI target, we will need the following details

  • iSCSI target with a unique IQN.
  • iSCSI Backstore – a storage object that defines the resources that the backstore uses.
  • Create iSCSI Portal.
  • Set up iSCSI LUN.
  • Creating an iSCSI ACL.
  • Setup CHAP Authentication if required (not used in this lab).

This time our backstores are files rather than whole disks, so first create a filesystem on the second disk to hold them, and mount it under /san.

root@sitea-san:~# mkfs.ext4 -L san /dev/sdb
root@sitea-san:~# mkdir /san
root@sitea-san:~# echo 'LABEL=san /san ext4 defaults 0 2' >> /etc/fstab
root@sitea-san:~# mount /san

Navigate to the iSCSI directory and run the create command to create an IQN.

/> cd /iscsi
/iscsi> create iqn.2026-10.lab.sitea:san

Create a fileio storage object

A fileio backstore is a file on the filesystem that is presented as a disk. Navigate to the fileio directory of the backstores and create one for each LUN. write_back=false makes sure every write lands on disk, and sparse=false allocates the full size up front.

/iscsi> cd /backstores/fileio
/backstores/fileio> create m1_disk1 /san/m1_disk1.img 10G write_back=false sparse=false
/backstores/fileio> create m2_disk1 /san/m2_disk1.img 10G write_back=false sparse=false
/backstores/fileio> create nsd1_sitea /san/nsd1_sitea.img 15G write_back=false sparse=false
/backstores/fileio> create nsd2_sitea /san/nsd2_sitea.img 15G write_back=false sparse=false
/backstores/fileio> create nsd3_sitea /san/nsd3_sitea.img 15G write_back=false sparse=false
/backstores/fileio> create nsd4_sitea /san/nsd4_sitea.img 15G write_back=false sparse=false
/backstores/fileio> create nsd5_sitea /san/nsd5_sitea.img 15G write_back=false sparse=false
/backstores/fileio> create nsd6_sitea /san/nsd6_sitea.img 15G write_back=false sparse=false

/backstores/fileio> create nsd_CES1_sitea /san/nsd_CES1_sitea.img 2G write_back=false sparse=false
/backstores/fileio> create nsd_CES2_sitea /san/nsd_CES2_sitea.img 2G write_back=false sparse=false
/backstores/fileio> create nsd_CES3_sitea /san/nsd_CES3_sitea.img 2G write_back=false sparse=false

The two 10G LUNs will hold Scale metadata, the six 15G LUNs file data, and the three 2G LUNs the CES shared root.

Create an iSCSI LUN of each of our backstores.

/backstores/fileio> cd /iscsi/iqn.2026-10.lab.sitea:san/tpg1/luns
/iscsi/iqn.20...san/tpg1/luns> create /backstores/fileio/m1_disk1
/iscsi/iqn.20...san/tpg1/luns> create /backstores/fileio/m2_disk1
/iscsi/iqn.20...san/tpg1/luns> create /backstores/fileio/nsd1_sitea

Repeat for the rest, in the same order, so they become lun0 to lun10.

Creating an iSCSI portal

By default, the iSCSI portal is set to listen to all IP addresses with the default port number, which is 0.0.0.0:3260. Navigate to /tpg1/portals to delete the default portal.

/iscsi/iqn.20...san/tpg1/luns> cd ../portals
/iscsi/iqn.20.../tpg1/portals> delete 0.0.0.0 3260

Then create the new portal and specify the IP address of the storage network.

/iscsi/iqn.20.../tpg1/portals> create 172.16.17.19 3260

Save the configuration and exit.

/iscsi/iqn.20.../tpg1/portals> cd /
/> saveconfig
/> exit

Configure iSCSI Initiator on SiteA-Mgmt01

The iSCSI initiator is installed on the client machine to send data to the target. The below package is required to install the iSCSI initiator.

root@sitea-mgmt01:~# apt install open-iscsi -y

Set the initiator name. Every server needs a unique name, and we will need this to be added to our iSCSI target server.

root@sitea-mgmt01:~# echo "InitiatorName=iqn.2026-10.lab.sitea:mgmt01" > /etc/iscsi/initiatorname.iscsi
root@sitea-mgmt01:~# cat /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2026-10.lab.sitea:mgmt01

Set the node to log back in to the target at boot time.

root@sitea-mgmt01:~# sed -i 's/^node.startup = manual/node.startup = automatic/' /etc/iscsi/iscsid.conf

Access Control Lists are used to configure access rules that each initiator has access to LUNs. On the target server, navigate to our iSCSI target and then to the ACL directory, and create an ACL for each of our servers.

root@sitea-san:~# targetcli
/> cd /iscsi/iqn.2026-10.lab.sitea:san/tpg1/acls
/iscsi/iqn.20.../tpg1/acls> create iqn.2026-10.lab.sitea:mgmt01
/iscsi/iqn.20.../tpg1/acls> create iqn.2026-10.lab.sitea:mgmt02
/iscsi/iqn.20.../tpg1/acls> create iqn.2026-10.lab.sitea:nsd01
/iscsi/iqn.20.../tpg1/acls> create iqn.2026-10.lab.sitea:nsd02
/iscsi/iqn.20.../tpg1/acls> cd /
/> saveconfig
/> exit

Discover the target by using the target’s IP address. Using the below command, we should get a response from our iSCSI target.

root@sitea-mgmt01:~# iscsiadm -m discovery -t st -p 172.16.17.19
172.16.17.19:3260,1 iqn.2026-10.lab.sitea:san

Log in to the iSCSI target.

root@sitea-mgmt01:~# iscsiadm -m node --login
Logging in to [iface: default, target: iqn.2026-10.lab.sitea:san, portal: 172.16.17.19,3260]
Login to [iface: default, target: iqn.2026-10.lab.sitea:san, portal: 172.16.17.19,3260] successful.

Show disks attached.

root@sitea-mgmt01:~# lsblk -o NAME,SIZE,TYPE,TRAN
sdb                         10G disk iscsi
sdc                          2G disk iscsi
sdd                          2G disk iscsi
sde                          2G disk iscsi
sdf                         15G disk iscsi
sdg                         15G disk iscsi
sdh                         15G disk iscsi
sdi                         15G disk iscsi
sdj                         15G disk iscsi
sdk                         15G disk iscsi
sdl                         10G disk iscsi

The disk letters do not follow the LUN order. To see which disk is which LUN, check the by-path names.

root@sitea-mgmt01:~# ls -l /dev/disk/by-path/ | grep iscsi | awk '{print $9, $11}'
ip-172.16.17.19:3260-iscsi-iqn.2026-10.lab.sitea:san-lun-0 ../../sdb
ip-172.16.17.19:3260-iscsi-iqn.2026-10.lab.sitea:san-lun-1 ../../sdl
ip-172.16.17.19:3260-iscsi-iqn.2026-10.lab.sitea:san-lun-2 ../../sdk

In my earlier lab, we created a filesystem on these disks and mounted them. This time we leave them raw, as Storage Scale will use them as NSDs and build its own filesystem across them in the next chapter.

That’s about it to configure a central iSCSI target server for our Storage Scale lab and in the next blog we will focus on building all the VM’s we need from Proxmox UI from the base template we created.

(Visited 1 times, 1 visits today)

By Ash Thomas

Ash Thomas is a seasoned IT professional with extensive experience as a technical expert, complemented by a keen interest in blockchain technology.