How to configure iSCSI Initiator on Arch Linux

Arch Linux Tutorial for beginner–Hello everyone, today I am going to show you how to connect to an iSCSI Target disk from Arch Linux. In other word, we will learn how to configure iSCSI Initiator on Arch Linux. Before we go through, I assume you have a working iSCSI target server on your network. If not, you can create a new iSCSI Target Server yourself.

Please note that on this tutorial, mostly we work in Terminal console. But don’t worry, I will try to make it as clear as possible.

Steps to connect to iSCSI Target Server on Arch Linux

Step 1. Configure Arch

We need to install a package called open-iscsi on Arch. In Terminal console, type the following command to install it.

pacman -S open-iscsi

[root@arch-linux ~]# pacman -S open-iscsi
resolving dependencies…
looking for conflicting packages…

Packages (1) open-iscsi-2.0.874-2

Total Download Size: 0.35 MiB
Total Installed Size: 2.19 MiB

:: Proceed with installation? [Y/n]

Now, start the open-iscsi service

systemctl start open-iscsi


If you unable to start the open-iscsi service and got the following error,

[root@arch-linux ~]# systemctl start open-iscsi
Job for open-iscsi.service failed because the control process exited with error code.
See “systemctl status open-iscsi.service” and “journalctl -xe” for details.
[root@arch-linux ~]# systemctl status open-iscsi
● open-iscsi.service – Open iSCSI Daemon
Loaded: loaded (/usr/lib/systemd/system/open-iscsi.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-05-04 16:23:26 WIB; 17s ago
Process: 542 ExecStart=/sbin/iscsid (code=exited, status=127)

May 04 16:23:26 arch-linux systemd[1]: Starting Open iSCSI Daemon…
May 04 16:23:26 arch-linux iscsid[542]: /sbin/iscsid: error while loading shared libraries: cannot open
May 04 16:23:26 arch-linux systemd[1]: open-iscsi.service: Control process exited, code=exited status=127
May 04 16:23:26 arch-linux systemd[1]: Failed to start Open iSCSI Daemon.
May 04 16:23:26 arch-linux systemd[1]: open-iscsi.service: Unit entered failed state.
May 04 16:23:26 arch-linux systemd[1]: open-iscsi.service: Failed with result ‘exit-code’.

In my case, it was fixed after I install openssl. So if you have error telling you that cannot open …, fix it using :

pacman -S openssl

Hope that help.

Step 2. Configure iscsid.conf

Now, we need to make some changes to the file /etc/iscsi/iscsid.conf using nano or other text editor you like.

nano /etc/iscsi/iscsid.conf

Find and uncomment the following lines:

#node.session.auth.authmethod = CHAP
#node.session.auth.username = username
#node.session.auth.password = password

Now, you should have something like this: (make sure you change username and password with your iSCSI Target Server credentials).

node.session.auth.authmethod = CHAP
node.session.auth.username = root
node.session.auth.password = 12345678

Step 4. Target Discovery

Now we need to discover the iSCSI Target server. Use the following command and modify to match with yours.

[root@arch-linux ~]# iscsiadm -m discovery -t sendtargets -p,1 is my iSCSI Target Server. Change it accordingly.

After we found the target, we can login to the target server.

sudo iscsiadm -m node –login


Leave a Reply

Your email address will not be published. Required fields are marked *