Install iSCSI Target software

Depending on your distribution of linux, you can use iSCSI server.

Install on Debian

As iscsi target on Linux isn't still in a stable package, you have two choice to install it

  1. install it from the sources
  2. install it from an unstable repository

The official website to download the sources is : http://iscsitarget.sourceforge.net/
I will, here, describe the way to install iSCSI target from an unstable repository1, as it is simpler.
Note that all the commands below have to be done as root user.
So, as you have to install the package from an unstable repository, you have to tell to apt-get where is this new repository. You can do it by adding this line :

deb http://debian.hug.cx/debian/ unstable/

to this file :

/etc/apt/sources.list

Then, do :

# apt-get update

And we, now, can install the packages.

So, first install this one :

# apt-get install iscsitarget-source

and then
# apt-get install iscsitarget

Pay attention that you will probably get an error when installing the last package, the error is :
Starting iSCSI enterprise target service: FATAL: Module iscsi_trgt not found.
netlink fd
: Connection refused
failed.

If you didn't get this error, you can now configure your iSCSI target here. Otherwise, read what follows.

The error is normal, because we still didn't build the kernel module to use for iSCSI. So, let's do it.
If you known how to build a module manually with Linux, you can simply use the method you known, and you don't need to read the things below.
Otherwise, read what follows and I will tell you how to build this module without having any knowledge to build a module for Linux Kernel.
So, you will need to install two packages :

  1. module-assistant
  2. debhelper

so, let's install these packages :

# apt-get install module-assistant debhelper

You can known build the required kernel module to enable iSCSI target. So, let's build it with this command :
# m-a a-i iscsitarget

If all goes properly, we still have to load the new builded module. Let's do it with this command :
# modprobe iscsi_trgt

Your system is now ready. You can known configure your iSCSI target on Debian here.

Install on Ubuntu 8

On ubuntu, it's very simple as the package is a stable one, the last time I installed it. So, you simply have to run this command :

# apt-get install iscsitarget
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License