Make your own free website on
iSCSI and how to get it working

To warn you upfront: installing iSCSI on Debian Etch involves downloading some unofficial .deb archives and compiling a kernel module. I am absolutely no fan of these things. These things are not really part of the OS in an organized way and updating it might break the thing at any time. The reason that I use and prefer Debian (and Ubuntu for that matter) is the stellar package management and the absolutely cool way to install software.

Now the fact that the server component of iSCSI is so hard to setup and not part of the official repositories can have 2 reasons:
1. It is too new.
2. Not many people are using it or do care about it.

If either of these reasons are true, I do not know at this point, but there is material to support this suspicion. How stable the thing is, I cannot say as yet (22. March 2007), but tests will show it.

A short summary of what it does

iSCSI is a cheapo replacement for a fiberswitch SAN, which is kind of very expensive. It works by providing access to disks residing on a server (target) to a client (initiator). The client attaches to the disk directly and it looks to him, like he has the disk local. The cool and cheap thing about it is now that it works over normal ethernet with stock components.
If you use Gigabit ethernet, you can get performance that can rival a SAN at a tiny fraction of the price, especially when running it on a custom made box, without having to shell out thousands for a iSCSI hardware box.

The two components

There are two parts to iscsi:

the initiator (client) and the target (iscsi server)

to set up the server (target):

get these two packets (unfortunately they are not part of normal repositories, seems to be not so stable and old yet)
iscsitarget-source_0.4.13-2_all.deb       (for the module and module-assistant)

install them with
dpkg --install iscsitarget*

make sure you have module-assistant installed


apt-get install module-assistant

start module-assistant


select update

select prepare to make module-assistant download things it might still need



use select and select the iscsitarget module


Now select build


 and accept the offer to install the the module right away

create a config file for the daemon:

use your favorite text editor to create the file:

with the content:

Target iqn.2006-01.linux-san:54GBRaid5
  Lun 0 Path=/dev/hde,Type=fileio
  Alias sandisk1

Mind you, this is an example, you will have to change the device that you want to share.

also install the package open-iscsi
(don't know if this is really necessary, since this is the client package (initiator) and we are working on the server (target)

Now the confusing story:
The daemon is called

the init.d script is called

and the command that is running then is called ietd

It always annoys me when a thing is inconsitently named.

use /etc/init.d/iscsitarget restart

to start the whole thing... (and make sure it restarts, in case you make config changes or if it is running already)

you can check for eventual errors in /var/log/syslog

and if you did everything right, you can see the daemon listening on port 3260
for connection. Darn, I love Linux!!! so transparent, you can solve any problem that way!

use netstat -nlp         (numeric, listen, programm) to get this output (if everything worked as it should)

tcp        0      0  *               LISTEN     5076/ietd

Now go ahead and install the Microsoft ISCSI initator (google for it and you'll find it right away) for example Windows XP and install it there...

Setup a new target, enter the server IP (leave the port standard)
Make sure you login.
To mention security: There is none, with this configuration, anybody on the network can grab your ISCSI disk. Better set up some if you need it.

Now exit the configurator and BANG!, you should have a new disk in the windows disk manager.. partition and format it with your favorite filesystem, for which, as mediocre as Windows is, you got ONE CHOICE... NTFS *grin*

Yes yes, I can't stop poking fun at the leading brand OS, I know...;-)
(and that it is very likely not leading due to quality, but due to massive (admitedly) brilliant marketing.)

In my test configuration I got a transferrate (with a 6 gb file) of around 5mb per second. The initiator is a AMD3000+ 2GHZ   1GB RAM, the target is a AMD 900 MHZ 800 MB RAM Linux Debian server, the link is 100 Mbit, and the whole thing is running on a Linux software raid 5 Array with 3 SATA disks (each 250 GB)

This is a really bad setup and there are even 2 cheapo switches between. The Linux system is almost running at full CPU load and the AMD 3000+ is using about 50% CPU when transfering files.
I just did it to try it out and with decent equipment, both Server system and connectivity of 1 GHZ LAN, it should be much higher.

I got into it after buying a Promise RAID card for about 200 Bucks and then realizing that RAID 5 functionality was not supported (I lost a disk, tried to replace it and the array did not want to rebuild), eventhough the advertised that it did. I am sick and tired of moron manned support lines and companies that sell products for money that just don't deliver and if you got problems, you keep standing in the rain. No matter how brilliant you are, you cannot troubleshoot or fix an closed and proprietäry HW device.
Hearing that Linux Software RAID beats these devices many times, I read about ISCSI and tried to implement it.
Great idea, I like it alot. Especially Linux Software RAID JUST WORKS GREAT!!!!!
You got trouble? You can always fix it.

this document was created on:
22. Mar. 2007
updated on:
22. Mar. 2007