I am using MHVTL for quite a while now. MHVTL emulates a configurable tape library and stores the data in the file system. Normally when testing i am installing the backup software directly where MHVTL runs. But that only works for simple configurations.
For complex configurations for instance with drive sharing this approach does not work. A few days ago i sumbled accross the idea to export the tape library and the drives via iSCSI. So i made a VM based on Oracle Enterprise Linux 6 Update 2 plus the most recent MHVTL version plus self-compiled tgt to test this. And in fact: It does work without any major problems.
With this blog post i would like to share my VM with all interested people. You can download the VM here (728 MB). The root password is ‘root’.
VM Details
The VM itself is based on Oracle Enterprise Linux 6 Update 2 and pre-configured with MHVTL (a tape emulation software) and tgt (an iSCSI implementation). MHVTL is pre-configured as a library with 39 slots and 4 LTO-5 drives (cartridge capacity of 500 MB).
TGT is also pre-configured to export the library and tapes via iSCSI. The configuration is in /etc/tgt/targets.conf. Everything starts up automatically. After starting the VM you have to configure the network youself!
Altough this VM was developed with VMWARE you can use it under Virtual Box as well. Everything should be compatible. The hardware is configured to 2 CPU Cores, 2 GB RAM and consists of two virtual disks: One disk “sda” with 20 G used in a LVM for volume group ‘vgroot’ and a second disk “sdb” with 100 GB used in a LVM for volume group ‘vgvtl’.
Volume Groups ‘vgroot’ and ‘vgvtl’ are intended to separate the operating system from the VTL tape data. The file system mounted on /opt/mhvtl is a BTRFS for maximum flexibility. Note that BTRFS is still marked as ‘experimental’.
The VM should be compatible with any kind of backup software supporting tape libraries. I can confirm it works with EMC Networker.
Using the library over iSCSI
To present the tape library and its drive to a client using iSCSI just do on the client:
iscsiadm --mode discovery --type sendtargets --portal <VTL VM IP> iscsiadm --mode node --targetname <FROM ABOVE> --portal <VTL VM IP> --login
After that you should see the tape drives and the changes with ‘lsscsi -g’. If EMC Networker is installed you can also use the ‘inquire’ tool:
[root@mhvtl-client ~]# inquire scsidev@0.0.0:NECVMWarVMware IDE CDR101.00|CD-ROM, /dev/sg0 scsidev@1.0.0:VMware, VMware Virtual S1.0 |Disk, /dev/sg1 scsidev@1.1.0:VMware, VMware Virtual S1.0 |Disk, /dev/sg2 scsidev@2.0.0:IET Controller |(Unknown Device Type c), /dev/sg3 S/N: beaf10 ATNN=IET 00010000 scsidev@2.0.1:IBM ULT3580-TD5 0102|Tape, /dev/nst0 S/N: XYZZY_A2 ATNN=IBM ULT3580-TD5 XYZZY_A2 WWNN=50223344AB000200 scsidev@2.0.2:IBM ULT3580-TD5 0102|Tape, /dev/nst1 S/N: XYZZY_A1 ATNN=IBM ULT3580-TD5 XYZZY_A1 WWNN=50223344AB000100 scsidev@2.0.3:IBM ULT3580-TD5 0102|Tape, /dev/nst2 S/N: XYZZY_A3 ATNN=IBM ULT3580-TD5 XYZZY_A3 WWNN=50223344AB000300 scsidev@2.0.4:IBM ULT3580-TD5 0102|Tape, /dev/nst3 S/N: XYZZY_A4 ATNN=IBM ULT3580-TD5 XYZZY_A4 WWNN=50223344AB000400 scsidev@2.0.5:STK L700 0102|Autochanger (Jukebox), /dev/sg8 S/N: XYZZY_A ATNN=STK L700 XYZZY_A WWNN=50223344AB000000
If that was successfull you can for instance configure the tape library:
[root@mhvtl-client ~]# jbconfig Jbconfig is running on host localhost (Linux 2.6.32-300.3.1.el6uek.x86_64), and is using mhvtl-client as the NetWorker server. 1) Configure an AlphaStor Library. 2) Configure an Autodetected SCSI Jukebox. 3) Configure an Autodetected NDMP SCSI Jukebox. 4) Configure an SJI Jukebox. 5) Configure an STL Silo. What kind of Jukebox are you configuring? [1] 2 14484:jbconfig: Scanning SCSI buses; this may take a while ... Installing 'Standard SCSI Jukebox' jukebox - scsidev@2.0.5. What name do you want to assign to this jukebox device? JUKEBOX 15814:jbconfig: Attempting to detect serial numbers on the jukebox and drives ... 15815:jbconfig: Will try to use SCSI information returned by jukebox to configure drives. Turn NetWorker auto-cleaning on (yes / no) [yes]? no The following drive(s) can be auto-configured in this jukebox: 1> LTO Ultrium-5 @ 2.0.2 ==> /dev/nst1 2> LTO Ultrium-5 @ 2.0.1 ==> /dev/nst0 3> LTO Ultrium-5 @ 2.0.3 ==> /dev/nst2 4> LTO Ultrium-5 @ 2.0.4 ==> /dev/nst3 These are all the drives that this jukebox has reported. To change the drive model(s) or configure them as shared or NDMP drives, you need to bypass auto-configure. Bypass auto-configure? (yes / no) [no] Jukebox has been added successfully The following configuration options have been set: > Jukebox description to the control port and model. > Autochanger control port to the port at which we found it. > Autocleaning off. > Barcode reading to on. > Volume labels that match the barcodes. You can review and change the characteristics of the autochanger and its associated devices using the NetWorker Management Console. Would you like to configure another jukebox? (yes/no) [no]
Conclusion
I hope you like this VM and it makes you life a little bit easier. If you have any comments or problems feel free to leave a comment or drop me a mail.
Great informaiton. Exactly what i was looking for.
Going to set up 7.6.3 and 7.6.2 test environments for my customer.
Thanks a lot.
I downloaded your VM .. but there are no root credentials to login … would you be able to share it with me please ?
@Balu
NM … found it myself .. for other readers the credentials are root/root. Enjoy and thanks for the great VM.
Hey thanks for the VM!
I am pretty new on mhvtl, so your preconfigured VM is a great start for me.
I am planning to test it out on netbckup7.1 on server 2003. Have you tried it out?
Would I encounter driver issues for the drives? What is you recommendation? :)
Your response will be highly appreciated!
Thank in advanced buddy!
gov
I have not tried it with Netbackup. You´re welcome to post your experiences here.
However i tried it on Windows and there should be no driver issues…
Ronny
Hi there.
First of all, sorry for my pour english.
Can I use this VM to simulate RMAN backups with sbt allocation?
Best regards.
att
Vitor Jr
Hi,
yes you can use the VM for that.