iSCSI Initiator software
This page describes the installation of iSCSI Initiator software.
The software I use for this is from
www.open-iscsi.org. The software
consists of a kernel-part and a userland-part. The kernel-part is now part of
the standard Linux kernel and doesn't need to be downloaded. It only needs to be
part of your Linux kernel. Make sure it is configured in the kernel (install and
reboot if necessary):
This creates the kernel module iscsi_tcp.ko (and uses / builds: libscsi_tcp,
SCSI device support
[v] SCSI low-level drivers
[M] iSCSI initiator over TCP/IP
Software creation and installation
Apparently, there is no official Slackware package for this software, so I'm
installing it commando-style.
Get the entire software using Git or just download the most recent version:
This creates and installs (among others)
git clone git://github.com/mikechristie/open-iscsi.git
get checkout -b my_iscsi_branch origin/iscsi
tar xzf open-iscsi-2.0-873.tar.gz
Also, a number of configuration files are created at /etc/iscsi.
- /usr/iscsid - iSCSI daemon
- /usr/iscsiadmin - management application
- /usr/iscsistart - boot'tool'
Two changes are needed to make sure the initiator is started at boot. One is to
start the daemon in /etc/rc.local, the other is to change the default
node.startup setting so nodes will log on automatically.
Add this line to connect to all registered iSCSI devices:
# Log in to all discovered iSCSI devices
/sbin/iscsiadm -m node -L all
Apply this change (change node.startup from "manual" to "automatic"):
The contents of this file identifies the Initiator to the target. Change the
contents to something meaningfull and unique within your storage network.
I came up with this before I understood what it meant:
TWA overload: this is the iqn of the acl in the tpg you created in your iSCSI target.
The Initiator needs to initiate any connection between storage server and
client. In the example storage server that was created when configuring the
iSCSI Target software, a small iSCSI disk
was made available.
To connect to a drive on some Target, the Initiator must first discover if there
is an iSCSI target (st="send target") offered on the Target's IP addres
(10.0.0.142 in this case):
(the two commands do the same. Pick one):
This confirms there is a iSCSI target at that address at default port 3260. One
target portal group (1) is discovered, named
"iqn.2003-01.org.linux-iscsi.hermiod.i686:sn.b31d38f66410". Now, connect to all
LUNs in that portal group assigned to this initiator:
$ iscsiadm --mode discovery --type st --portal 10.0.0.142
$ iscsiadm -m discovery -t st -p 10.0.0.142
All iSCSI devices offered by the target should now be available on the client.
Running 'dmesg' should show something like this:
$ iscsiadm -m node -L all
Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.hermiod.i686:sn.b31d38f66410, portal: 10.0.0.142,3260] (multiple)
Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.hermiod.i686:sn.b31d38f66410, portal: 10.0.0.142,3260] successful.
The new device, /dev/sdb, can now be used as if it were a local disk.
[40959.822268] scsi 15:0:0:0: Direct-Access LIO-ORG FILEIO 4.0 PQ: 0 ANSI: 5
[40959.822441] sd 15:0:0:0: Attached scsi generic sg2 type 0
[40964.576331] sd 15:0:0:0: [sdb] 20481 512-byte logical blocks: (10.4 MB/10.0 MiB)
back (last change: 31-7-2012 14:21)