You are on page 1of 26

How to configure a free VTL software

How to configure a free VTL (Virtual Tape Library)


author: Alexandre Borges
website: http://alexandreborges.org
revision: A

Its usual students of mine to decide to study some backup software and, in the middle
of way, they always complaint of the lack of a good environment to test all concepts and
procedures, mainly because theres not free robot and just making backup on disk is boring. ;)
Actually, theres a very good VTL software named mhVTL (
http://sites.google.com/site/linuxvtl2 ) which could be used in a perfect way and emulating
great brands like StorageTek (nowadays, Oracle). By the way, in this example, Im going to
explain how to setup a VTL (using first a very nice Web interface) and, after everything is
working and accessable from another remote host, Im going to show you details about the
configuration files.
To show you these step-by-step, Im using VMware Workstation 8 and my virtual
network have three virtual machines: the first running CentOS 6.0 64 bits (our VTL), the second
running CentOS 6.0 64 bits too (supposedly our backup machine) and the third running
Windows 7 ( supposedly another backup machine it could be a Windows 2008). Lets see the
procedure.
(On CentOS which will run the VTL)
a) In your first CentOS 64 bits you should prepare your system to download the packages
from Web. As a root user, do:
# rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
b) Now that your CentOS is configured with the new repository, execute the following
command to install the mhVTL software:
# yum install mhvtl-utils kmod-mhvtl
c) Verify if the SELinux is enabled:
# sestatus
SELinux status:
enabled
SELinuxfs mount:
/selinux
Current mode:
enforcing
Mode from config file:
enforcing
Policy version:
24
Policy from config file:
targeted
d) If true, disable it:
# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.

http://alexandreborges.org

Pgina 1

How to configure a free VTL software


# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

e) Open the port 3260 (iscsi) in the iptables firewall file and save the rule:
# iptables -I INPUT -m state --state NEW -p tcp --dport 3260 -j ACCEPT
# service iptables save
f)

Reboot the machine:


# reboot

Unfortunately, configuring the VTL in the command line is hard, so you can install a web
interface to help you in this task. Lets do it:
1) mkdir /guivtl
2) Download the Web Manage Console GUI from:
https://github.com/niadev67/mhvtl-gui/tarball/master/
3) cp niadev67-mhvtl-gui-1.4.7-3-g9f3bde0.tar.gz /guivtl
4) cd /guivtl
5) tar zvxf niadev67-mhvtl-gui-1.4.7-3-g9f3bde0.tar.gz
6) cd niadev67-mhvtl-gui-9f3bde0/
7) yum install httpd
8) chkconfig httpd on
9) cp -r * /var/www/html/
10) yum install php
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.secrel.com.br
* elrepo: elrepo.org
* extras: centos.secrel.com.br
* updates: centos.secrel.com.br
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.3-23.el6_4 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-23.el6_4 for package: php-5.3.323.el6_4.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.3.3-23.el6_4 for package: php-5.3.323.el6_4.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.3.3-23.el6_4 will be installed
---> Package php-common.x86_64 0:5.3.3-23.el6_4 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================
=
Package
Arch
Version
Repository
Size
===============================================================================
=

http://alexandreborges.org

Pgina 2

How to configure a free VTL software


Installing:
php
x86_64
5.3.3-23.el6_4
updates
1.1 M
Installing for dependencies:
php-cli
x86_64
5.3.3-23.el6_4
updates
2.2 M
php-common
x86_64
5.3.3-23.el6_4
updates
524 k
Transaction Summary
===============================================================================
=
Install
3 Package(s)
Total download size: 3.8 M
Installed size: 13 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): php-5.3.3-23.el6_4.x86_64.rpm
| 1.1 MB 00:03
(2/3): php-cli-5.3.3-23.el6_4.x86_64.rpm
| 2.2 MB 00:01
(3/3): php-common-5.3.3-23.el6_4.x86_64.rpm
| 524 kB 00:01
-------------------------------------------------------------------------------Total
414 kB/s | 3.8 MB 00:09
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-4.el6.centos.10.x86_64 (@anaconda-CentOS201303020151.x86_64/6.4)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.3.3-23.el6_4.x86_64
1/3
Installing : php-cli-5.3.3-23.el6_4.x86_64
2/3
Installing : php-5.3.3-23.el6_4.x86_64
3/3
Verifying : php-common-5.3.3-23.el6_4.x86_64
1/3
Verifying : php-cli-5.3.3-23.el6_4.x86_64
2/3
Verifying : php-5.3.3-23.el6_4.x86_64
3/3
Installed:
php.x86_64 0:5.3.3-23.el6_4
Dependency Installed:
php-cli.x86_64 0:5.3.3-23.el6_4

php-common.x86_64 0:5.3.3-23.el6_4

Complete!

11) Now, its needed to allow the web server user to run all commands as root:
# echo apache ALL=(ALL) NOPASSWD: ALL >> /etc/sudoers
12) Edit /etc/sudoers and comment out the line Defaults requiretty (highlighted
below):
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##

http://alexandreborges.org

Pgina 3

How to configure a free VTL software


## This file must be edited with the 'visudo' command.
## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhaps using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias FILESERVERS = fs1, fs2
# Host_Alias MAILSERVERS = smtp, smtp2
## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem

## Command Aliases
## These are groups of related commands...
## Networking
# Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net,
/sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
## Installation and management of software
# Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
## Services
# Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
## Updating the locate database
# Cmnd_Alias LOCATE = /usr/bin/updatedb
## Storage
# Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount,
/bin/umount
## Delegating permissions
# Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
## Processes
# Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
## Drivers
# Cmnd_Alias DRIVERS = /sbin/modprobe
# Defaults specification
#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
#
You have to run "ssh -t hostname sudo <cmd>".
#
# Defaults requiretty
#
# Refuse to run if unable to disable echo on the tty. This setting should also be
# changed in order to be able to use sudo without a tty. See requiretty above.
#
Defaults !visiblepw
#
# Preserving HOME has security implications since many programs
# use it when searching for configuration files. Note that HOME
# is already set when the the env_reset option is enabled, so
# this option is only effective for configurations where either

http://alexandreborges.org

Pgina 4

How to configure a free VTL software


# env_reset is disabled or HOME is present in the env_keep list.
#
Defaults always_set_home
Defaults
Defaults
Defaults
Defaults
Defaults
Defaults

env_reset
env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"

#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
#
# Defaults env_keep += "HOME"
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
## user
MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL)
ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE,
DRIVERS
## Allows people in group wheel to run all commands
# %wheel
ALL=(ALL)
ALL
## Same thing without a password
# %wheel
ALL=(ALL)
NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
apache ALL=(ALL) NOPASSWD: ALL

13) Install the following packages:


# yum install lsscsi
# yum install mtx
# yum install mt-st
# yum install git
# yum install sysstat
# yum install iscsi-initiator-utils*
http://alexandreborges.org

Pgina 5

How to configure a free VTL software


14) Configure a directory virtual alias in the web server Apache
/etc/httpd/conf/httpd.conf and add the following line the end of file:
Alias /mhvtl "/var/www/html/mhvtl"
<Directory "/var/www/html/mhvtl">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

15) Restart that your web server:


# /etc/init.d/httpd restart

Done. Its time to test if our steps has worked. Please, open a browser and type the following
url: http://localhost. You should see this image:

Figure 1

Nice. It seems the everything has worked !!!

http://alexandreborges.org

Pgina 6

How to configure a free VTL software


The login password is mhvtl. After the login, youll see this screen:

Figure 2

The mhVTL framework already has a configured robot, then were going to erase the current
configuration to prepare for our tests. Go to Setup page and click on Remove button:

Figure 3
http://alexandreborges.org

Pgina 7

How to configure a free VTL software

Figure 4

Figure 5

On Select Library to remove combo box, take one library at time, toggle Remove All Tape
Media Also ? option to YES and click on Continue button. However, its impossible to
remove the last robot. No problem because were going to create our robot so soon and after
that itll be possible to remove this default robot ;)
Now, lets return to Setup section:

http://alexandreborges.org

Pgina 8

How to configure a free VTL software

Figure 6

First, click on Add and press Standard button:

Figure 7
Second, as well will choose to create a StorageTek L700 tape library, then we must press
STK (StorageTek) and fill all required settings. Basically, my choices were:

http://alexandreborges.org

Pgina 9

How to configure a free VTL software


Library Model L700
Drive Vendor STK
Drive Model T10000A
Compression enabled 1
Compression factor 1
Compression type lzo
Backoff value Default
Number of Drives 5
Number of Maps 5
Media Type T10000A
Capacity 500 MB
Media Barcode Prefix S
Full Slots 20
Empty Slots 5
Library Media PATH /opt/mhvtl

Figure 8

Now, you must press Submit Query button, Finish twice and then Return. From there,
you should return to Console and start the mhVTL engine clicking on green Start button:

http://alexandreborges.org

Pgina 10

How to configure a free VTL software

Figure 9

Please, you notice that we have two VTLs now and, if you want to erase the old one, feel free
to do it.
Its time to configure the robot STK L700 as an iSCSI target to make it ready to be connected by
one host initiator using iSCSI. Go to the iSCSI (tgt) section, press Enable and then
Return button :

http://alexandreborges.org

Pgina 11

How to configure a free VTL software


Figure 10

To make things easier, click on Quick Start , Start and finally on Return button:

Figure 11

Figure 12

http://alexandreborges.org

Pgina 12

How to configure a free VTL software

Figure 13

Figure 14
To confirm that the iSCSI target robot is configured, you should press on Target:

http://alexandreborges.org

Pgina 13

How to configure a free VTL software

Figure 15

Weve finished the robot configuration. Now the reader are able to check some interesting
details about this configuration. For example, we can verify that robot tapes drives are
configured in /opt/mhvtl directory:
[root@centos2 mhvtl]# ls -al
total 88
drwxrws---. 22 vtl vtl 4096 Sep 5 02:40 .
drwxr-xr-x. 4 root root 4096 Aug 14 22:56 ..
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 CLN020TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00001TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00002TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00003TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00004TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00005TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00006TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00007TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00008TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00009TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00010TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00011TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00012TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00013TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00014TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00015TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00016TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00017TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00018TA
drwxrws--- 2 vtl vtl 4096 Sep 5 01:58 S00019TA
The robot STK L700 and and its tape drives are configured in /etc/mhvtl/device.conf:
http://alexandreborges.org

Pgina 14

How to configure a free VTL software


[root@centos2 mhvtl]# cat device.conf
VERSION: 5
# VPD page format:
# <page #> <Length> <x> <x+1>... <x+n>
# NAA format is an 8 hex byte value seperated by ':'
# Note: NAA is part of inquiry VPD 0x83
#
# Each 'record' is separated by one (or more) blank lines.
# Each 'record' starts at column 1
# Serial num max len is 10.
# Compression: factor X enabled 0|1
# Where X is zlib compression factor 1 = Fastest compression
#
9 = Best compression
# enabled 0 == off, 1 == on
#
# fifo: /var/tmp/mhvtl
# If enabled, data must be read from fifo, otherwise daemon will block
# trying to write.
# e.g. cat /var/tmp/mhvtl (in another terminal)
Library: 70 CHANNEL: 2 TARGET: 00 LUN: 00
Vendor identification: STK
Product identification: L700
Product revision level: 0016
Unit serial number: 90000070
NAA: 70:11:22:33:ab:2:00:00
Home directory: /opt/mhvtl
Backoff: 400
Drive: 71 CHANNEL: 2 TARGET: 00 LUN: 01
Library ID: 70 Slot: 01
Vendor identification: STK
Product identification: T10000A
Product revision level: 1.27
Unit serial number: 90000071
NAA: 70:11:22:33:ab:2:00:01
Compression: factor 1 enabled 1
Compression type: lzo
Backoff: 400
Drive: 72 CHANNEL: 2 TARGET: 00 LUN: 2
Library ID: 70 Slot: 2
Vendor identification: STK
Product identification: T10000A
Product revision level: 1.27
Unit serial number: 90000072
NAA: 70:11:22:33:ab:2:00:2
Compression: factor 1 enabled 1
Compression type: lzo
http://alexandreborges.org

Pgina 15

How to configure a free VTL software


Backoff: 400
Drive: 73 CHANNEL: 2 TARGET: 00 LUN: 3
Library ID: 70 Slot: 3
Vendor identification: STK
Product identification: T10000A
Product revision level: 1.27
Unit serial number: 90000073
NAA: 70:11:22:33:ab:2:00:3
Compression: factor 1 enabled 1
Compression type: lzo
Backoff: 400
Drive: 74 CHANNEL: 2 TARGET: 00 LUN: 4
Library ID: 70 Slot: 4
Vendor identification: STK
Product identification: T10000A
Product revision level: 1.27
Unit serial number: 90000074
NAA: 70:11:22:33:ab:2:00:4
Compression: factor 1 enabled 1
Compression type: lzo
Backoff: 400
Drive: 75 CHANNEL: 2 TARGET: 00 LUN: 5
Library ID: 70 Slot: 5
Vendor identification: STK
Product identification: T10000A
Product revision level: 1.27
Unit serial number: 90000075
NAA: 70:11:22:33:ab:2:00:5
Compression: factor 1 enabled 1
Compression type: lzo
Backoff: 400

The mhVTL general configuration is included in the /etc/mhvtl/mhvtl.conf file:


[root@centos2 mhvtl]# more mhvtl.conf
# Home directory for config file(s)
MHVTL_CONFIG_PATH=/etc/mhvtl
# Default media capacity (500 M)
CAPACITY=500
# Set default verbosity [0|1|2|3]
VERBOSE=1
# Set kernel module debuging [0|1]
VTL_DEBUG=0
http://alexandreborges.org

Pgina 16

How to configure a free VTL software


Lets see how to connect to this robot STK L700.

Windows 7
Connecting a Windows system to VTL robot its very easy. First, we need to find out whats the
IP address of robot system.
[root@centos2 mhvtl]# ifconfig eth0
eth0

Link encap:Ethernet HWaddr 00:0C:29:2D:16:CB


inet addr:192.168.1.190 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe2d:16cb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:34163 errors:0 dropped:0 overruns:0 frame:0
TX packets:251 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2829760 (2.6 MiB) TX bytes:21422 (20.9 KiB)

I recommend you check if the tgtd daemon is running:


[root@centos2 mhvtl]# /etc/init.d/tgtd status
If it isnt, you should start it:
[root@centos2 mhvtl]# /etc/init.d/tgtd restart
Moving to Windows system (Windows 7), go to Windows Start button, search for iSCSI and
click it. At first tab, type the IP address of system where is running the mhVTL (192.168.1.190)
on Target textbox and press Quick Connect.:

http://alexandreborges.org

Pgina 17

How to configure a free VTL software

Figure 16

http://alexandreborges.org

Pgina 18

How to configure a free VTL software

Figure 17

Its recommended to confirm that our VTL is recognized (at least seen) by Windows system:

http://alexandreborges.org

Pgina 19

How to configure a free VTL software

Figure 18

Linux (CentOS 6.x)


To connect a CentOS 6.x host to the configured mhVTL, first you need to check if the iscsiinitiator-utils is installed:
[root@centOS ~]# rpm -qa | grep iscsi-initiator-utils
iscsi-initiator-utils-devel-6.2.0.873-2.el6.x86_64
iscsi-initiator-utils-6.2.0.873-2.el6.x86_64
If it isnt, you must to install it:
[root@centOS ~]# yum install iscsi-initiator-utils
Now, you need to execute:
http://alexandreborges.org

Pgina 20

How to configure a free VTL software


[root@centOS ~]# iscsiadm -m discovery -t st -p 192.168.1.190
Starting iscsid:
[ OK ]
192.168.1.190:3260,1 iqn.1994-05.com.redhat:3274326c6df:mhvtl:stgt:1
[root@centOS ~]# iscsiadm -m node -T iqn.1994-05.com.redhat:3274326c6df:mhvtl:stgt:1 -p
192.168.1.190 -l
Logging in to [iface: default, target: iqn.1994-05.com.redhat:3274326c6df:mhvtl:stgt:1,
portal: 192.168.1.190,3260] (multiple)
Login to [iface: default, target: iqn.1994-05.com.redhat:3274326c6df:mhvtl:stgt:1,
portal: 192.168.1.190,3260] successful.
[root@centOS ~]# dmesg
.
.
scsi 4:0:0:1: Medium Changer STK L700
0016 PQ: 0 ANSI: 5
ch1: type #1 (mt): 0x100+1 [medium transport]
ch1: type #2 (st): 0x400+25 [storage]
ch1: type #3 (ie): 0x200+5 [import/export]
ch1: type #4 (dt): 0x1+5 [data transfer]
ch1: dt 0x1: ID/LUN unknown
ch1: dt 0x2: ID/LUN unknown
ch1: dt 0x3: ID/LUN unknown
ch1: dt 0x4: ID/LUN unknown
ch1: dt 0x5: ID/LUN unknown
ch1: INITIALIZE ELEMENT STATUS, may take some time ...
ch1: ... finished
ch 4:0:0:1: Attached scsi changer ch1
ch 4:0:0:1: Attached scsi generic sg13 type 8
scsi 4:0:0:2: Sequential-Access STK T10000A
1.27 PQ: 0 ANSI: 5
st 4:0:0:2: Attached scsi tape st4
st 4:0:0:2: st4: try direct i/o: yes (alignment 1 B)
st 4:0:0:2: Attached scsi generic sg14 type 1
scsi 4:0:0:3: Sequential-Access STK T10000A
1.27 PQ: 0 ANSI: 5
st 4:0:0:3: Attached scsi tape st5
st 4:0:0:3: st5: try direct i/o: yes (alignment 1 B)
st 4:0:0:3: Attached scsi generic sg15 type 1
scsi 4:0:0:4: Sequential-Access STK T10000A
1.27 PQ: 0 ANSI: 5
st 4:0:0:4: Attached scsi tape st6
st 4:0:0:4: st6: try direct i/o: yes (alignment 1 B)
st 4:0:0:4: Attached scsi generic sg16 type 1
scsi 4:0:0:5: Sequential-Access STK T10000A
1.27 PQ: 0 ANSI: 5
st 4:0:0:5: Attached scsi tape st7
st 4:0:0:5: st7: try direct i/o: yes (alignment 1 B)
st 4:0:0:5: Attached scsi generic sg17 type 1
scsi 4:0:0:6: Sequential-Access STK T10000A
1.27 PQ: 0 ANSI: 5
st 4:0:0:6: Attached scsi tape st8
st 4:0:0:6: st8: try direct i/o: yes (alignment 1 B)
st 4:0:0:6: Attached scsi generic sg18 type 1
[root@centOS ~]# service iscsi status
http://alexandreborges.org

Pgina 21

How to configure a free VTL software


iSCSI Transport Class version 2.0-870
version 6.2.0-873.2.el6
Target: iqn.1994-05.com.redhat:3274326c6df:mhvtl:stgt:1
Current Portal: 192.168.1.190:3260,1
Persistent Portal: 192.168.1.190:3260,1
**********
Interface:
**********
Iface Name: default
Iface Transport: tcp
Iface Initiatorname: iqn.1994-05.com.redhat:e82feb4b6427
Iface IPaddress: 192.168.1.104
Iface HWaddress: <empty>
Iface Netdev: <empty>
SID: 1
iSCSI Connection State: LOGGED IN
iSCSI Session State: LOGGED_IN
Internal iscsid Session State: NO CHANGE
*********
Timeouts:
*********
Recovery Timeout: 120
Target Reset Timeout: 30
LUN Reset Timeout: 30
Abort Timeout: 15
*****
CHAP:
*****
username: <empty>
password: ********
username_in: <empty>
password_in: ********
************************
Negotiated iSCSI params:
************************
HeaderDigest: None
DataDigest: None
MaxRecvDataSegmentLength: 262144
MaxXmitDataSegmentLength: 8192
FirstBurstLength: 65536
MaxBurstLength: 262144
ImmediateData: Yes
InitialR2T: Yes
MaxOutstandingR2T: 1
************************
Attached SCSI devices:
************************
Host Number: 4
State: running
scsi4 Channel 00 Id 0 Lun: 0
scsi4 Channel 00 Id 0 Lun: 1
http://alexandreborges.org

Pgina 22

How to configure a free VTL software


scsi4 Channel 00 Id 0 Lun: 2
scsi4 Channel 00 Id 0 Lun: 3
scsi4 Channel 00 Id 0 Lun: 4
scsi4 Channel 00 Id 0 Lun: 5
scsi4 Channel 00 Id 0 Lun: 6
If someday you want to log out and persistently disconnect from mhVTL:
[root@centOS ~]# iscsiadm -m node -T iqn.1994-05.com.redhat:3274326c6df:mhvtl:stgt:1 -p
192.168.1.190 -o delete
Nice !!! On Linux the iscsi initiator configuration is ready !!!!

Oracle Solaris 11
Finally, lets configure the iSCSI initiator on the fantastic Oracle Solaris 11:
root@solaris11:~# svcs -a | grep initiator
online
1:38:43 svc:/system/fcoe_initiator:default
online
1:41:47 svc:/network/iscsi/initiator:default
root@solaris11:~# svcadm restart svc:/network/iscsi/initiator:default
root@solaris11:~# iscsiadm modify discovery -t enable
root@solaris11:~# iscsiadm add discovery-address 192.168.1.190:3260
root@solaris11:~# iscsiadm list target
Target: iqn.1994-05.com.redhat:3274326c6df:mhvtl:stgt:1
Alias: TPGT: 1
ISID: 4000002a0000
Connections: 1
root@solaris11:~# dmesg
Sep 5 01:43:47 solaris11 iscsi: [ID 559844 kern.info] NOTICE: iscsi session(6) iqn.199405.com.redhat:3274326c6df:mhvtl:stgt:1 online
Sep 5 01:43:47 solaris11 genunix: [ID 408114 kern.info] /iscsi/arraycontroller@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,0 (nulldriver0) online
Sep 5 01:43:47 solaris11 vga_arbiter: [ID 197929 kern.info] vga_arbiter: device added:
PCI:0:0:f.0,decodes=io+mem+IO+MEM,owns=io+mem+IO+MEM,legalocks=none,norml
ocks=none
Sep 5 01:43:47 solaris11 vga_arbiter: [ID 254375 kern.info] 1 vga device(s) found
Sep 5 01:43:47 solaris11 rootnex: [ID 349649 kern.info] vga_arbiter0 at root
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] vga_arbiter0 is /vga_arbiter
Sep 5 01:43:47 solaris11 isa: [ID 202937 kern.info] ISA-device: ecpp0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] ecpp0 is
/pci@0,0/isa@7/lp@1,378
Sep 5 01:43:47 solaris11 isa: [ID 202937 kern.info] ISA-device: asy0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] asy0 is
/pci@0,0/isa@7/asy@1,3f8
Sep 5 01:43:47 solaris11 isa: [ID 202937 kern.info] ISA-device: asy1
http://alexandreborges.org

Pgina 23

How to configure a free VTL software


Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] asy1 is
/pci@0,0/isa@7/asy@1,2f8
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: dcpc0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] dcpc0 is /pseudo/dcpc@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: fbt0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] fbt0 is /pseudo/fbt@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: fcp0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] fcp0 is /pseudo/fcp@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: fcsm0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] fcsm0 is /pseudo/fcsm@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: llc10
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] llc10 is /pseudo/llc1@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: lockstat0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] lockstat0 is
/pseudo/lockstat@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: lofi0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] lofi0 is /pseudo/lofi@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: profile0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] profile0 is /pseudo/profile@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: ramdisk1024
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] ramdisk1024 is
/pseudo/ramdisk@1024
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: sdt0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] sdt0 is /pseudo/sdt@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: systrace0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] systrace0 is
/pseudo/systrace@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: ucode0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] ucode0 is /pseudo/ucode@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: bpf0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] bpf0 is /pseudo/bpf@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: fssnap0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] fssnap0 is /pseudo/fssnap@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: nsmb0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] nsmb0 is /pseudo/nsmb@0
Sep 5 01:43:47 solaris11 pseudo: [ID 129642 kern.info] pseudo-device: winlock0
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] winlock0 is
/pseudo/winlock@0
Sep 5 01:43:47 solaris11 scsi: [ID 583861 kern.info] sgen0 at iscsi0: unit-address
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,1:
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,1
Sep 5 01:43:47 solaris11 genunix: [ID 936769 kern.info] sgen0 is /iscsi/mediumchanger@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,1
Sep 5 01:43:47 solaris11 genunix: [ID 408114 kern.info] /iscsi/mediumchanger@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,1 (sgen0) online
Sep 5 01:43:48 solaris11 scsi: [ID 583861 kern.info] st0 at iscsi0: unit-address
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2

http://alexandreborges.org

Pgina 24

How to configure a free VTL software


Sep 5 01:43:48 solaris11 genunix: [ID 936769 kern.info] st0 is
/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2
Sep 5 01:43:48 solaris11 scsi: [ID 365881 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2 (st0):
Sep 5 01:43:48 solaris11
<Sun StorageTek T10000A>
Sep 5 01:43:48 solaris11 genunix: [ID 408114 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2 (st0) online
Sep 5 01:43:49 solaris11 scsi: [ID 583861 kern.info] st1 at iscsi0: unit-address
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,3:
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,3
Sep 5 01:43:49 solaris11 genunix: [ID 936769 kern.info] st1 is
/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,3
Sep 5 01:43:49 solaris11 scsi: [ID 365881 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,3 (st1):
Sep 5 01:43:49 solaris11
<Sun StorageTek T10000A>
Sep 5 01:43:49 solaris11 genunix: [ID 408114 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,3 (st1) online
Sep 5 01:43:50 solaris11 scsi: [ID 583861 kern.info] st2 at iscsi0: unit-address
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,4:
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,4
Sep 5 01:43:50 solaris11 genunix: [ID 936769 kern.info] st2 is
/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,4
Sep 5 01:43:50 solaris11 scsi: [ID 365881 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,4 (st2):
Sep 5 01:43:50 solaris11
<Sun StorageTek T10000A>
Sep 5 01:43:50 solaris11 genunix: [ID 408114 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,4 (st2) online
Sep 5 01:43:51 solaris11 scsi: [ID 583861 kern.info] st3 at iscsi0: unit-address
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,5:
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,5
Sep 5 01:43:51 solaris11 genunix: [ID 936769 kern.info] st3 is
/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,5
Sep 5 01:43:51 solaris11 scsi: [ID 365881 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,5 (st3):
Sep 5 01:43:51 solaris11
<Sun StorageTek T10000A>
Sep 5 01:43:51 solaris11 genunix: [ID 408114 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,5 (st3) online
Sep 5 01:43:52 solaris11 scsi: [ID 583861 kern.info] st4 at iscsi0: unit-address
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,6:
0000iqn.1994-05.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,6
Sep 5 01:43:52 solaris11 genunix: [ID 936769 kern.info] st4 is
/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,6
Sep 5 01:43:52 solaris11 scsi: [ID 365881 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,6 (st4):
Sep 5 01:43:52 solaris11
<Sun StorageTek T10000A>

http://alexandreborges.org

Pgina 25

How to configure a free VTL software


Sep 5 01:43:52 solaris11 genunix: [ID 408114 kern.info] /iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,6 (st4) online
[root@solaris11:~# ls /dev/rmt/*
total 120
lrwxrwxrwx 1 root root
91 Sep 5 01:43 0 ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:
lrwxrwxrwx 1 root root
92 Sep 5 01:43 0b ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:b
lrwxrwxrwx 1 root root
93 Sep 5 01:43 0bn ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:bn
lrwxrwxrwx 1 root root
92 Sep 5 01:43 0c ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:c
lrwxrwxrwx 1 root root
93 Sep 5 01:43 0cb ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:cb
lrwxrwxrwx 1 root root
94 Sep 5 01:43 0cbn ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:cbn
lrwxrwxrwx 1 root root
93 Sep 5 01:43 0cn ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:cn
lrwxrwxrwx 1 root root
92 Sep 5 01:43 0h ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:h
lrwxrwxrwx 1 root root
93 Sep 5 01:43 0hb ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:hb
lrwxrwxrwx 1 root root
94 Sep 5 01:43 0hbn ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:hbn
lrwxrwxrwx 1 root root
93 Sep 5 01:43 0hn ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:hn
lrwxrwxrwx 1 root root
92 Sep 5 01:43 0l ->
../../devices/iscsi/tape@0000iqn.199405.com.redhat%3A3274326c6df%3Amhvtl%3Astgt%3A10001,2:l
Thats it. Now, its up to you. You can install an excellent backup software (for example,
Symantec NetBackup or Symantec Backup Exec) and to point it to this VTL. Good lucky.
Have a nice day.
Alexandre Borges.

http://alexandreborges.org

Pgina 26

You might also like