3.12. Mass Storage via IP Networks — iSCSI

One of the central problems in computer centers and when operating servers is the provision of hard disk capacity for server systems. Fiber channel is often used for this purpose in the mainframe sector. So far, UNIX computers and the majority of servers are not connected to central storage solutions.

linux-iSCSI provides a simple and reasonably inexpensive solution for connecting Linux computers to central storage systems. In principle, iSCSI represents a transfer of SCSI commands on IP level. If a program starts an inquiry for such a device, the operating system produces the necessary SCSI commands. These are then embedded in IP packages and encrypted as necessary. These packages are then transferred to the corresponding iSCSI remote station.

To use iSCSI, you need the linux-iscsi package. The connection data must be entered in the /etc/iscsi.conf file. If you have an iSCSI storage device, this configuration file might look like this:

DiscoveryAddress=10.10.222.222
TargetName=iqn.1987-05.com.cisco:00.3b8334455c55.disk1

In this very simple example, the storage system does not use authentication. Many properties of iSCSI can be set in /etc/iscsi.conf. Find details in the manual page for iSCSI.

After iSCSI has been configured, start the iSCSI subsystem with the rciscsi start command. The system should output the following messages:

rciscsi start
Starting iSCSI: iscsi iscsid fsck/mount                 done

The /etc/initiatorname.iscsi file is set up at the first initialization and will be used by the computer in the future to log in to iSCSI storage. This file cannot simply be copied. It must be created from scratch for every host.

If the start has been successful, the system messages indicate which devices have been recognized. View system messages with dmesg. The various devices are now available under /dev/sda or /dev/sdb, for example, and can be partitioned and formatted as required. The mount points for file systems on the recognized devices should be entered in /etc/fstab.iscsi. These file systems are mounted when iSCSI is started.

Publications relating to iSCSI can be found on the project web site at http://linux-iscsi.sourceforge.net/.