Installing & Configuring SCST iSCSI Target on Ubuntu 11.10 (Oneiric)

The SCST iSCSI Target Subsystem for Linux is certified for operation with VMWare.  Unfortunately, the default iSCSI target for Ubuntu, IET, currently has a few issues.

Though SCST has passed certification, the documentation is a bit lacking, particularly with relation to Ubuntu which is our distribution of choice here at KCS.  So here’s the low down on getting it running simply and reliably.  I’ll also include a few instructions and screenshots on ESXi 5.0 configuration.  When doing this sort of job, you typically want to log in as root, or if you’re running a very default Ubuntu config and you can’t log in as root, just switch to root with

sudo -i

Make sure that your freshly installed Ubuntu 11.10 (Oneiric) is fully patched and running your latest or preferred kernel.  You can do this with a combination of

apt-get update
apt-get upgrade
# Do this if you want the latest kernel
apt-get dist-upgrade

And then reboot your system if you performed a kernel upgrade.  At the time of writing the kernel version was 3.0.0-15, and I used a 64 bit server kernel (so it was 3.0.0-15-server SMP x86_64 GNU/Linux) to be precise.

To prepare for installation, you need to add two items, being Subversion (svn) and the ‘build-essential’ package.  Do this with

apt-get install subversion build-essential

Then fetch the latest released version of SCST (ie, the most stable) version from SourceForge into a subfolder called ‘scst’ with:

mkdir scst
cd scst
svn co https://scst.svn.sourceforge.net/svnroot/scst/branches/2.2.x

After this make the scst directory your working directory with

cd 2.2.x

If you’ve followed the instructions exactly you will be in root’s folder, so the full current path will actually be /root/scst though displayed as ~/scst

Then make sure that everything is reset back to defaults, change from “debug” to “release” and ready to install with

make extraclean
make debug2release

Now build and install the SCST iSCSI

make scst iscsi scstadm
make iscsi_install scstadm_install scst_install

The final ‘scst_install’ will remind you that you will have to redo the above two lines (or even the previous 4 lines from ‘make extraclean’ if you are pedantic – as I am 😉 every time you install a new kernel.  This will only happen if you run a ‘apt-get dist-upgrade’.

Finally, set SCST to autostart with your system

update-rc.d scst defaults

Now reboot to activate it and confirm that it starts automatically, or just start it manually with

/etc/init.d/scst start

For the lazy, here are all the commands in one big section for your cut & paste pleasure 🙂

sudo -i
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

After the reboot, log in and

sudo -i
apt-get install subversion build-essential
mkdir scst
cd scst
svn co https://scst.svn.sourceforge.net/svnroot/scst/branches/2.2.x
cd 2.2.x
make extraclean
make debug2release
make scst iscsi scstadm
make iscsi_install scstadm_install scst_install
update-rc.d scst defaults
/etc/init.d/scst start
cd ~

NB: If / When you upgrade your kernel, you must redo the last 2 make commands, or specifically:

cd scst/2.2.x
make scst iscsi scstadm
make iscsi_install scstadm_install scst_install

 

.. to be continued with VMware config and /etc/scst.conf setup.

Share This

Share this post