Here is a quick instruction to get iSCSI-SCST from http://scst.sourceforge.net to work on Centos 5.4.
Running with kernel that came with Centos 5.4 initial install 2.6.18-164.el5-x86_64 (64-bit in my case)
First, you will need to install the kernel source:
As root, install the packages rpm-build, redhat-rpm-config and unifdef:
As an ordinary user, not root, create a directory tree based on ~/rpmbuild:
I used the vtl account:
You are strongly advised against package building as root
Now that the source rpm is installed, unpack and prepare the source files:
The kernel source tree will now be found in the directory ~/rpmbuild/BUILD/.
Now you can copy the kernel source to /usr/src/kernels
Now let's download scst,
if you do not have subversion, just install it as follows:
yum install subversion
once scst is downloaded, go back to you kernel source
Run the following to patch your kernel source :
Check your /boot/grub/menu.lst, it should look like this:
Reboot you system now. Make sure you come back on the new kernel that is called vmlinuz-2.6.18-prep.
Once the system comes back, verify that you are running on the new kerenl:
# uname -a
Linux xxxx.xxxx 2.6.18-prep #1 SMP Mon Mar 15 16:56:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Now before we compile and install scst, you may need to install the following:
Now let's make and install scst:
If all compile and install fine with no errors, then you are ready to install mhvtl
I typically install it this way:
All what shows below is based on a customized mhvtl. Find my mhvtl custom files attached.
Now let's go back to scst,
Run the following:
Check for the tape and changer device handlers, you should see dev_tape and dev_changer for your mhvtl devices:
Now, you will need to create iscsi targets and setup more scst configuration as following:
Please note, my mhvtl devices are customized, yours may be different - Follow your info from /proc/scsi_tgt/scsi_tgt and output from lsscsi -g - Notice the extra "0" at the end in ASSIGNMENT under /etc/scst.conf:
Added the following as shown below in /etc/iscsi-scstd.conf & /etc/scst.conf
if you like, you can use this script to create all scst config files for you viewtopic.php?f=34&t=91
Modify the startup rc script to run the modprobe tape and changer as follows:
goto line SCST_MODULES="scst scst_disk scst_vdisk"
I personally do not need disk, so I removed both scst_disk scst_vdisk and added scst_tape scst_changer instead.
We are done, just start scst services:
The order to stop/start mhvtl/iscsi/scst:
Here is an rc script that can be used to automatically starts mhvtl-scst:
Test it by connecting form another iscsi-initiator, I use this script to do so:
Using Microsoft iSCSI-Inititator version 2.08 with MHVTL: