Overview

iSCSI stands for Small Computer System Interface (SCSI) over IP. SCSI in a nutshell is set of commands, protocols and standards for transferring data between peripheral devices. Using iSCSI we can set storage to a remote machine using reliable protocols and methods.

iSCSI Configuration

The configure iSCSI you have to configure the following components:

iSCSI Target - This is the server which will receive the data: Receiver

With a LUN (the storage location)

iSCSI Initiator - This is the server which will send the data: Sender

So let's get going :)

iSCSI Target

As everything, configuration depends on the OS, different wizards, utilities and methods depending on the OS, are used to configure the iSCSI target:

Linux

You can list the configured LUNs using the following command on Linux:

Asustor

I will not go into details here but here is a picture of how it is configured on ASUSTORE NAS - AS202TE

It is important to note, that the iSCSI target is just the pointer to the LUN (Logical Unit Number).

So the connection will be initiated by the iSCSI initiator (on the client machine) → iSCSI Target (on the server machine, over Internet) → LUN (at the storage level)

Windows

In Windows server, you can create it via the wizzard in the Server Manager and it should be something like this at the end:

iSCSI Initiator

iSCSI initiator again depends on the operation system on the server.

Windows

Windows has integrated iSCSI initiator when you are installing it. Hopefully you have something higher than Windows 98 :). The wizzard is pretty straight forward, you have to specify the iSCSI target server and it will discover the targets for you. Then you can just connect and map the device. Given no authentication is required.

The configuration for windows is so trivial via the wizard that I don't think I should even discuss it.

Linux

On linux the situation is a little bit different. By default Linux doesn't install the initiator, so you have to install it yourself. Furthermore, like anything, there isn't GUI so you have to configure it yourself manually.

Setup

Discover

To discover the targets we can issue the following command:

This will show us the exposed iSCSI targets.

In our case we have iscsi target which is on port: 3260 and with name: “iqn.1991-05.com.microsoft:taurus-taurus-orabackup-target”

CHAP

Chap protection might or might not be enabled on the target server. If CHAP is configured on the iSCSI target, we have to configure it in the initiator.

BE CAREFUL TO CONFIGURE ONLY THE INITIATOR PART OR YOU WILL HAVE this error: “The challenge was incorrect.”

The configuration is done in the:

/etc/iscsi/iscsid.conf

Restart the iscsi deamon:

Login

We can login to the iSCSI target and start a session as follows:

You can also list the current setting for the initiator and target as follows:

That information is also available on: /var/lib/iscsi/nodes/iqn

Once the Login was successfully, we can check where the OS mounted the device:

Or you can just grep in the /var/log/messages

Then we can create the file system:

Add the following to the /etc/fstab:

And then we can mount the file system:

Logout

You can decide to abort a session and disconnect as follows:

Delete configuration

To deleting a configuration, we need to:

Disconnect/Logout

Ensure that the driver won't try to re-connect

Logout

Delete

Performance

I've found that iSCSI isn't particulary fast. I've found that my environment isn't so much loaded. That can be because the clients aren't using Jumbo frames so that might be the reson.

Here is a good article of how to speed up the performance of the iSCSI:

https://www.monperrus.net/martin/performance+of+read-write+throughput+with+iscsi