cancel
Showing results for 
Search instead for 
Did you mean: 
sdo
Moderator
Moderator
Partner    VIP    Certified

Abstract:

This document describes the ten relatively easy steps to provision an instance of an iSCSI based mhvtl server.  This is followed by a further five steps which you can follow if you want to onboard the mhvtl "tape" functionality into NetBackup.

The associated script automates the 30 or so otherwise tedious steps in provisioning a mixed media "mhvtl" instance of one virtual tape library, plus four virtual tape drives, plus 38 virtual media each of 1GB.  The four virtual tape drives are implemented as two LTO4 plus two LTO5 virtual tape drives, and the virtual media are in two sets, one of 19 virtual LTO4 media, and another of 19 virtual LTO5 media.

.

...see the attached for the entire procedure.

Remember to save the script as a ".sh" file.

 

Comments
GulzarShaikhAUS
Level 6
Partner Accredited Certified

Hi SDO,

Is this the latest Mark Harvey VTL? Have not heard of it in long time now...

sdo
Moderator
Moderator
Partner    VIP    Certified

Yes, the script always downloads (and compiles) the latest version of Mark Harvey's "mhvtl" from GitHub.

GulzarShaikhAUS
Level 6
Partner Accredited Certified

Great job SDO

sdo
Moderator
Moderator
Partner    VIP    Certified

Now also tested to work ok with Windows 2012 R2 running NetBackup Master/Media Server v7.7.2.

The mhvtl and tgt versions were:

23/04/2016 13:23:17  Step 30 - Final summary...
23/04/2016 13:23:17  ...list of SCSI devices...
[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
[2:0:1:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sdb   /dev/sg2
[3:0:0:0]    mediumx STK      L700             0105  /dev/sch0  /dev/sg7
[3:0:1:0]    tape    IBM      ULT3580-TD4      0105  /dev/st0   /dev/sg3
[3:0:2:0]    tape    IBM      ULT3580-TD4      0105  /dev/st1   /dev/sg4
[3:0:3:0]    tape    IBM      ULT3580-TD5      0105  /dev/st2   /dev/sg5
[3:0:4:0]    tape    IBM      ULT3580-TD5      0105  /dev/st3   /dev/sg6
23/04/2016 13:23:17  ...versions used and installed...
23/04/2016 13:23:18  ...script version:    v0.23
23/04/2016 13:23:18  ...OS     version:    2.6.32-573.22.1.el6.x86_64
23/04/2016 13:23:18  ...mhvtl  version:    0.18.17
23/04/2016 13:23:18  ...vtlcmd version:    1.5.4-git-c7ccb7a
23/04/2016 13:23:18  ...tgt    version:    1.0.24
23/04/2016 13:23:18  ...iscsi  version:    6.2.0-873.13.el6
23/04/2016 13:23:18  ...iscsi  listenner:  10.0.9.252
23/04/2016 13:23:18  ...iscsi  target:     iqn.2016-02.us.mhvtl:tgt:vtl02.localdomain
23/04/2016 13:23:18  ...done...
GulzarShaikhAUS
Level 6
Partner Accredited Certified

awesome SDO!!

sdo
Moderator
Moderator
Partner    VIP    Certified

Here's an example log of what should be seen when running the script:

user-mbpro:~ user$ ssh root@10.0.9.252
root@10.0.9.252's password: 
Last login: Sat Apr 23 13:11:23 2016
[root@vtl02 ~]# cd /home/vtladmin/
[root@vtl02 vtladmin]# ls -lash
total 64K
4.0K drwxr-xr-x. 2 root root 4.0K Apr 23 13:16 .
4.0K drwxr-xr-x. 3 root root 4.0K Apr 23 13:15 ..
 56K -rwxr-x---. 1 root root  55K Apr 23 13:16 config-mhvtl-centos67minimal-netbackup.sh
[root@vtl02 vtladmin]# 
[root@vtl02 vtladmin]# ./config-mhvtl-centos67minimal-netbackup.sh 
23/04/2016 13:17:13  
23/04/2016 13:17:13  
23/04/2016 13:17:14  Script details...
23/04/2016 13:17:14  ...script name:     config-mhvtl-centos67minimal-netbackup
23/04/2016 13:17:14  ...script path:     /home/vtladmin
23/04/2016 13:17:14  ...script log:      /home/vtladmin/config-mhvtl-centos67minimal-netbackup.log.txt
23/04/2016 13:17:14  ...script version:  v0.23
23/04/2016 13:17:14  
23/04/2016 13:17:14  Step 1 - Also install mhvtl GUI ?
23/04/2016 13:17:14  ...no, the mhvtl GUI will NOT be installed...
23/04/2016 13:17:14  ...done...
23/04/2016 13:17:15  
23/04/2016 13:17:15  Step 2 - Basic checks...
23/04/2016 13:17:15  ...found CentOS release file...
23/04/2016 13:17:15  ...found CentOS release version...
23/04/2016 13:17:15  ...found network file...
23/04/2016 13:17:15  ...found networking= string...
23/04/2016 13:17:15  ...found networking=yes string...
23/04/2016 13:17:15  ...found /etc/resolv.conf file...
23/04/2016 13:17:15  ...done...
23/04/2016 13:17:16  
23/04/2016 13:17:16  Step 3 - Server details...
23/04/2016 13:17:16  ...OS kernel:    2.6.32-573.el6.x86_64
23/04/2016 13:17:16  .. OS date:      #1 SMP Thu Jul 23 15:44:03 UTC 2015
23/04/2016 13:17:16  ...OS platform:  x86_64 x86_64 x86_64 GNU/Linux
23/04/2016 13:17:16  ...OS release:   CentOS release 6.7 (Final)
23/04/2016 13:17:16  ...hostname:     vtl02.localdomain
23/04/2016 13:17:16  ...done...
23/04/2016 13:17:16  
23/04/2016 13:17:16  Step 4 - Saving files...
23/04/2016 13:17:17  ...now saving copies of files...
23/04/2016 13:17:17  ...saving:                  /etc/fstab
23/04/2016 13:17:17  ...saving:                  /etc/hosts
23/04/2016 13:17:17  ...saving:                  /etc/hosts.allow
23/04/2016 13:17:17  ...saving:                  /etc/hosts.deny
23/04/2016 13:17:17  ...not saved, cannot find:  /etc/httpd/conf/httpd.conf
23/04/2016 13:17:17  ...not saved, cannot find:  /etc/mhvtl/device.conf
23/04/2016 13:17:17  ...not saved, cannot find:  /etc/mhvtl/mhvtl.conf
23/04/2016 13:17:17  ...saving:                  /etc/resolv.conf
23/04/2016 13:17:18  ...saving:                  /etc/selinux/config
23/04/2016 13:17:18  ...saving:                  /etc/ssh/ssh_config
23/04/2016 13:17:18  ...saving:                  /etc/ssh/sshd_config
23/04/2016 13:17:18  ...saving:                  /etc/sudoers
23/04/2016 13:17:18  ...saving:                  /etc/sysconfig/iptables
23/04/2016 13:17:18  ...saving:                  /etc/sysconfig/network-scripts/ifcfg-eth0
23/04/2016 13:17:18  ...saving:                  /etc/sysconfig/network-scripts/ifcfg-eth1
23/04/2016 13:17:18  ...not saved, cannot find:  /etc/sysctl
23/04/2016 13:17:18  ...not saved, cannot find:  /etc/tgt/targets.conf
23/04/2016 13:17:19  ...done...
23/04/2016 13:17:19  
23/04/2016 13:17:19  Step 5 - Determine IP adresses...
23/04/2016 13:17:19  ...calling ip utility...
23/04/2016 13:17:19  ...reading file...
23/04/2016 13:17:19  ...found interface 'eth0' with IP address of '10.0.1.204/24'...
23/04/2016 13:17:19  ...found interface 'eth1' with IP address of '10.0.9.252/8'...
23/04/2016 13:17:19  ...finished reading file...
23/04/2016 13:17:19  
23/04/2016 13:17:20  ...primary dev name:  eth0
23/04/2016 13:17:20  ...primary dev addr:  10.0.1.204/24
23/04/2016 13:17:20  
23/04/2016 13:17:20  ...mhvtl dev name:    eth1
23/04/2016 13:17:20  ...mhvtl dev addr:    10.0.9.252/8
23/04/2016 13:17:20  ...mhvtl IP addr:     10.0.9.252
23/04/2016 13:17:20  ...mhvtl network:     10.0.0.0
23/04/2016 13:17:20  ...mhvtl netmask:     255.0.0.0
23/04/2016 13:17:20  ...mhvtl prefix:      8
23/04/2016 13:17:20  ...done...
23/04/2016 13:17:21  
23/04/2016 13:17:21  Step 6 - Set ONBOOT=yes on all network interfaces...
23/04/2016 13:17:21  ...calling ip utility...
23/04/2016 13:17:21  ...checking interface 'eth0'...
23/04/2016 13:17:21  ...device 'eth0' already has ONBOOT=yes...
23/04/2016 13:17:21  ...checking interface 'eth1'...
23/04/2016 13:17:21  ...device 'eth1' already has ONBOOT=yes...
23/04/2016 13:17:21  ...done...
23/04/2016 13:17:21  
23/04/2016 13:17:22  Step 7 - Ensuring secondary interface does not use DNS...
23/04/2016 13:17:22  ...checking 'eth1'...
23/04/2016 13:17:22  ...file already has PEERDNS=no...
23/04/2016 13:17:22  ...done...
23/04/2016 13:17:22  
23/04/2016 13:17:22  Step 8 - Disabling SELINUX...
23/04/2016 13:17:22  ...now disabling SELinux...
23/04/2016 13:17:22  ...enforcing...
23/04/2016 13:17:22  ...done...
23/04/2016 13:17:23  
23/04/2016 13:17:23  Step 9 - Checking folders for mhvtl...
23/04/2016 13:17:23  ...creating folder '/etc/mhvtl'...
23/04/2016 13:17:23  ...creating folder '/opt/mhvtl'...
23/04/2016 13:17:23  ...creating folder '/src'...
23/04/2016 13:17:23  ...creating folder '/src/mhvtl'...
23/04/2016 13:17:23  ...done...
23/04/2016 13:17:23  
23/04/2016 13:17:23  Step 10 - Install updates, then required packages...
23/04/2016 13:17:24  ...test call to query yum servers...
23/04/2016 13:17:34  ...test call to query yum servers was successful...
23/04/2016 13:17:34  ...calling:  yum clean all
23/04/2016 13:17:35  ...calling:  yum update
23/04/2016 13:19:55  ...installing system tools...
23/04/2016 13:20:11  ...installing perl...
23/04/2016 13:20:12  ...installing tape tools...
23/04/2016 13:20:14  ...installing scsi and iscsi tools...
23/04/2016 13:20:17  ...installing compiler and tools...
23/04/2016 13:20:47  ...touching done yum flag file...
23/04/2016 13:20:47  ...done...
23/04/2016 13:20:47  
23/04/2016 13:20:47  Step 11 - Create system level group and user for 'vtl' for daemon/service...
23/04/2016 13:20:48  ...checking for group 'vtl'...
23/04/2016 13:20:48  ...adding group...
23/04/2016 13:20:48  ..checking for user 'vtl'...
23/04/2016 13:20:48  ...adding user 'vtl'...
23/04/2016 13:20:48  ...done...
23/04/2016 13:20:48  
23/04/2016 13:20:48  Step 12 - Create a normal level group and user for 'vtladmin' for user logon...
23/04/2016 13:20:48  ...checking for folder:  /home/vtladmin
23/04/2016 13:20:49  ...already exists...
23/04/2016 13:20:49  ...checking for group 'vtladmin'...
23/04/2016 13:20:49  ...adding group...
23/04/2016 13:20:49  ...checking for user 'vtladmin'...
23/04/2016 13:20:49  ...adding user 'vtladmin'...
23/04/2016 13:20:49  ...chown /home/vtladmin...
23/04/2016 13:20:49  ...done...
23/04/2016 13:20:49  
23/04/2016 13:20:49  Step 13 - Update firewall...
23/04/2016 13:20:50  ...check is 'iptables' firewall service running...
23/04/2016 13:20:50  ...listing rules...
23/04/2016 13:20:50  ...checking for rule:  -I INPUT -p tcp -m state --state NEW -m tcp --dport 3260 -j ACCEPT
23/04/2016 13:20:50  ...adding rule...
23/04/2016 13:20:50  ...saving tables...
23/04/2016 13:20:51  ...capturing rule list to log file...
23/04/2016 13:20:51  ...done...
23/04/2016 13:20:51  
23/04/2016 13:20:51  Step 14 - Create partition...
23/04/2016 13:20:51  ...checking for any '/dev/sdbN' partitions...
23/04/2016 13:20:51  ...checking whether device '/dev/sdb' exists...
23/04/2016 13:20:51  ...listing device before...
23/04/2016 13:20:51  ...creating partition...
23/04/2016 13:20:51  ...listing device '/dev/sdb' after...
23/04/2016 13:20:52  ...listing partition '/dev/sdb1' after...
23/04/2016 13:20:52  ...done...
23/04/2016 13:20:52  
23/04/2016 13:20:52  Step 15 - Create file-system and mount it...
23/04/2016 13:20:52  ...checking partition '/dev/sdb1'...
23/04/2016 13:20:52  ...did not find a file system, will be created now...
23/04/2016 13:20:53  ...checking for correct file system label...
23/04/2016 13:20:53  ...found expected label '/mhvtl'...
23/04/2016 13:20:53  ...checking whether currently mounted...
23/04/2016 13:20:54  ...will attempt to mount file system...
23/04/2016 13:20:54  ...mounted ok...
23/04/2016 13:20:54  ...checking whether fstab is populated...
23/04/2016 13:20:54  ...appending line to:  /etc/fstab
23/04/2016 13:20:54  ...done...
23/04/2016 13:20:54  
23/04/2016 13:20:54  Step 16 - Enable and start SCSI target utils...
23/04/2016 13:20:54  ...first list...
23/04/2016 13:20:54  ...enable...
23/04/2016 13:20:55  ...second list...
23/04/2016 13:20:55  ...first status check...
23/04/2016 13:20:55  ...first status show failed, service is probably stopped...
23/04/2016 13:20:55  ...start service...
23/04/2016 13:20:55  ...second status check...
23/04/2016 13:20:55  ...done...
23/04/2016 13:20:56  
23/04/2016 13:20:56  Step 17 - Disable IPv6...
23/04/2016 13:20:56  ...listing the current settings...
23/04/2016 13:20:56  ...checking:  net.ipv6.conf.default.disable_ipv6
23/04/2016 13:20:56  ...disabling...
23/04/2016 13:20:56  ...appending line...
23/04/2016 13:20:56  ...disabled...
23/04/2016 13:20:56  ...checking:  net.ipv6.conf.all.disable_ipv6
23/04/2016 13:20:56  ...disabling...
23/04/2016 13:20:57  ...appending line...
23/04/2016 13:20:57  ...disabled...
23/04/2016 13:20:57  ...done...
23/04/2016 13:20:57  
23/04/2016 13:20:57  Step 18 - Disable outgoing weak ssh protocol...
23/04/2016 13:20:57  ...ssh config file exists...
23/04/2016 13:20:57  ...checking for commented out '# Protocol 2,1'...
23/04/2016 13:20:57  ...found the commented out protocol, now editing...
23/04/2016 13:20:57  ...checking for uncommented 'Protocol 2'...
23/04/2016 13:20:58  ...found the required Protocol=2 string...
23/04/2016 13:20:58  ...done...
23/04/2016 13:20:58  
23/04/2016 13:20:58  Step 19 - Configure local server sshd daemon...
23/04/2016 13:20:58  ...found local sshd config file...
23/04/2016 13:20:58  ...checking for PermitRootLogin...
23/04/2016 13:20:58  ...adding 'PermitRootLogin no' to sshd config file...
23/04/2016 13:20:58  ...checking for AllowUsers...
23/04/2016 13:20:58  ...adding 'AllowUsers vtladmin' to sshd config file...
23/04/2016 13:20:58  ...checking for ListenAddress...
23/04/2016 13:20:59  ...replacing 'ListenAddress' to use '10.0.9.252'...
23/04/2016 13:20:59  ...done....
23/04/2016 13:20:59  
23/04/2016 13:20:59  Step 20 - Configure hosts allow and deny...
23/04/2016 13:20:59  ...checking hosts.allow...
23/04/2016 13:20:59  ...checking hosts.allow for sshd...
23/04/2016 13:20:59  ...adding allow for 'sshd: 10.0.0.0/255.0.0.0'...
23/04/2016 13:20:59  ...checking hosts.deny...
23/04/2016 13:20:59  ...checking hosts.deny for sshd...
23/04/2016 13:21:00  ...adding deny for 'sshd: ALL'...
23/04/2016 13:21:00  ...done...
23/04/2016 13:21:00  
23/04/2016 13:21:00  Step 21 - Check whether to reboot...
23/04/2016 13:21:00  ...you need to set the password of our admin account using:  passwd vtladmin
23/04/2016 13:21:00  ...then you need to reboot using:                            reboot now
23/04/2016 13:21:00  ...and then re-run this script, which will carry on with the setup...
23/04/2016 13:21:00  ...creating reboot flag file...
23/04/2016 13:21:00  ...chowning reboot flag file...
23/04/2016 13:21:01  ...script exiting...
[root@vtl02 vtladmin]# passwd vtladmin
Changing password for user vtladmin.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@vtl02 vtladmin]# reboot now
Broadcast message from root@vtl02.localdomain
    (/dev/pts/0) at 13:21 ...
The system is going down for reboot NOW!
[root@vtl02 vtladmin]# Connection to 10.0.9.252 closed by remote host.
Connection to 10.0.9.252 closed.
user-mbpro:~ user$ ssh vtladmin@10.0.9.252
vtladmin@10.0.9.252's password: 
-bash-4.1$ su -
Password: 
[root@vtl02 ~]# cd /home/vtladmin/
[root@vtl02 vtladmin]# ./config-mhvtl-centos67minimal-netbackup.sh 
23/04/2016 13:22:21  
23/04/2016 13:22:21  
23/04/2016 13:22:21  Script details...
23/04/2016 13:22:21  ...script name:     config-mhvtl-centos67minimal-netbackup
23/04/2016 13:22:22  ...script path:     /home/vtladmin
23/04/2016 13:22:22  ...script log:      /home/vtladmin/config-mhvtl-centos67minimal-netbackup.log.txt
23/04/2016 13:22:22  ...script version:  v0.23
23/04/2016 13:22:22  
23/04/2016 13:22:22  Step 1 - Also install mhvtl GUI ?
23/04/2016 13:22:22  ...no, the mhvtl GUI will NOT be installed...
23/04/2016 13:22:22  ...done...
23/04/2016 13:22:22  
23/04/2016 13:22:22  Step 2 - Basic checks...
23/04/2016 13:22:23  ...found CentOS release file...
23/04/2016 13:22:23  ...found CentOS release version...
23/04/2016 13:22:23  ...found network file...
23/04/2016 13:22:23  ...found networking= string...
23/04/2016 13:22:23  ...found networking=yes string...
23/04/2016 13:22:23  ...found /etc/resolv.conf file...
23/04/2016 13:22:23  ...done...
23/04/2016 13:22:23  
23/04/2016 13:22:23  Step 3 - Server details...
23/04/2016 13:22:23  ...OS kernel:    2.6.32-573.22.1.el6.x86_64
23/04/2016 13:22:24  .. OS date:      #1 SMP Wed Mar 23 03:35:39 UTC 2016
23/04/2016 13:22:24  ...OS platform:  x86_64 x86_64 x86_64 GNU/Linux
23/04/2016 13:22:24  ...OS release:   CentOS release 6.7 (Final)
23/04/2016 13:22:24  ...hostname:     vtl02.localdomain
23/04/2016 13:22:24  ...done...
23/04/2016 13:22:24  
23/04/2016 13:22:24  Step 4 - Saving files...
23/04/2016 13:22:24  ...copies of files already saved...
23/04/2016 13:22:24  ...done...
23/04/2016 13:22:25  
23/04/2016 13:22:25  Step 5 - Determine IP adresses...
23/04/2016 13:22:25  ...calling ip utility...
23/04/2016 13:22:25  ...reading file...
23/04/2016 13:22:25  ...found interface 'eth0' with IP address of '10.0.1.204/24'...
23/04/2016 13:22:25  ...found interface 'eth1' with IP address of '10.0.9.252/8'...
23/04/2016 13:22:25  ...finished reading file...
23/04/2016 13:22:25  
23/04/2016 13:22:25  ...primary dev name:  eth0
23/04/2016 13:22:25  ...primary dev addr:  10.0.1.204/24
23/04/2016 13:22:26  
23/04/2016 13:22:26  ...mhvtl dev name:    eth1
23/04/2016 13:22:26  ...mhvtl dev addr:    10.0.9.252/8
23/04/2016 13:22:26  ...mhvtl IP addr:     10.0.9.252
23/04/2016 13:22:26  ...mhvtl network:     10.0.0.0
23/04/2016 13:22:26  ...mhvtl netmask:     255.0.0.0
23/04/2016 13:22:26  ...mhvtl prefix:      8
23/04/2016 13:22:26  ...done...
23/04/2016 13:22:26  
23/04/2016 13:22:27  Step 6 - Set ONBOOT=yes on all network interfaces...
23/04/2016 13:22:27  ...calling ip utility...
23/04/2016 13:22:27  ...checking interface 'eth0'...
23/04/2016 13:22:27  ...device 'eth0' already has ONBOOT=yes...
23/04/2016 13:22:27  ...checking interface 'eth1'...
23/04/2016 13:22:27  ...device 'eth1' already has ONBOOT=yes...
23/04/2016 13:22:27  ...done...
23/04/2016 13:22:27  
23/04/2016 13:22:27  Step 7 - Ensuring secondary interface does not use DNS...
23/04/2016 13:22:27  ...checking 'eth1'...
23/04/2016 13:22:28  ...file already has PEERDNS=no...
23/04/2016 13:22:28  ...done...
23/04/2016 13:22:28  
23/04/2016 13:22:28  Step 8 - Disabling SELINUX...
23/04/2016 13:22:28  ...SELinux is already disabled...
23/04/2016 13:22:28  ...done...
23/04/2016 13:22:28  
23/04/2016 13:22:28  Step 9 - Checking folders for mhvtl...
23/04/2016 13:22:28  ...folder '/etc/mhvtl' already exists...
23/04/2016 13:22:29  ...folder '/opt/mhvtl' already exists...
23/04/2016 13:22:29  ...folder '/src' already exists...
23/04/2016 13:22:29  ...folder '/src/mhvtl' already exists...
23/04/2016 13:22:29  ...done...
23/04/2016 13:22:29  
23/04/2016 13:22:29  Step 10 - Install updates, then required packages...
23/04/2016 13:22:29  ...test call to query yum servers...
23/04/2016 13:22:35  ...test call to query yum servers was successful...
23/04/2016 13:22:36  ...this section of code has already been run...
23/04/2016 13:22:36  ...done...
23/04/2016 13:22:36  
23/04/2016 13:22:36  Step 11 - Create system level group and user for 'vtl' for daemon/service...
23/04/2016 13:22:36  ...checking for group 'vtl'...
23/04/2016 13:22:36  ...group 'vtl' already exists...
23/04/2016 13:22:36  ..checking for user 'vtl'...
23/04/2016 13:22:36  ...username 'vtl' already exists...
23/04/2016 13:22:36  ...done...
23/04/2016 13:22:36  
23/04/2016 13:22:37  Step 12 - Create a normal level group and user for 'vtladmin' for user logon...
23/04/2016 13:22:37  ...checking for folder:  /home/vtladmin
23/04/2016 13:22:37  ...already exists...
23/04/2016 13:22:37  ...checking for group 'vtladmin'...
23/04/2016 13:22:37  ...group 'vtladmin' already exists...
23/04/2016 13:22:37  ...checking for user 'vtladmin'...
23/04/2016 13:22:37  ...username 'vtladmin' already exists...
23/04/2016 13:22:37  ...chown /home/vtladmin...
23/04/2016 13:22:37  ...done...
23/04/2016 13:22:38  
23/04/2016 13:22:38  Step 13 - Update firewall...
23/04/2016 13:22:38  ...check is 'iptables' firewall service running...
23/04/2016 13:22:38  ...listing rules...
23/04/2016 13:22:38  ...checking for rule:  -I INPUT -p tcp -m state --state NEW -m tcp --dport 3260 -j ACCEPT
23/04/2016 13:22:38  ...rule already exists...
23/04/2016 13:22:38  ...saving tables...
23/04/2016 13:22:38  ...capturing rule list to log file...
23/04/2016 13:22:38  ...done...
23/04/2016 13:22:39  
23/04/2016 13:22:39  Step 14 - Create partition...
23/04/2016 13:22:39  ...checking for any '/dev/sdbN' partitions...
23/04/2016 13:22:39  ...partitions already exist on '/dev/sdb', no changes made...
23/04/2016 13:22:39  ...done...
23/04/2016 13:22:39  
23/04/2016 13:22:39  Step 15 - Create file-system and mount it...
23/04/2016 13:22:39  ...checking partition '/dev/sdb1'...
23/04/2016 13:22:39  ...found a file system at '/dev/sdb1'...
23/04/2016 13:22:39  ...checking for correct file system label...
23/04/2016 13:22:40  ...found expected label '/mhvtl'...
23/04/2016 13:22:40  ...checking whether currently mounted...
23/04/2016 13:22:40  ...a file system is already mounted at '/opt/mhvtl'...
23/04/2016 13:22:40  ...checking whether fstab is populated...
23/04/2016 13:22:40  ...fstab already mentions label '/mhvtl'...
23/04/2016 13:22:40  ...done...
23/04/2016 13:22:40  
23/04/2016 13:22:40  Step 16 - Enable and start SCSI target utils...
23/04/2016 13:22:40  ...first list...
23/04/2016 13:22:41  ...enable...
23/04/2016 13:22:41  ...second list...
23/04/2016 13:22:41  ...first status check...
23/04/2016 13:22:41  ...start service...
23/04/2016 13:22:41  ...second status check...
23/04/2016 13:22:41  ...done...
23/04/2016 13:22:41  
23/04/2016 13:22:41  Step 17 - Disable IPv6...
23/04/2016 13:22:41  ...listing the current settings...
23/04/2016 13:22:42  ...checking:  net.ipv6.conf.default.disable_ipv6
23/04/2016 13:22:42  ...already disabled...
23/04/2016 13:22:42  ...checking:  net.ipv6.conf.all.disable_ipv6
23/04/2016 13:22:42  ...already disabled...
23/04/2016 13:22:42  ...done...
23/04/2016 13:22:42  
23/04/2016 13:22:42  Step 18 - Disable outgoing weak ssh protocol...
23/04/2016 13:22:42  ...ssh config file exists...
23/04/2016 13:22:42  ...checking for commented out '# Protocol 2,1'...
23/04/2016 13:22:43  ...did not find the commented out string...
23/04/2016 13:22:43  ...checking for uncommented 'Protocol 2'...
23/04/2016 13:22:43  ...found the required Protocol=2 string...
23/04/2016 13:22:43  ...done...
23/04/2016 13:22:43  
23/04/2016 13:22:43  Step 19 - Configure local server sshd daemon...
23/04/2016 13:22:43  ...found local sshd config file...
23/04/2016 13:22:43  ...checking for PermitRootLogin...
23/04/2016 13:22:43  ...checking for AllowUsers...
23/04/2016 13:22:43  ...checking for ListenAddress...
23/04/2016 13:22:44  ...done....
23/04/2016 13:22:44  
23/04/2016 13:22:44  Step 20 - Configure hosts allow and deny...
23/04/2016 13:22:44  ...checking hosts.allow...
23/04/2016 13:22:44  ...checking hosts.allow for sshd...
23/04/2016 13:22:44  ...adding allow for 'sshd: 10.0.0.0/255.0.0.0'...
23/04/2016 13:22:44  ...checking hosts.deny...
23/04/2016 13:22:44  ...checking hosts.deny for sshd...
23/04/2016 13:22:44  ...deny for sshd already configured...
23/04/2016 13:22:45  ...done...
23/04/2016 13:22:45  
23/04/2016 13:22:45  Step 21 - Check whether to reboot...
23/04/2016 13:22:45  ...the reboot flag file already exists...
23/04/2016 13:22:45  ...done...
23/04/2016 13:22:45  
23/04/2016 13:22:45  Step 22 - Download and compile mhvtl...
23/04/2016 13:22:45  ...check for src folder, which should already exist...
23/04/2016 13:22:45  ...found source directory...
23/04/2016 13:22:46  ...pushd to source...
23/04/2016 13:22:46  ...initialising git...
23/04/2016 13:22:46  ...pulling source modules...
23/04/2016 13:22:49  ...make distclean...
23/04/2016 13:22:49  ...popd...
23/04/2016 13:22:50  ...pushd to kernel...
23/04/2016 13:22:50  ...kernel make...
23/04/2016 13:22:51  ...kernel make install...
23/04/2016 13:22:53  ...popd...
23/04/2016 13:22:53  ...pushd to source...
23/04/2016 13:22:53  ...base make...
23/04/2016 13:23:01  ...base make install...
23/04/2016 13:23:01  ...popd...
23/04/2016 13:23:01  ...done...
23/04/2016 13:23:01  
23/04/2016 13:23:01  Step 23 - Check whether to download and configure the mhvtl GUI...
23/04/2016 13:23:01  ...no, the mhvtl GUI will not be installed and configured...
23/04/2016 13:23:01  
23/04/2016 13:23:02  Step 24 - Configure mhvtl...
23/04/2016 13:23:02  ...checking:   /etc/mhvtl/mhvtl.conf
23/04/2016 13:23:02  ...creating...
23/04/2016 13:23:02  ...file done...
23/04/2016 13:23:02  ...checking:   /etc/mhvtl/device.conf
23/04/2016 13:23:02  ...creating...
23/04/2016 13:23:02  ...file done...
23/04/2016 13:23:02  ...checking device config file...
23/04/2016 13:23:02  ...checking:   /etc/mhvtl/library_contents.10
23/04/2016 13:23:03  ...creating...
23/04/2016 13:23:03  ...file done...
23/04/2016 13:23:03  ...done...
23/04/2016 13:23:03  
23/04/2016 13:23:03  Step 25 - Start mhvtl...
23/04/2016 13:23:03  ...create folder for virtual media...
23/04/2016 13:23:03  ...chown /etc/mhvtl...
23/04/2016 13:23:03  ...chmod /etc/mhvtl...
23/04/2016 13:23:03  ...chown /opt/mhvtl...
23/04/2016 13:23:03  ...chmod /opt/mhvtl...
23/04/2016 13:23:04  ...now setting up service...
23/04/2016 13:23:04  ...first list...
23/04/2016 13:23:04  ...failed, probably not added yet, continuing...
23/04/2016 13:23:04  ...add service...
23/04/2016 13:23:04  ...second list...
23/04/2016 13:23:04  ...enable service...
23/04/2016 13:23:04  ...third list...
23/04/2016 13:23:04  ...service stop...
23/04/2016 13:23:04  ...sleep two ticks...
23/04/2016 13:23:07  ...service start...
23/04/2016 13:23:07  ...sleep two ticks...
23/04/2016 13:23:09  ...done...
23/04/2016 13:23:09  
23/04/2016 13:23:10  Step 26 - Test virtual tape library number '10'...
23/04/2016 13:23:10  ...online library...
23/04/2016 13:23:10  ...online library ok...
23/04/2016 13:23:10  ...list library map...
23/04/2016 13:23:10  ...list library map ok...
23/04/2016 13:23:10  ...done...
23/04/2016 13:23:10  
23/04/2016 13:23:10  Step 27 - Configure tgt on 'tid 1'...
23/04/2016 13:23:10  ...test call to tgtadm...
23/04/2016 13:23:10  ...checking for controller...
23/04/2016 13:23:11  ...did not exist, now creating...
23/04/2016 13:23:11  ...now creating LUNs..
23/04/2016 13:23:11  ...found:  cd/dvd   /dev/sg0
23/04/2016 13:23:11  ...found:  disk   /dev/sg1
23/04/2016 13:23:11  ...found:  disk   /dev/sg2
23/04/2016 13:23:11  ...found:  mediumx   /dev/sg7
23/04/2016 13:23:11  ...pre-deleting...
23/04/2016 13:23:11  ...creating LUN 1 for medium changer '/dev/sg7'...
23/04/2016 13:23:12  ...found:  tape   /dev/sg3
23/04/2016 13:23:12  ...pre-deleting...
23/04/2016 13:23:12  ...creating LUN 2 for tape drive '/dev/sg3'...
23/04/2016 13:23:12  ...found:  tape   /dev/sg4
23/04/2016 13:23:12  ...pre-deleting...
23/04/2016 13:23:12  ...creating LUN 3 for tape drive '/dev/sg4'...
23/04/2016 13:23:12  ...found:  tape   /dev/sg5
23/04/2016 13:23:12  ...pre-deleting...
23/04/2016 13:23:12  ...creating LUN 4 for tape drive '/dev/sg5'...
23/04/2016 13:23:13  ...found:  tape   /dev/sg6
23/04/2016 13:23:13  ...pre-deleting...
23/04/2016 13:23:13  ...creating LUN 5 for tape drive '/dev/sg6'...
23/04/2016 13:23:13  ...now binding iSCSI to listen...
23/04/2016 13:23:13  ...pre-un-bind...
23/04/2016 13:23:13  ...now binding...
23/04/2016 13:23:13  ...testing tid 1...
23/04/2016 13:23:13  ...general list test...
23/04/2016 13:23:13  ...summary of tgt LUNs...
    LUN information:
        LUN: 0
            Backing store path: None
        LUN: 1
            Backing store path: /dev/sg7
        LUN: 2
            Backing store path: /dev/sg3
        LUN: 3
            Backing store path: /dev/sg4
        LUN: 4
            Backing store path: /dev/sg5
        LUN: 5
            Backing store path: /dev/sg6
23/04/2016 13:23:14  ...done...
23/04/2016 13:23:14  
23/04/2016 13:23:14  Step 28 - Save tgt config...
23/04/2016 13:23:14  ...checking for target in tgt conf file...
23/04/2016 13:23:14  ...saving config...
23/04/2016 13:23:14  ...now inserting two lines to config file...
23/04/2016 13:23:14  ...done...
23/04/2016 13:23:14  
23/04/2016 13:23:14  Step 29 - Configure iscsid daemon to start...
23/04/2016 13:23:15  ...first list...
23/04/2016 13:23:15  ...enable iscsid...
23/04/2016 13:23:15  ...second list...
23/04/2016 13:23:15  ...first check service status...
23/04/2016 13:23:15  ...failed, continuing...
23/04/2016 13:23:15  ...attempt to start...
23/04/2016 13:23:15  ...second check service status...
23/04/2016 13:23:15  ...failed, continuing...
23/04/2016 13:23:15  ...query self for targets...
23/04/2016 13:23:17  ...third and final check service status...
23/04/2016 13:23:17  ...done...
23/04/2016 13:23:17  
23/04/2016 13:23:17  Step 30 - Final summary...
23/04/2016 13:23:17  ...list of SCSI devices...
[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
[2:0:1:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sdb   /dev/sg2
[3:0:0:0]    mediumx STK      L700             0105  /dev/sch0  /dev/sg7
[3:0:1:0]    tape    IBM      ULT3580-TD4      0105  /dev/st0   /dev/sg3
[3:0:2:0]    tape    IBM      ULT3580-TD4      0105  /dev/st1   /dev/sg4
[3:0:3:0]    tape    IBM      ULT3580-TD5      0105  /dev/st2   /dev/sg5
[3:0:4:0]    tape    IBM      ULT3580-TD5      0105  /dev/st3   /dev/sg6
23/04/2016 13:23:17  ...versions used and installed...
23/04/2016 13:23:18  ...script version:    v0.23
23/04/2016 13:23:18  ...OS     version:    2.6.32-573.22.1.el6.x86_64
23/04/2016 13:23:18  ...mhvtl  version:    0.18.17
23/04/2016 13:23:18  ...vtlcmd version:    1.5.4-git-c7ccb7a
23/04/2016 13:23:18  ...tgt    version:    1.0.24
23/04/2016 13:23:18  ...iscsi  version:    6.2.0-873.13.el6
23/04/2016 13:23:18  ...iscsi  listenner:  10.0.9.252
23/04/2016 13:23:18  ...iscsi  target:     iqn.2016-02.us.mhvtl:tgt:vtl02.localdomain
23/04/2016 13:23:18  ...done...
23/04/2016 13:23:18  
23/04/2016 13:23:19  Script completed...
23/04/2016 13:23:19  Script exiting...
[root@vtl02 vtladmin]# exit
logout
-bash-4.1$ exit
logout
Connection to 10.0.9.252 closed.
user-mbpro:~ user$

GulzarShaikhAUS
Level 6
Partner Accredited Certified

Set it up and it works well. Thanks

Version history
Last update:
‎04-19-2016 11:12 AM
Updated by:
Moderator