mhVTL installation on Ubuntu & CentOS

mhVTL is an open source Virtual Tape Library which emulates standaard tape libraries.
This can be usefull when testing backup scenarios or tape handling.

Here is how I set it up on Ubuntu, on CentOS the procedure is similar.

I installed Ubuntu server 64-bits 12.04 LTS.
Install the VMware tools if running in a virtual environment.

Add the following packages:
Sudo aptitude install gcc
Sudo aptitude install make
Sudo aptitude install linux-headers-$(uname -r)
Sudo aptitude install lzop liblzo2-2 liblzo2-dev zlib1g-dev mt-st
Sudo aptitude install mtx sg3-utils lsscsi

Create the user and group for running the VTL software, also the software and config directory are created:
sudo groupadd -r vtl
sudo useradd -r -c “Virtual Tape Library” -d /opt/mhvtl -g vtl vtl -s /bin/bash
sudo mkdir -p /opt/mhvtl
sudo mkdir -p /etc/mhvtl

Download the source mhvtl. There are several pre-compiled packages for different operating systems, use them if you can.

https://sites.google.com/site/linuxvtl2/mhvtl-2013-06-29.tgz?attredirects=0

Extract the software:
Sudo tar xzvf mhtvtl…….

Compile the kernel module:
Cd mhvtl-1.4/kernel
Make
Sudo make install

Compile the software:
Cd mhvtl-1.4
Make
Sudo make install

Change the user and group on the compiled software:
sudo chown -Rf vtl:vtl /opt/mhvtl
sudo chown -Rf vtl:vtl /etc/mhvtl

A few softlonks need to be created otherwise the software won’t work.
sudo ln -s /usr/lib64/libvtlscsi.so /usr/lib/
sudo ln -s /usr/lib64/libvtlcart.so /usr/lib/

I disabled the firewall:
sudo ufw disable

Start the vtl software:
sudo service mhvtl start

By default two libraries with 8 drives are present:

[root@SBVTL02 ~]# lsscsi -g
[1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0 /dev/sg0
[2:0:0:0] disk VMware Virtual disk 1.0 /dev/sda /dev/sg1
[3:0:0:0] mediumx STK L700 0103 /dev/sch0 /dev/sg10
[3:0:1:0] tape IBM ULT3580-TD5 0103 /dev/st0 /dev/sg2
[3:0:2:0] tape IBM ULT3580-TD5 0103 /dev/st1 /dev/sg3
[3:0:3:0] tape IBM ULT3580-TD4 0103 /dev/st2 /dev/sg4
[3:0:4:0] tape IBM ULT3580-TD4 0103 /dev/st3 /dev/sg5
[3:0:8:0] mediumx STK L80 0103 /dev/sch1 /dev/sg11
[3:0:9:0] tape STK T10000B 0103 /dev/st4 /dev/sg6
[3:0:10:0] tape STK T10000B 0103 /dev/st5 /dev/sg7
[3:0:11:0] tape STK T10000B 0103 /dev/st6 /dev/sg8
[3:0:12:0] tape STK T10000B 0103 /dev/st7 /dev/sg9

Now you can configure your backup application.
Backup images are stored in the /opt folder. Make sure you have enough room to store your backup.

NetBackup 7.5.0.6 drives from mhVTL screenshot:
NetBackup_VTL_Drives

 

CommVault 10 SP3+ mhVTL screenshot:
CV10-mhVTL

More info can be found here: https://sites.google.com/site/linuxvtl2/

This entry was posted in VTL.