mhvtl automatic install scripts on CentOS 5.4 and RHEL 5.4 with tgt

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

mhvtl automatic install scripts on CentOS 5.4 and RHEL 5.4 with tgt

tsunami_liao
This post was updated on .
Hi there,

First, I want to thanks Mark bring this mhvtl come true, and it's free, it's open, it's very helpful for testing, thank Mark!

I wrote a set of scripts for mhvtl automatic install on CentOS, and want to share here.

Testing is passed base on these environment:
CentOS 5.4 x86_64 or RHEL 5 update 4 x86_64 (should work for 32bit, but not test yet)
mhvtl-0.18-10 or mhvtl-0.18-11
tgt-1.0.8 or above


3 scripts here:
mhvtl-tgt.sh
This is the install script, just run this script to install mhvtl, the other 2 script will call by this script during the installation.

1. I suppose you performed minimal installation for the CentOS, and mounted your DVD to /media/cdrom, this is for required RPM packages install during the installation.
2. I suppose you downloaded the mhvtl tarball to /root/mhvtl/mhvtl-2010-09-23.tgz
3. The tgt tarball to /root/mhvtl/tgt-1.0.8.tar.gz
4. And al these 3 scripts to /root/mhvtl/scripts
5. If you want to keep your own configuration, put the preconfigured conf file for mhvtl to /root/mhvtl/conf, this step is not necessary, mhvtl will create default configuration when the service start.

Of cause, you can modify these settings in this scripts.

I do not suggest you run this scripts on a production server, because I disabled many daemon that no use for mhvtl, you can modify in the session "# Disable services that mhVTL un-need".


vtl-tgt
This script is help you to discover the VTL you have after the installation, and will help you to bind the VTL to iSCSI target.
You just put this script to the same folder as mhvtl-tgt.sh during the installation.
You can modify this script to define your IQN prefix, default is iqn.2010-09.com.lab.mhvtl.


vtld
This script is the startup script, will add to system startup list by chkconfig --add command. and put this script to the same folder as mhvtl-tgt.sh during the installation.

It will start the mhvtl service, and the vtl-tgt.
Just run /etc/init.d/vtld {start|stop} or service vtld {start|stop} to restart your mhvtl.


Here are the scripts, just put them to /root/mhvtl/scripts/

mhvtl-tgt.sh
vtl-tgt
vtld


At last, I'm not a native speaker for English, and I'm not a professional shell script writer, please forgive my mistake on the writing.
Thanks all!
nia
Reply | Threaded
Open this post in threaded view
|

Re: mhvtl automatic install scripts on CentOS 5.4 x86_64 with tgt-1.0.8

nia
Administrator
Thanks for that tsunami_liao .. Very useful ..
Reply | Threaded
Open this post in threaded view
|

Re: mhvtl automatic install scripts on CentOS 5.4 x86_64 with tgt-1.0.8

tsunami_liao
nia wrote
Thanks for that tsunami_liao .. Very useful ..

I'm sorry to inform you that I made a mistake in mhvtl-tgt.sh, and now I updated it, please download again.

The mistake is that I'm not notice that mhvtl make script need the command which, and the minimal installation of CentOS does not have that command, now the script add the rpm install command to install which.
Reply | Threaded
Open this post in threaded view
|

Re: mhvtl automatic install scripts on CentOS 5.4 and RHEL 5.4 with tgt

thangTT
In reply to this post by tsunami_liao
Hello tsunami_liao,

I just follow your steps to install mhvtl-2010-11-17.tgz (builds mhvtl-0.18-12) on Centos 5.4 x86_64 but at the end of the installation, I think it miss things (prerequisites) so it doesn't work, could you please check ? (I already change in your install script to  mhvtl-2010-11-17.tgz)
I manage to do the following, then it worked, but don't know exactly which step make it work:
1. I extract file mhvtl-2010-11-17.tgz, cd to kernel dir. run 'make', then 'make install'
2. do the same thing for tgt-1.0.8
3. yum install scsi-target-utils

then it worked, could you please re-check ?
many thanks
 
Reply | Threaded
Open this post in threaded view
|

Re: mhvtl automatic install scripts on CentOS 5.4 and RHEL 5.4 with tgt

Mark Harvey
Administrator
Please upgrade SCSI Target to 1.0.10 (or 1.0.11).

The earlier releases have problems with reading a short block of data.

Cheers
Mark
Regards from Australia
Mark Harvey