{"id":96,"date":"2010-07-04T14:09:56","date_gmt":"2010-07-04T02:09:56","guid":{"rendered":"http:\/\/www.mdickinson.dnsalias.org\/php\/wordpress\/?p=96"},"modified":"2010-07-20T20:47:59","modified_gmt":"2010-07-20T08:47:59","slug":"vtl-virtual-tape-library","status":"publish","type":"post","link":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=96","title":{"rendered":"VTL &#8211; Virtual tape library"},"content":{"rendered":"<p>For some reason I thought this would be a good idea, something fun to play with anyway. But of course I wanted to make it complicated and make the drives network acessable.<\/p>\n<p>Anyway, the virtual tape library itself was a breeze to setup, after mucking about for a month or so reading all the scsi specs and drawing lots of scribled diagrams on how I was going to make it work, I discovered that yet again I was trying to re-invent something that had already been done.<\/p>\n<p>MHVTL &#8211; Virtual tape library with automatic volume changer<br \/>\nSoftware : http:\/\/sites.google.com\/site\/linuxvtl2\/<br \/>\nUser Forum: http:\/\/mhvtl.nimsa.us\/<\/p>\n<p>Implementation took about 5 minutes (excluding the 4hrs taken to backup the server before I started mucking about).<\/p>\n<p>Before<br \/>\n[root@falcon ~]# lsscsi -g<br \/>\n[0:0:0:0]    disk    Maxtor   Basics Desktop   0122  \/dev\/sdb   \/dev\/sg3<br \/>\n[1:0:0:0]    disk    ATA      ST3802110A       3.AA  \/dev\/sda   \/dev\/sg0<br \/>\n[2:0:0:0]    cd\/dvd  SAMSUNG  CD-ROM SC-152L   C100  \/dev\/sr0   \/dev\/sg1<br \/>\n[2:0:1:0]    cd\/dvd  CyberDrv CW068D CD-R\/RW   120D  \/dev\/sr1   \/dev\/sg2<\/p>\n<p>And five minutes later, the after<br \/>\n[root@falcon log]# lsscsi -g<br \/>\n[0:0:0:0]    disk    Maxtor   Basics Desktop   0122  \/dev\/sdb   \/dev\/sg3<br \/>\n[1:0:0:0]    disk    ATA      ST3802110A       3.AA  \/dev\/sda   \/dev\/sg0<br \/>\n[2:0:0:0]    cd\/dvd  SAMSUNG  CD-ROM SC-152L   C100  \/dev\/sr0   \/dev\/sg1<br \/>\n[2:0:1:0]    cd\/dvd  CyberDrv CW068D CD-R\/RW   120D  \/dev\/sr1   \/dev\/sg2<br \/>\n[3:0:0:0]    mediumx SPECTRA  PYTHON           550V  \/dev\/sch0  \/dev\/sg12<br \/>\n[3:0:1:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st0   \/dev\/sg4<br \/>\n[3:0:2:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st1   \/dev\/sg5<br \/>\n[3:0:3:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st2   \/dev\/sg6<br \/>\n[3:0:4:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st3   \/dev\/sg7<br \/>\n[3:1:0:0]    mediumx SPECTRA  PYTHON           550V  \/dev\/sch1  \/dev\/sg13<br \/>\n[3:1:1:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st4   \/dev\/sg8<br \/>\n[3:1:2:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st5   \/dev\/sg9<br \/>\n[3:1:3:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st6   \/dev\/sg10<br \/>\n[3:1:4:0]    tape    IBM      ULT3580-TD4      550V  \/dev\/st7   \/dev\/sg11<\/p>\n<p>Then I hit major problems with making it all network acessable via iSCSI. <\/p>\n<p>Lots of users have had success using SCST ( http:\/\/scst.sourceforge.net\/ ) to provide iSCSI target support for the tape robot and virtual tape support, most network backup solutions seem to work with SCST, the MHVTL forum link above has lots of examples in the SCST discussion section showing screen shots backup tools detecting and using the drives (windows tools, TSM etc).<\/p>\n<p>Of course SCST will not compile under the Fedora core 13 OS. And SCST is not available in the fedora repositories either.<\/p>\n<p>But Fedora repositories did have scsi-target-utils. So I installed those and had a play. No tape support !. The fedora solution supports only block devices (disks), and while it allows VMs to boot from networked iSCSI devices (and may play with later) that is not what I was looking for at this time. If you are interested in booting your servers from iSCSI devices using standard fedora software try http:\/\/berrange.com\/posts\/2010\/05\/05\/provisioning-kvm-virtual-machines-on-iscsi-the-hard-way-part-1-of-2\/ which has a good short howto. I guess for RedHat in their virtual machine push disk support is the priority, but no good to me.<\/p>\n<p>For what I was trying to do it looks like only SCST provides full iSCSI features including virtual tape library support for Linux. While it has patches for vanilla kernels (although the latest version I pulled down had patches for a kernel version that didn&#8217;t exist on kernel.org) I tried to compile it with the makefile flag CONFIG_SCST_STRICT_SERIALIZING set which should have negated any need for kernel patching&#8230;<br \/>\n&#8230;the Fedora kernel header libraries (or gcc libraries) are missing a function call required, frustratingly only the one, the only error in the make is<br \/>\nscst-1.0.1.1\/src\/scst_priv.h:348: error: implicit declaration of function \u2018scsi_execute_async\u2019<\/p>\n<p>But thats a show stopper for me.<br \/>\nAlthough not strictly, I am going to install Ubuntu on my spare server to see if that works, if not I&#8217;ll try Mint which by all reports is a nice desktop to end up with at least.<\/p>\n<p>Getting slightly frustrated with Fedora spins, I mean why are they writing their own iSCSI support when SCST is already way ahead (ahh, SCST do seem to have a commercial arm and have it installed\/supported in commercial accounts, so redhat can&#8217;t use a working solution but must write their own in order to charge support for it. Maybe thats not true, but there is a working open source solution and redhat have decided to reinvent the wheel, they only have a few spokes in place at the moment, while scst goes rolling on).<\/p>\n<p>I&#8217;ll install Ubuntu server on my spare box next weekend, and see if I can get SCST working. <\/p>\n<p>\nUpdate: 2010\/07\/20. I may not have got scsi interfaces to it working, or automatic tape loading (that I assume is supposed to happen), but by manually loading virtual tapes on devices and doing a backup to the virtual device, then a restore from the virtual device, it all works !. Ok, there is a kernel oops for every backup and restore (backup pherhaps because it prompts for permission to overwrite the character device before using it which is not correct behaviour), but the restored files are (as far as diff can tell) identical to the backed up files. So all I have to do is figure out the remote scsi bits. Well actually also how to get it to autoload for any request as without that it&#8217;s pretty pointless.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For some reason I thought this would be a good idea, something fun to play with anyway. But of course I wanted to make it complicated and make the drives network acessable. Anyway, the virtual tape library itself was a &hellip; <a href=\"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=96\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-my-nux-thoughts-and-notes"],"_links":{"self":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96"}],"version-history":[{"count":2,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":104,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions\/104"}],"wp:attachment":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}