DIY iSCSI Virtual Tape Library



DIY iSCSI Virtual Tape Library (Work in progress)

Please note this posting in not done and is still a work in progress. as I have time to work with it I will add more and finalize it.

AOnline Backupny tape drive with a reasonable amount of space is expensive, not to mention the tapes. A LTO 5 (1.5/3TB) Drive runs $1500 + and tapes are $30 + each. For my systems I use iBackup Online Backup which is inexpensive ( about $10 for 100GB) and can provide backup for Exchange 2003/2007/2010, SQL 2005/2008/2008R2, Multiple computers per account, Linux/Windows XP-2012 Servers and workstations, has a trash can that stays for 30 days and does not count against you total usage. It also keeps multiple revisions of a file so you can always revert back. This is great for critical data, very bad day on the scale of a previously unknown volcano just exploded under your data center or home day off site critical data storage, however, for small environments and full for server restore it still may not be a feasible.  With the amount I toy with my home network I need a backup solution that can provide full server recovery. Storage Space for this I have, however the backup solution I have is System Center Data Protection Manager (SCDPM) 2012 and while it does have short term disk storage, it does not have long term OH S#$% I can't believe I just deleted all my VMs recovery with out a tape drive. I have looked for reasonable Virtual Tape Libraries and Virtual Tape Drives for Windows but have not had any luck. So Here I want to Build an iSCSI Virtual Tape Drive on my Linux box using mhVTL.

I am Building this on OpenSUSE Linux (see  Installing OpenSUSE)

1. Install the Devel kernel so from the command line terminal run and install zlib as su or using sudo:

zypper install kernel-desktop-devel

yast --install make

yast --install binutils

yast --install gcc

yast --install zlib

yast --install zlib-devel

yast --install lzo-devel

yast --install mt_st

yast --install mtx

2. add drives with enough  space to host your tape tibrary and mount it to /opt/vtl

3. Now create a user for your Virtual Tape Library from the command terminal:

useradd -c "mhvtl user" vtl

groupadd  vtl

4. Download mhvtl-2013-08-29.tgz, So from the commandline terminal, either as root (su) or using sudo run the following commands in a safe (temp) location then start to build it:


tar xvfz mhvtl-2013-08-29.tgz

cd mhvtl-1.4/kernel


make install

cd ..


make install

5. Now we need to determine where to put it. you will need a partition with enough space to keep your backups. I added a large disk and mounted it to the root as /opt/vtl.  if you put it somewhere else, you will have to edit the device config below else skip to step 7

6. (Only if you mounted your disk for tape storage somewhere other than /opt/vtl) you need to tell it where your home drive is. you will do thie in the device.conf file located in the /etc/mhvtl directory so from the command terminal enter the following commands:

cd /etc/mhvtl

nano device.conf

6. Then you will find the Home directory line and change it to the location you want to store your tapes:


7. Now change the owner of the mhvtl folder to vtl and start the service from the terminal from the command terminal:

chown vtl /opt/mhvtl

/etc/init.d/mhvtl start

8. Now lets check to make sure our service is started and we have scsi devices so fyou will need to run the following commands:

lsscsi -g


ps -ef|grep vtl


8. Now we need to install open-iscsi from the terminal:

yast --install scst

yast --install scst-devel

yast --install scst-iscsi

yast --install scst-kmp-default


cd scst-2.1.0

make enable_proc


9. I found I had to move the perl SCST folder to the proper Perl5 folder, you may need to adjust this based on your version of perl.

mv /usr/lib/perl5/vendor_perl/5.12.1/SCST /usr/lib/perl5/vendor_perl/5.16.2

Now that you have built a tape library, what are you going to do with it? Well I want to integrate it into my  SCDPM 2012 (System Center Data Protection Manager). The problem with this is that this will not recognise regular iSCSI devices but it will recognize fiber Channel so if you are lucky enough to have fiber channel cards and all the goodies that you need to go along with it (in Theory) you should be able to make it work. Hyper-V 2012 does support synthetic Fiber Channel cards but this means you must have a physical fiber Channel card that supports iSCSI. These I have so as Time allows I will work to integrate them. Stay tuned.


This website and its content is copyright of ITHierarchy Inc - © ITHierarchy Inc 2013-2015. All rights reserved.

Any redistribution or reproduction of part or all of the contents in any form is prohibited other than the following:

  • you may print or download to a local hard disk extracts for your personal and non-commercial use only
  • you may copy the content to individual third parties for their personal use, but only if you acknowledge the website as the source of the material

You may not, except with our express written permission, distribute or commercially exploit the content. Nor may you transmit it or store it in any other website or other form of electronic retrieval system.