Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

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

Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

marekk
Ubuntu Server 11.04 x64 (without kernel patching and recompilation)
VMware Virtual Machine (Fusion, Workstation)

IP: 192.168.52.143 (/etc/sysconfig/network)
login: user1
pass: user1
root - "sudo su -"

300 GB btrfs filesystem on lvm (lvm and btrfs can be easily resized)
___________________________

mhvtl 0.18-16
stgt 1.0.17 (ISCSI targets)

1x L700
4x LTO4 (compression factor=1)
60x LTO4 tape (5GB)

___________________________

ISCSI STGT targets are created automatically after mhvtl start.

start/stop commands:
/etc/init.d/start-mhvtl-iscsi start
/etc/init.d/start-mhvtl-iscsi stop

___________________________

script used for iscsi targets creation:

/root/scripts/tgt_add.sh

#!/bin/bash

devicen=1
driven=1
changern=1
iqn="iqn.2011-06.vtl.mk"

for device in `lsscsi -g | egrep 'tape|mediumx' | sed 's/ \+/,/g'`
do
        type=`echo $device | cut -d',' -f2`
        sg=`echo $device | cut -d',' -f7`

        if [ "$type" = "mediumx" ]
        then
                tgtadm --lld iscsi --mode target --op new --tid $devicen --targetname $iqn:changer$changern
                tgtadm --lld iscsi --mode logicalunit --op new --tid $devicen --lun 1 --bstype=sg --device-type=pt -b $sg
                tgtadm --lld iscsi --op bind --mode target --tid $devicen -I ALL
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name InitialR2T --value No
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name FirstBurstLength --value 131072
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name MaxRecvDataSegmentLength --value 131072
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name ImmediateData --value Yes
                echo Adding target $devicen - changer$changern - $sg
                ((changern++))
        else
                tgtadm --lld iscsi --mode target --op new --tid $devicen --targetname $iqn:drive$driven
                tgtadm --lld iscsi --mode logicalunit --op new --tid $devicen --lun 1 --bstype=sg --device-type=pt -b $sg
                tgtadm --lld iscsi --op bind --mode target --tid $devicen -I ALL
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name InitialR2T --value No
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name FirstBurstLength --value 131072
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name MaxRecvDataSegmentLength --value 131072
                tgtadm --lld iscsi --mode target --op update --tid $devicen --name ImmediateData --value Yes
                echo Adding target $devicen - drive$driven - $sg
                ((driven++))
        fi

        ((devicen++))

done

___________________________

BTRFS filesystem has snapshot functionality so we can create snapshots of mhvtl setting and tape data, for example:
btrfs subvolume snapshot  /opt/mhvtl /opt/snapshot/mhvtl_12_06_2001
btrfs subvolume snapshot  /opt/etc /opt/snapshot/etc_12_06_2001
(/etc/mhvtl linked to /opt/etc/mhvtl)

___________________________

Backup and restore tested with NetBackup 7.0.1 installed on Windows 2008 x64 R2
___________________________

Virtual machine can be imported into VMware ESX infrastructure using VMware Converter.
__________________________

links (mhvtl3.rar - 600MB):
http://www.filesonic.com/file/1204536101
http://www.multiupload.com/46PG51CWW0
nia
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

nia
Administrator
marekk,

MHVTL Web GUI add-on would make a good addition to your already prepared vm's to make a complete appliance

http://mhvtl-linux-virtual-tape-library-community-forums.966029.n3.nabble.com/ANNOUNCE-Web-Console-GUI-add-on-for-mhvtl-tp3136431p3136431.html


Check it out and let me know what you think ..

nia
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

marekk
It's very good idea :) I will include it in next vm.

marekk
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

vladdrac
Excellent work, thanks. Looking forward for the next version with the web-gui
nia
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

nia
Administrator
The Web GUI has been improved much since the initial release ..
I am much happier with it now than before since I moved much of the code to select tags in forms instead of plain input.
This makes it much simpler to operate .. We are not suppose to think too much when using GUI's

Examples:








Regards,
nia
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

Stoyan
In reply to this post by marekk
Thank you so much for the 3 virtual machines, you've made.

Are you planing to do more?

Have you thought about other guest "flavors" - KVM or VBox, or even a VMware image, that can be deployed on ESX/ESXi?
I haven't had a chance to work with Hyper-V, so I'm not asking about it :).

Also, what about CentOS with WebGUI, iSCSI target, a VTL with the option to add extra disk space for the tapes/RAIDs (like the 'real' VLS/D2D/DD/etc.) - can it be done?

I'm asking like this, because these images are pretty easy to be used, even if you're not that familiar with Linux - for some of my peers, this is a little fresh air - not everyone uses CLIs with ease.

HP Data Protector is pretty stubborn to set with btrfs, it's Media Agent, however, works great with MHVTL on CentOS5.6 - my KVM env is currently 'work_in_progresssss_between_the_zzzzzs', but when possible, I'll put some info/screens :).

And a funny thought - can MHVTL be 'forked' to Windows with Cygwin/CygwinX?

I want to use this opportunity to thank also to Mark Harvey, nia and crippa.andrea for all your great work and wonderful posts.
As a HPDP troubleshooter, this great tool and your helpful posts helped me a LOT - to understand, use and expand my knowledge on the software, on Linux and its kernel, on the hardware and operations with it, on the SCSI, ..., I can go on.
Thank you!

All best,
 Stoyan
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

Mark Harvey
Administrator
Stoyan wrote
Also, what about CentOS with WebGUI, iSCSI target, a VTL with the option to add extra disk space for the tapes/RAIDs (like the 'real' VLS/D2D/DD/etc.) - can it be done?
If the underlying volumes are controlled by LVM, then this is an easy thing to do.

Stoyan wrote
And a funny thought - can MHVTL be 'forked' to Windows with Cygwin/CygwinX?
Rather than a 'fork', I'd be happy to include the new driver + what ever user-space changes needed into one source.

I'd love to see somebody who wants to dabble in Windows create a pseudo SCSI hba driver.. Not sure if Windows has a concept of char device driver(s).

The user-space code should be easily compiled on cygwin. If not the changes will be minimal.

Stoyan wrote
As a HPDP troubleshooter, this great tool and your helpful posts helped me a LOT - to understand, use and expand my knowledge on the software, on Linux and its kernel, on the hardware and operations with it, on the SCSI, ..., I can go on.
The best reason to use the 'mhvtl' package :)
Regards from Australia
Mark Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

Stoyan
Thank you for your answer.

Unfortunately, since I'm not a programmer, I did what i do best - I went on the Sourceforge and searched around:

http://sourceware.org/cygwinports/

 - the Cygwin Ports project, and especially one part from it -

Fedora Cygwin - quote: "This project provides Cygwin cross-compilers for Fedora and other RPM-based Linux distributions." - http://sourceforge.net/projects/fedora-cygwin/

The other thing, that came to my mind was, even it may sound hillarious, Demontools and their SCSI emulated driver, but I have no idea how close is their source.

WinQEMU is a Windows native version of QEMU, but as far as I know - 32-bit - http://sourceforge.net/projects/winqemu/.



I was afraid to put the full-size thing.
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

floogy
This post was updated on .
In reply to this post by marekk
Hi marekk,

thank you, I used your script to generate the iSCSI targets on my ubuntu/oneric mhvtl install on virtualbox.
I then searched on start>search for programs iscsi on my Windows 7 host and clicked on setup iscsi initiator. I sucessfully connected to the ubuntu vm and could connect both tapelibs and all 8 drives. But I only see the iscsi initiator in the device manager. Also I didn't find any driver for the storage tek L80, IBM L700 nor for the drives.

What am I missing?

Thanks in advance

floogy

iSCSI Initiator Report on win7
http://paste.pocoo.org/show/497816/

iSCSI Initiator
Device Manager
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

Stoyan
I think, this may help you:

http://catalog.update.microsoft.com/v7/site/Search.aspx?q=tape%20drivers

Also, have in mind, that in Win 7/2008 (kernel 6+), there is no RSM, you have to set the devices 'Enabled', from the device mngr.

Have a great weekend!

PS:
C:\Documents and Settings\Administrator>devbra -dev

Tape    QUANTUM:SDLT600  Path: "Tape3:0:4:0C"  SN: "XYZZY_C4"
        Description: CLAIMED:Quantum SDLT1
        Revision: 0A0A  Device type: sdlt [14]  Flags: 0x0011

Tape    QUANTUM:SDLT600  Path: "Tape2:0:3:0C"  SN: "XYZZY_C3"
        Description: CLAIMED:Quantum SDLT1
        Revision: 0A0A  Device type: sdlt [14]  Flags: 0x0011

Tape    QUANTUM:SDLT600  Path: "Tape1:0:2:0C"  SN: "XYZZY_C2"
        Description: CLAIMED:Quantum SDLT1
        Revision: 0A0A  Device type: sdlt [14]  Flags: 0x0011

Tape    QUANTUM:SDLT600  Path: "Tape0:0:1:0C"  SN: "XYZZY_C1"
        Description: CLAIMED:Quantum SDLT1
        Revision: 0A0A  Device type: sdlt [14]  Flags: 0x0011

Exch    QUANTUM:PX720  Path: "Changer0:0:0:0"  SN: "XYZZY_A"
        Description: CLAIMED:Quantum PX720 Series
        Revision: 4.00  Flags: 0x0016  Slots: 22  Drives: 4
        Drive(s) SN:
                "XYZZY_C1"
                "XYZZY_C2"
                "XYZZY_C3"
                "XYZZY_C4"
fmk
Reply | Threaded
Open this post in threaded view
|

Re: Ubuntu 11.04 virtual machine with ISCSI (MHVTL 0.18-16 and STGT 1.0.17)

fmk
In reply to this post by marekk
Hi Marek,

Thanks a lot for creating this VM, it really helped me as I have no knowledge about Linux/Unix platforms. I was able to convert your VM to VM8 version and deployed it on my ESXi 5.1. Mapped it with Windows iSCSI initiator and it rocks my NetBackup.

Special request, can you please create new VM with GUI? I did find instructions to install GUI, but it is still a big deal for me.