MHVTL安装--搭建备份软件测试环境的黄金搭档

mhvtl download https://sites.google.com/site/linuxvtl2/home#vtl-getting-started

VTL OS CENTOS6.5 64bit


Backuper Server:Networker8 for Windows Server2008 x64
RedHat/CentOS/Scientific Linux/Oracle Linux distributions:


1.安装MHVTL YUM下载源

If RH 5:
Install the ELRepo RPM for RHEL-5 / SL-5 or CentOS-5
rpm -Uvh http://elrepo.org/elrepo-release-5-4.el5.elrepo.noarch.rpm

If RH 6:
Install the ELRepo RPM for RHEL-6 / SL-6 or CentOS-6
rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm

Install MHVTL packages:
yum -y install kmod-mhvtl mhvtl-utils  zlib-devel mtx mt-st lsscsi sg3_utils scsi-target-utils

2.Start MHVTL Service
service tgtd start
chkconfig tgtd on
services mhvtl start


3.查看虚拟出来的磁带库


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

4.将机械臂和驱动器通过ISCSI的方式映射出去
[root@shop mhvtl]#tgtadm --lld iscsi --op new --mode target --tid 1 -T  iqn.2014-08.com  //iqn.2014-08.com 自定义一个名字即可.
[root@shop mhvtl]#tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 --bstype=sg --device-type=pt -b /dev/sg10
[root@shop mhvtl]#tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 --bstype=sg --device-type=pt -b /dev/sg2
[root@shop mhvtl]#tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 3 --bstype=sg --device-type=pt -b /dev/sg3
[root@shop mhvtl]#tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 4 --bstype=sg --device-type=pt -b /dev/sg4
[root@shop mhvtl]#tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 5 --bstype=sg --device-type=pt -b /dev/sg5
[root@shop mhvtl]# tgtadm --lld iscsi --op show --mode target
[root@shop mhvtl]# tgtadm --lld iscsi --op bind --mode target --tid 1 -I 192.168.109.0/24   //192.168.109.0为安装VTL软件的网段设置targets访问控制策略,允许同一网段访问