Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

marekk
Hi

I prepared new version of MHVTL virtual machine (Workstation 7, Fusion 3) with Ubuntu Server 10.10 x64 and ISCSI support (ISCSI-SCST 2).

Some details:
Operating system: Ubuntu 10.10 Server x64 with kernel 2.6.35 and ISCSI-SCST 2 patches
Login: user1, pass: user1 (there is no root user for default in Ubuntu so pls use "sudo")
200GB for backups (/opt/mhvtl) - you can add more by adding new disk to VM and resizing LVM volume.
IP: 10.201.0.230 (/etc/network/interfaces)
1CPU, 512 MB RAM
VMware Tools installed

MHVTL, SCST and ISCSI-SCST started by /etc/init.d/start-mhvtl-iscsi (modified n.i.a. script)

SCST 2.0 configuration prepared automatically after MHVTL start (modified n.i.a. script for SCST 1.0)
/home/user1/buildscst2.sh

#!/bin/ksh

# Customize your own
IQN=iqn.2011-02.mhvtl.mk

# Build /etc/scst.conf
rm -f /tmp/scsi_lst.tmp
touch /tmp/scsi_lst.tmp

echo "HANDLER dev_changer {" >/tmp/scst.tmp
lsscsi -g| grep mediumx | awk '{print $1}'| cut -d "[" -f2| cut -d "]" -f1| while read each1; do
echo DEVICE $each1 >>/tmp/scst.tmp
echo $each1 >>/tmp/scsi_lst.tmp
done
echo "}" >>/tmp/scst.tmp

echo "HANDLER dev_tape {" >>/tmp/scst.tmp
lsscsi -g| grep tape | awk '{print $1}'| cut -d "[" -f2| cut -d "]" -f1 | while read each2; do
echo DEVICE $each2 >>/tmp/scst.tmp
echo $each2 >>/tmp/scsi_lst.tmp
done
echo "}" >>/tmp/scst.tmp


tgts=0

echo "TARGET_DRIVER iscsi {" >>/tmp/scst.tmp
echo "enabled 1" >>/tmp/scst.tmp

while read line; do

        echo "TARGET $IQN:tgt$tgts {" >>/tmp/scst.tmp
        echo "InitialR2T No" >>/tmp/scst.tmp
        echo "ImmediateData Yes">>/tmp/scst.tmp
        echo "FirstBurstLength 131072" >>/tmp/scst.tmp
        echo "MaxRecvDataSegmentLength 131072" >>/tmp/scst.tmp
        echo "enabled 1" >>/tmp/scst.tmp
        echo "LUN 0 $line" >>/tmp/scst.tmp
        echo "}" >>/tmp/scst.tmp

        let tgts=tgts+1
done</tmp/scsi_lst.tmp



echo "}" >>/tmp/scst.tmp

if [ -f /etc/scst.conf ]; then
cp -f /etc/scst.conf /etc/scst.conf_`date +%m%d%y%H%M%S`
echo Created backup of  existing /etc/scst.conf as /etc/scst.conf_`date +%m%d%y%H%M%S`
fi
cat /tmp/scst.tmp >/etc/scst.conf
echo Created new /etc/scst.conf
rm -f /tmp/scst.tmp
rm -f /tmp/scsi_lst.tmp

echo --- Done ---



MHVTL:
1x L700 tape library
4x IBM ULT3580-TD4 (LTO4)
Tapes: 19x 10GB

Tested with:
NetBackup 7.0.1 installed on Windows 2008 x64 R2.

Link (mhvtl_2.tar.gz ~650MB):
http://www.multiupload.com/88S4DGT3HZ
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

thangTT
Thank you very much Marekk, the image is working well, especially for my case is VMware server 2.0
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

alkado
In reply to this post by marekk
Lo, may be may post some how-to to create the same VM...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

Quindor
In reply to this post by marekk
I've been trying to build the same configuration (ubuntu 10.10 with mhvtl and scst) for a few days now. But am unable to get it installed correctly. One error after the other pops up. :(

If you could share how you where able to manage this, it would be greatly appreciated! Especially the SCST part seems to be causing trouble. I just can't get the kernel modules applied, whatever I try. I tried bashing the computer with the empty coke bottles that has grown next to the side of it, but it only beeped back at me! Still not kernel modules! :(

Hope you can help!
DMo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

DMo
The SCST site has a fairly comprehensive HOWTO.

In addition, this member posted his steps getting SCST installed and configured.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

Quindor
A friend with a lot more linux experience helpt me to build the custom kernel with SCST. Took us about 2 days, but we finally managed to do it. Sadly, the experience needed for SCST is far more then for say TGT because of the kernel modules involved and the... in my opinion... completely unclear way how to build and do this, at least for someone who has no experience with it.

As said, it's done and working great. I wanted to thank marekk for his excellent dynamic SCST configure script. Saves a lot of work when you are testing with different configurations! :D
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

deepak026
In reply to this post by marekk
Hi marekk,

Can you please post the steps to install SCSt on Ubuntu? I'd like to build it on natty.

Thanks in advance,

Deepak

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

marekk
Please look at my new post:

http://mhvtl-linux-virtual-tape-library-community-forums.966029.n3.nabble.com/Ubuntu-11-04-virtual-machine-with-ISCSI-MHVTL-0-18-16-and-STGT-1-0-17-tp3056965p3056965.html

You can use STGT on ubuntu which is included and there is no need to patch and recompile the kernel. If you want to install newest version of stgt simply download it from stgt.sourceforge.net, compile and install. Then after start of mhvtl you can use my script to setup iscsi targets.

marekk
nia
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

nia
Administrator
In reply to this post by deepak026
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

deepak026
In reply to this post by marekk
Hello Mark,

I am getting these errors while running the script to create the iscsi targets.

tgtadm: this target already exists
tgtadm: this logical unit number already exists
tgtadm: this access control rule already exists
Adding target 1 - changer1 - /dev/sg6
iscsiscript.sh: 38: changern++: not found
iscsiscript.sh: 38: devicen++: not found
tgtadm: this target already exists
tgtadm: this logical unit number already exists
tgtadm: this access control rule already exists
Adding target 1 - drive1 - /dev/sg2
iscsiscript.sh: 38: driven++: not found
iscsiscript.sh: 38: devicen++: not found
tgtadm: this target already exists
tgtadm: this logical unit number already exists
tgtadm: this access control rule already exists
Adding target 1 - drive1 - /dev/sg3
iscsiscript.sh: 38: driven++: not found
iscsiscript.sh: 38: devicen++: not found
tgtadm: this target already exists
tgtadm: this logical unit number already exists
tgtadm: this access control rule already exists
Adding target 1 - drive1 - /dev/sg4
iscsiscript.sh: 38: driven++: not found
iscsiscript.sh: 38: devicen++: not found
tgtadm: this target already exists
tgtadm: this logical unit number already exists
tgtadm: this access control rule already exists
Adding target 1 - drive1 - /dev/sg5
iscsiscript.sh: 38: driven++: not found
iscsiscript.sh: 38: devicen++: not found


Help please.

Deepak
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

marekk
hmm it looks like there is a problem with auto increment of changern and devicen variables. On my ubuntu installation and bash it works - try to replace ((changern++)) and ((devicen++)) with:
let "changern += 1"
let "devicen += 1"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Ubuntu 10.10 virtual machine with MHVTL 0.18-13 and ISCSI support

deepak026
Sorry, the oginigal script worked. there was some problem while doing copy from web page to vi editor. i copied it to gedit and it is working fine now.

Sorry again.

Deepak
Loading...