home!





iSCSI target on Ubuntu



Unfortunately the iscsi-target port for FreeBSD (import from NetBSD) wasn't working correctly for me at this time, so I tried iSCSI Enterprise target on Ubuntu server (7.04 in this case).

Installation (in a VMware virtual server);

-Create a virtual server with at least two disks, one for Ubuntu, the other(s) as iSCSI storage
-Install Ubuntu server on the first disk, do nothing with the other disk(s), which means manual disk partitioning
-After installation (and updates) install the following packages;
   make
   libssl-dev
   gcc
   linux-headers-x.x.xx-xxx-server (check your kernel version with uname -a)
   links2
-Use links2 to download the iscsi-target tarball from the Sourceforge project page
-Gunzip and untar the tarball, then cd into the unpacked directory
-Do make KERNELSRC=/usr/src/linux-headers-x.x.xx-server
-If no errors were found, do make KERNELSRC=/usr/src/linux-headers-x.x.xx-server install
-Open /etc/ietd.conf and add the targets (example the config of my NAS box for a Windows cluster configuration);

   Target   iqn.2007-09.lan.acme:nas01.sdb
   Lun 0 Path=/dev/sdb,Type=fileio
   Target   iqn.2007-09.lan.acme:nas01.sdc
   Lun 0 Path=/dev/sdc,Type=fileio
   Target   iqn.2007-09.lan.acme:nas01.sdd
   Lun 0 Path=/dev/sdd,Type=fileio


The target name is defined as iqn . [the date of start of the domain in yyyy-mm] . [domain name in reverse] : [identifier of own choice]
Don't forget to comment out or remove the example target in the file!

-Start iscsi target with /etc/init.d/iscsi-target start
note: If you get an unexpected operator error do /etc/init.d/iscsi-target stop, open the file and change the first line to #!/bin/bash, then start iscsi-target again

-If all is okay add the script to the boot sequence by typing update-rc iscsi-target defaults




The reason why is just as important
as the answer to the question

mail? nystrom.nl, marcel