Advertisements

Installing iSCSI Target on Ubuntu Server

To install iSCSI Target on Ubuntu Server 12.04 LTS, here’s the steps I followed:

sudo apt-get install iscsitarget

That will install the target server, but at the end of the installation, you will get this message:

Setting up iscsitarget (1.4.20.2-5ubuntu3.2) ...
 * iscsitarget not enabled in "/etc/default/iscsitarget", not starting...

edit /etc/default/iscsitarget and change it to read

ISCSITARGET_ENABLE=true

Now, try to start iscsitarget with:

service iscsitarget start

You get:

 * Starting iSCSI enterprise target service
FATAL: Module iscsi_trgt not found.
                                                                         [fail]

What needs to be done is to install iscsitarget-source and iscsitarget-dkms to build the missing module:

apt-get install iscsitarget-source iscsitarget-dkms

The packages install and the module is built automatically

service iscsitarget restart

gives the following result:

 * Removing iSCSI enterprise target devices:                             [ OK ]
 * Starting iSCSI enterprise target service                              [ OK ]
                                                                         [ OK ]

I’m not going to cover configuration of iSCSI targets in this guide. Your comments are welcome below. Thank you!

Advertisements

, ,