A Quick Guide to iSCSI on Linux

Cuddletech TekRef Series

Ben Rockwood

Revision History
Revision v1.0April 11th 2004benr
Initial Document
Revision v1.1April 12th 2004benr
Clarifications and Cisco Ref added
Revision v1.2April 23th 2004benr
Fixes, Typos, and Various Additions
Revision v1.3June 7th 2004benr
Added Solaris procedure
Revision v1.4Aug 6th 2004benr
Added sidebar for IET, ardis to be removed soon


A quick and gentle overview of iSCSI on Linux. Setting up both an iSCSI initiator and iSCSI target on a Linux system are covered with a quick overview of essential iSCSI terms and ideas. This paper is also avalible as a PDF.

Table of Contents

The Basics
Setting up a Target
Setting up an Initiator
Accessing iSCSI Targets from non-Linux Hosts
Using Volumes as iSCSI Targets
Cisco iSCSI Initiator Command Reference
Resources and Further Reading


More and more it appears that iSCSI isn't going away, but might just be here to stay for awhile. In a nutshell, iSCSI is simply the pairing of the "best" of both NAS (using NFS or CIFSs over IP Ethernet networks) and SAN (Fibre Channel Fabrics) technologies. What you ultimately get is a protocol that allows you to use SCSI commands like Fibre Channels FCP, yet does it over an IP network instead of a costly Fibre Channel Fabric. Instead of buying an expensive Brocade or McData switch and costly Fibre Channel HBAs from companies like JNI, Adaptec and Emulex, you can use any IP switch (NetGear, 3Com, Extreme, Foundry, etc) and normal Ethernet cards. Because SCSI is CPU intensive during high I/O loads iSCSI Host Bus Adapters (HBA) have arrived which act just like a FC HBA except that it uses Ethernet instead of FC Fabric; the idea being that the SCSI requests are offloaded from your primary CPU onto the ASIC on your iSCSI HBA.

SCSI uses a client-server architecture. A "client" (ie: your system) is an initiator, it initiates requests. A "server" (ie: your storage device) is a target, it has something you want and answers requests from the initiator(s). Initiators come in two varieties: software and hardware. A software initiator is just a driver that handles all requests and pairs the network interfaces driver and the SCSI drivers together to make it all work. Using a software initiator any system with an ethernet card can act as an iSCSI initiator. A hardware initiator is an iSCSI HBA, which is basically just an ethernet card with a SCSI ASIC on-board to offload all the work from the system CPU. Because there is no cost involved in using a software initiator we'll look at that. Adaptec is currently selling iSCSI HBA's which have Linux drivers available if you choose to go that route.

There are three very interesting projects in the Linux community regarding iSCSI at the moment. The first is a project from the University of New Hampshire's Inter-op Labs (legendary in Fibre Channel circles). Their iSCSI implementation provides both software initiator and target code for use with a Linux kernel. While it's an interesting project, they admit that their target code is really only around for testing their initiator code, and documentation and tools for the UNH iSCSI code is confusing. Even when you get UNH iSCSI running it's unclear what it's doing and how. So we look at 2 other projects which complement each other: The Linux iSCSI Target Implementation from Ardis Technologies and the Linux-iSCSI Project (software initiator). We will look at these 2 projects for testing and playing with iSCSI.