How to connect to iSCSI target on Fedora 23

This tutorial will show you how to configure iSCSI initiator on Fedora 23. At the end, we will be able to connect to existing iSCSI target on your network. If you want to build your own iSCSI target server for free, you may use FreeNAS, NAS4Free. Please refer to this tutorial how to configure iSCSI target on FreeNAS. When we are connected to an iSCSI target, we will have additional iSCSI disk which is recognized or pretended as a local disk instead of a network disk. Does not like NFS or CIFS filesystem, iSCSI does not require to be mounted on a specific directory. We only need to log in to specific iSCSI target server and we are done.

Steps to connect to iSCSI target on Fedora 23

A. Install iscsi-initiator-utils

Linux system requires iscsi-initiator-utils to connect to iSCSI target device. Fedora 23 comes with this package by default. In case you need to install it, use this command below

dnf install iscsi-initiator-utils

B. Configure iscsi daemon

We need to make a simple configuration change to the iscsid.conf file. Open the iscsid.conf using your favorite text editor, vi or nano.

nano /etc/iscsi/iscsid.conf

Now find the following line and make sure its uncommented

node.startup = automatic

Usually, that line already uncommented on Fedora 23, so this step is just to ensure it. Close and save the file.

C. Connect to iSCSI target

Now we need to discover any iscsi target available on our network. Use this command to discover the iscsi targets on a specific server. My server IP address is Change this value with your own iscsi target server.

Still in Terminal, paste this command to connect and discover the iscsi target on the server.

iscsiadm -m discovery -t sendtargets -p

It will produce something like this

[07:52 root …/Downloads/]# iscsiadm -m discovery -t sendtargets -p,257,257,257

Now note down the record id for the iscsi volume you want to connect. Next, execute this command to login to the remote iscsi volume.

iscsiadm -m node –targetname “” –portal “” –login

Once connected, you will see a successfull message appear on your Terminal. Now you can list your hard drive using command:

fdisk -l

Now you should see a new hard disk device listed.


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.