Success: Using mt, mtx and tar with mhvtl

GNU General Public License Linux disk based Virtual Tape Library
Developed by Mark Harvey - markh794@gmail.com
To get started, go to: http://sites.google.com/site/linuxvtl2/

Success: Using mt, mtx and tar with mhvtl

Postby nia » Sun Jan 31, 2010 1:16 am

Let's start with verifying that we have tape devices:

Code: Select all
[root@centos-64 ~]# lsscsi -g
[0:0:0:0]    mediumx SPECTRA  PYTHON           5500  -         /dev/sg9
[0:0:1:0]    tape    QUANTUM  SDLT600          5500  /dev/st0  /dev/sg0
[0:0:2:0]    tape    QUANTUM  SDLT600          5500  /dev/st1  /dev/sg1
[0:0:3:0]    tape    QUANTUM  SDLT600          5500  /dev/st2  /dev/sg2
[0:0:4:0]    tape    QUANTUM  SDLT600          5500  /dev/st3  /dev/sg4


Let's check the library status using mtx:

Code: Select all
[root@centos-64 ~]# mtx -f /dev/sg9 status
  Storage Changer /dev/sg9:4 Drives, 26 Slots ( 4 Import/Export )
Data Transfer Element 0:Empty
Data Transfer Element 1:Empty
Data Transfer Element 2:Empty
Data Transfer Element 3:Empty
      Storage Element 1:Full :VolumeTag=DD1001S3
      Storage Element 2:Full :VolumeTag=DD1002S3
      Storage Element 3:Full :VolumeTag=DD1003S3
      Storage Element 4:Full :VolumeTag=DD1004S3
      Storage Element 5:Full :VolumeTag=DD1005S3
      Storage Element 6:Full :VolumeTag=DD1006S3
      Storage Element 7:Full :VolumeTag=DD1007S3
      Storage Element 8:Full :VolumeTag=DD1008S3
      Storage Element 9:Full :VolumeTag=DD1009S3
      Storage Element 10:Full :VolumeTag=DD1010S3
      Storage Element 11:Full :VolumeTag=UD1011L4
      Storage Element 12:Full :VolumeTag=UD1012L4
      Storage Element 13:Full :VolumeTag=UD1013L4
      Storage Element 14:Full :VolumeTag=UD1014L4
      Storage Element 15:Full :VolumeTag=UD1015L4
      Storage Element 16:Full :VolumeTag=UD1016L4
      Storage Element 17:Full :VolumeTag=UD1017L4
      Storage Element 18:Full :VolumeTag=UD1018L4
      Storage Element 19:Full :VolumeTag=UD1019L4
      Storage Element 20:Full :VolumeTag=UD1020L4
      Storage Element 21:Full :VolumeTag=CLN100S3
      Storage Element 22:Full :VolumeTag=CLN101L4
      Storage Element 23 IMPORT/EXPORT:Empty
      Storage Element 24 IMPORT/EXPORT:Empty
      Storage Element 25 IMPORT/EXPORT:Empty
      Storage Element 26 IMPORT/EXPORT:Empty


Let's load a tape from slot 5 to drive 1

Code: Select all
[root@centos-64 ~]# mtx -f /dev/sg9 load 5 0


Let's verify that we have loaded the tape from slot 5 into drive 1

Code: Select all
[root@centos-64 ~]# mtx -f /dev/sg9 status| grep "Data Transfer Element 0"
Data Transfer Element 0:Full (Storage Element 5 Loaded):VolumeTag = DD1005S3


Let's also verify that we have a tape loaded in drive 1 using mt:

Code: Select all
[root@centos-64 ~]# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x4a (no translation).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN


Let's write some data using tar:

Code: Select all
[root@centos-64 ~]# tar -cvvf /dev/st0 /root/mhvtl
tar: Removing leading `/' from member names
drwxr-xr-x root/root         0 2010-01-29 20:55:24 /root/mhvtl/
drwxr-xr-x root/root         0 2010-01-29 20:55:24 /root/mhvtl/mhvtl-0.18/
drwxr-xr-x /                 0 2010-01-27 15:03:35 /root/mhvtl/mhvtl-0.18/etc/
-rw-r--r-- /              1021 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/etc/library_contents.sample
-rw-r--r-- /               547 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/etc/Makefile
-rw-r--r-- /              9444 2010-01-27 15:03:35 /root/mhvtl/mhvtl-0.18/etc/mhvtl
-rw-r--r-- /              9447 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/etc/mhvtl.in
-rw-r--r-- /               647 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/README
drwxr-xr-x /                 0 2009-12-17 16:53:04 /root/mhvtl/mhvtl-0.18/scripts/
-rwxr-xr-x /             31160 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/scripts/checkpatch.pl
drwxr-xr-x /                 0 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/
-rw-r--r-- root/root     11061 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/.mhvtl.mod.o.cmd
drwxr-xr-x root/root         0 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/.tmp_versions/
-rw-r--r-- root/root        77 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/.tmp_versions/mhvtl.mod
-rw-r--r-- /              3634 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/kernel/fetch27.c
-rw-r--r-- root/root    273144 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/mhvtl.o
-rw-r--r-- /              1236 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/kernel/Makefile
-rw-r--r-- root/root      2360 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/mhvtl.mod.c
-rw-r--r-- /              3692 2009-04-09 03:18:04 /root/mhvtl/mhvtl-0.18/kernel/fetch26.c
-rw-r--r-- root/root     83696 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/mhvtl.mod.o
-rw-r--r-- root/root         0 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/Module.markers
-rw-r--r-- root/root     14519 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/.mhvtl.o.cmd
-rw-r--r-- /              4539 2009-03-09 01:44:10 /root/mhvtl/mhvtl-0.18/kernel/fetch24.c
-rw-r--r-- /              1070 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/kernel/vtl_common.h
-rw-r--r-- root/root       188 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/.mhvtl.ko.cmd
-rw-r--r-- root/root         0 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/Module.symvers
-rw-r--r-- root/root    355203 2010-01-29 20:55:38 /root/mhvtl/mhvtl-0.18/kernel/mhvtl.ko
-rw-r--r-- /              4437 2009-03-09 01:44:10 /root/mhvtl/mhvtl-0.18/kernel/fetch.c
-rw-r--r-- /             45946 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/kernel/mhvtl.c
-rw-r--r-- /              1788 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/Makefile
drwxr-xr-x /                 0 2009-02-24 19:03:14 /root/mhvtl/mhvtl-0.18/include/
-rw-r--r-- /               138 2009-02-24 19:03:14 /root/mhvtl/mhvtl-0.18/include/vtl_u.h
-rw-r--r-- /              5240 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/INSTALL
drwxr-xr-x /                 0 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/
-rw-r--r-- /              2303 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/vtlcmd.1
-rw-r--r-- /              1309 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/mhvtl.conf.5
-rw-r--r-- /              1599 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/vtllibrary.1
-rw-r--r-- /              1380 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/vtltape.1
-rw-r--r-- /              1565 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/library_contents.5
-rw-r--r-- /              1371 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/mktape.1
-rw-r--r-- /               888 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/make_vtl_devices.1
-rw-r--r-- /              1081 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/build_library_config.1
-rw-r--r-- /              3328 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/man/mhvtl.1
drwxr-xr-x /                 0 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/
-rw-r--r-- /             26805 2009-03-09 19:54:31 /root/mhvtl/mhvtl-0.18/doc/index.html
drwxr-xr-x /                 0 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/4_library_example/
-rw-r--r-- /              9774 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/4_library_example/device.conf
-rw-r--r-- /               201 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/4_library_example/mhvtl.conf
-rw-r--r-- /              1579 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.30
-rw-r--r-- /              1579 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.20
-rw-r--r-- /              1579 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.10
-rw-r--r-- /              1579 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.40
drwxr-xr-x /                 0 2010-01-29 20:55:47 /root/mhvtl/mhvtl-0.18/usr/
-rw-r--r-- /              2580 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/dump_tape.c
-rw-r--r-- root/root     27480 2010-01-29 20:55:42 /root/mhvtl/mhvtl-0.18/usr/spc.o
-rw-r--r-- root/root     12632 2010-01-29 20:55:44 /root/mhvtl/mhvtl-0.18/usr/q.o
-rwxr-xr-x root/root     63559 2010-01-29 20:55:43 /root/mhvtl/mhvtl-0.18/usr/libvtlscsi.so
-rw-r--r-- /              3908 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/Makefile
-rw-r--r-- root/root     66656 2010-01-29 20:55:42 /root/mhvtl/mhvtl-0.18/usr/vtllib.o
-rwxr-xr-x root/root     55518 2010-01-29 20:55:45 /root/mhvtl/mhvtl-0.18/usr/dump_tape
-rw-r--r-- /               727 2009-12-16 15:52:24 /root/mhvtl/mhvtl-0.18/usr/security_protocol.h
-rw-r--r-- /              1677 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/q.h
-rw-r--r-- /             10576 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/mktape.c
-rwxr-xr-x /              2632 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/make_vtl_media.in
-rw-r--r-- root/root     21792 2010-01-29 20:55:45 /root/mhvtl/mhvtl-0.18/usr/vtlcmd.o
-rw-r--r-- /              4302 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/vtltape.h
-rwxr-xr-x /              1715 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/make_vtl_devices
-rw-r--r-- /             13132 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/vtllib.h
-rw-r--r-- /              7220 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/vtlcmd.c
-rwxr-xr-x root/root     62443 2010-01-29 20:55:46 /root/mhvtl/mhvtl-0.18/usr/mktape
-rwxr-xr-x /              2530 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/build_library_config
-rw-r--r-- /             65783 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/vtllibrary.c
-rw-r--r-- root/root     13328 2010-01-29 20:55:44 /root/mhvtl/mhvtl-0.18/usr/dump_tape.o
-rw-r--r-- root/root      7720 2010-01-29 20:55:45 /root/mhvtl/mhvtl-0.18/usr/dump_messageQ.o
-rw-r--r-- root/root    238504 2010-01-29 20:55:44 /root/mhvtl/mhvtl-0.18/usr/vtltape.o
-rw-r--r-- root/root      2630 2010-01-29 20:55:47 /root/mhvtl/mhvtl-0.18/usr/make_vtl_media
-rw-r--r-- /              2702 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/q.c
-rw-r--r-- root/root     73920 2010-01-29 20:55:44 /root/mhvtl/mhvtl-0.18/usr/vtlcart.o
-rw-r--r-- /              1791 2009-05-25 17:44:47 /root/mhvtl/mhvtl-0.18/usr/be_byteshift.h
-rw-r--r-- /             94339 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/vtltape.c
-rw-r--r-- root/root    168760 2010-01-29 20:55:46 /root/mhvtl/mhvtl-0.18/usr/vtllibrary.o
-rwxr-xr-x root/root    118880 2010-01-29 20:55:46 /root/mhvtl/mhvtl-0.18/usr/vtllibrary
-rw-r--r-- /               425 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/spc.h
-rw-r--r-- /             20086 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/vtlcart_v1.c
-rwxr-xr-x root/root     17125 2010-01-29 20:55:45 /root/mhvtl/mhvtl-0.18/usr/dump_messageQ
-rw-r--r-- /              6288 2010-01-07 16:15:39 /root/mhvtl/mhvtl-0.18/usr/scsi.h
-rw-r--r-- /             27904 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/vtlcart.c
-rw-r--r-- /              9200 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/spc.c
-rw-r--r-- /              1522 2010-01-27 02:02:46 /root/mhvtl/mhvtl-0.18/usr/dump_messageQ.c
-rwxr-xr-x root/root     25990 2010-01-29 20:55:45 /root/mhvtl/mhvtl-0.18/usr/vtlcmd
-rw-r--r-- root/root     28208 2010-01-29 20:55:45 /root/mhvtl/mhvtl-0.18/usr/mktape.o
-rw-r--r-- /             18480 2010-01-27 02:01:37 /root/mhvtl/mhvtl-0.18/usr/vtllib.c
-rwxr-xr-x root/root    190515 2010-01-29 20:55:44 /root/mhvtl/mhvtl-0.18/usr/vtltape
-rw-r--r-- /              1876 2009-04-07 16:17:32 /root/mhvtl/mhvtl-0.18/usr/make_scsi_dev
-rw-r--r-- /             24994 2010-01-27 02:05:50 /root/mhvtl/mhvtl-0.18/mhvtl.spec
-rw-r--r-- root/root    128605 2010-01-27 17:29:46 /root/mhvtl/mhvtl-2010-01-28.tgz


Let's rewind the tape using mt:

Code: Select all
[root@centos-64 ~]# mt -f /dev/st0 rewind


Let's confirm data written to tape:

Code: Select all
[root@centos-64 ~]# tar -tvvf /dev/st0
drwxr-xr-x root/root         0 2010-01-29 20:55:24 root/mhvtl/
drwxr-xr-x root/root         0 2010-01-29 20:55:24 root/mhvtl/mhvtl-0.18/
drwxr-xr-x 1000/1000         0 2010-01-27 15:03:35 root/mhvtl/mhvtl-0.18/etc/
-rw-r--r-- 1000/1000      1021 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/etc/library_contents.sample
-rw-r--r-- 1000/1000       547 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/etc/Makefile
-rw-r--r-- 1000/1000      9444 2010-01-27 15:03:35 root/mhvtl/mhvtl-0.18/etc/mhvtl
-rw-r--r-- 1000/1000      9447 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/etc/mhvtl.in
-rw-r--r-- 1000/1000       647 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/README
drwxr-xr-x 1000/1000         0 2009-12-17 16:53:04 root/mhvtl/mhvtl-0.18/scripts/
-rwxr-xr-x 1000/1000     31160 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/scripts/checkpatch.pl
drwxr-xr-x 1000/1000         0 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/
-rw-r--r-- root/root     11061 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/.mhvtl.mod.o.cmd
drwxr-xr-x root/root         0 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/.tmp_versions/
-rw-r--r-- root/root        77 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/.tmp_versions/mhvtl.mod
-rw-r--r-- 1000/1000      3634 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/kernel/fetch27.c
-rw-r--r-- root/root    273144 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/mhvtl.o
-rw-r--r-- 1000/1000      1236 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/kernel/Makefile
-rw-r--r-- root/root      2360 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/mhvtl.mod.c
-rw-r--r-- 1000/1000      3692 2009-04-09 03:18:04 root/mhvtl/mhvtl-0.18/kernel/fetch26.c
-rw-r--r-- root/root     83696 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/mhvtl.mod.o
-rw-r--r-- root/root         0 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/Module.markers
-rw-r--r-- root/root     14519 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/.mhvtl.o.cmd
-rw-r--r-- 1000/1000      4539 2009-03-09 01:44:10 root/mhvtl/mhvtl-0.18/kernel/fetch24.c
-rw-r--r-- 1000/1000      1070 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/kernel/vtl_common.h
-rw-r--r-- root/root       188 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/.mhvtl.ko.cmd
-rw-r--r-- root/root         0 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/Module.symvers
-rw-r--r-- root/root    355203 2010-01-29 20:55:38 root/mhvtl/mhvtl-0.18/kernel/mhvtl.ko
-rw-r--r-- 1000/1000      4437 2009-03-09 01:44:10 root/mhvtl/mhvtl-0.18/kernel/fetch.c
-rw-r--r-- 1000/1000     45946 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/kernel/mhvtl.c
-rw-r--r-- 1000/1000      1788 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/Makefile
drwxr-xr-x 1000/1000         0 2009-02-24 19:03:14 root/mhvtl/mhvtl-0.18/include/
-rw-r--r-- 1000/1000       138 2009-02-24 19:03:14 root/mhvtl/mhvtl-0.18/include/vtl_u.h
-rw-r--r-- 1000/1000      5240 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/INSTALL
drwxr-xr-x 1000/1000         0 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/
-rw-r--r-- 1000/1000      2303 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/vtlcmd.1
-rw-r--r-- 1000/1000      1309 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/mhvtl.conf.5
-rw-r--r-- 1000/1000      1599 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/vtllibrary.1
-rw-r--r-- 1000/1000      1380 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/vtltape.1
-rw-r--r-- 1000/1000      1565 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/library_contents.5
-rw-r--r-- 1000/1000      1371 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/mktape.1
-rw-r--r-- 1000/1000       888 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/make_vtl_devices.1
-rw-r--r-- 1000/1000      1081 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/build_library_config.1
-rw-r--r-- 1000/1000      3328 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/man/mhvtl.1
drwxr-xr-x 1000/1000         0 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/
-rw-r--r-- 1000/1000     26805 2009-03-09 19:54:31 root/mhvtl/mhvtl-0.18/doc/index.html
drwxr-xr-x 1000/1000         0 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/4_library_example/
-rw-r--r-- 1000/1000      9774 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/4_library_example/device.conf
-rw-r--r-- 1000/1000       201 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/4_library_example/mhvtl.conf
-rw-r--r-- 1000/1000      1579 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.30
-rw-r--r-- 1000/1000      1579 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.20
-rw-r--r-- 1000/1000      1579 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.10
-rw-r--r-- 1000/1000      1579 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/doc/4_library_example/library_contents.40
drwxr-xr-x 1000/1000         0 2010-01-29 20:55:47 root/mhvtl/mhvtl-0.18/usr/
-rw-r--r-- 1000/1000      2580 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/dump_tape.c
-rw-r--r-- root/root     27480 2010-01-29 20:55:42 root/mhvtl/mhvtl-0.18/usr/spc.o
-rw-r--r-- root/root     12632 2010-01-29 20:55:44 root/mhvtl/mhvtl-0.18/usr/q.o
-rwxr-xr-x root/root     63559 2010-01-29 20:55:43 root/mhvtl/mhvtl-0.18/usr/libvtlscsi.so
-rw-r--r-- 1000/1000      3908 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/Makefile
-rw-r--r-- root/root     66656 2010-01-29 20:55:42 root/mhvtl/mhvtl-0.18/usr/vtllib.o
-rwxr-xr-x root/root     55518 2010-01-29 20:55:45 root/mhvtl/mhvtl-0.18/usr/dump_tape
-rw-r--r-- 1000/1000       727 2009-12-16 15:52:24 root/mhvtl/mhvtl-0.18/usr/security_protocol.h
-rw-r--r-- 1000/1000      1677 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/q.h
-rw-r--r-- 1000/1000     10576 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/mktape.c
-rwxr-xr-x 1000/1000      2632 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/make_vtl_media.in
-rw-r--r-- root/root     21792 2010-01-29 20:55:45 root/mhvtl/mhvtl-0.18/usr/vtlcmd.o
-rw-r--r-- 1000/1000      4302 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/vtltape.h
-rwxr-xr-x 1000/1000      1715 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/make_vtl_devices
-rw-r--r-- 1000/1000     13132 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/vtllib.h
-rw-r--r-- 1000/1000      7220 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/vtlcmd.c
-rwxr-xr-x root/root     62443 2010-01-29 20:55:46 root/mhvtl/mhvtl-0.18/usr/mktape
-rwxr-xr-x 1000/1000      2530 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/build_library_config
-rw-r--r-- 1000/1000     65783 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/vtllibrary.c
-rw-r--r-- root/root     13328 2010-01-29 20:55:44 root/mhvtl/mhvtl-0.18/usr/dump_tape.o
-rw-r--r-- root/root      7720 2010-01-29 20:55:45 root/mhvtl/mhvtl-0.18/usr/dump_messageQ.o
-rw-r--r-- root/root    238504 2010-01-29 20:55:44 root/mhvtl/mhvtl-0.18/usr/vtltape.o
-rw-r--r-- root/root      2630 2010-01-29 20:55:47 root/mhvtl/mhvtl-0.18/usr/make_vtl_media
-rw-r--r-- 1000/1000      2702 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/q.c
-rw-r--r-- root/root     73920 2010-01-29 20:55:44 root/mhvtl/mhvtl-0.18/usr/vtlcart.o
-rw-r--r-- 1000/1000      1791 2009-05-25 17:44:47 root/mhvtl/mhvtl-0.18/usr/be_byteshift.h
-rw-r--r-- 1000/1000     94339 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/vtltape.c
-rw-r--r-- root/root    168760 2010-01-29 20:55:46 root/mhvtl/mhvtl-0.18/usr/vtllibrary.o
-rwxr-xr-x root/root    118880 2010-01-29 20:55:46 root/mhvtl/mhvtl-0.18/usr/vtllibrary
-rw-r--r-- 1000/1000       425 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/spc.h
-rw-r--r-- 1000/1000     20086 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/vtlcart_v1.c
-rwxr-xr-x root/root     17125 2010-01-29 20:55:45 root/mhvtl/mhvtl-0.18/usr/dump_messageQ
-rw-r--r-- 1000/1000      6288 2010-01-07 16:15:39 root/mhvtl/mhvtl-0.18/usr/scsi.h
-rw-r--r-- 1000/1000     27904 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/vtlcart.c
-rw-r--r-- 1000/1000      9200 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/spc.c
-rw-r--r-- 1000/1000      1522 2010-01-27 02:02:46 root/mhvtl/mhvtl-0.18/usr/dump_messageQ.c
-rwxr-xr-x root/root     25990 2010-01-29 20:55:45 root/mhvtl/mhvtl-0.18/usr/vtlcmd
-rw-r--r-- root/root     28208 2010-01-29 20:55:45 root/mhvtl/mhvtl-0.18/usr/mktape.o
-rw-r--r-- 1000/1000     18480 2010-01-27 02:01:37 root/mhvtl/mhvtl-0.18/usr/vtllib.c
-rwxr-xr-x root/root    190515 2010-01-29 20:55:44 root/mhvtl/mhvtl-0.18/usr/vtltape
-rw-r--r-- 1000/1000      1876 2009-04-07 16:17:32 root/mhvtl/mhvtl-0.18/usr/make_scsi_dev
-rw-r--r-- 1000/1000     24994 2010-01-27 02:05:50 root/mhvtl/mhvtl-0.18/mhvtl.spec
-rw-r--r-- root/root    128605 2010-01-27 17:29:46 root/mhvtl/mhvtl-2010-01-28.tgz



Let's unload the tape using mtx:

Code: Select all
[root@centos-64 ~]# mtx -f /dev/sg9 unload 5 0
Unloading Data Transfer Element into Storage Element 5...done
~nia
User avatar
nia
Forum Founder
 
Posts: 242
Joined: Sat Dec 12, 2009 12:51 pm
Location: MI, USA

Re: Success: Using mt, mtx and tar with mhvtl

Postby dieth » Wed Apr 07, 2010 3:33 am

can you share your /etc/mhvtl/*.conf files?
dieth
Member
 
Posts: 13
Joined: Wed Apr 07, 2010 1:41 am
Location: Montreal

Re: Success: Using mt, mtx and tar with mhvtl

Postby nia » Wed Apr 07, 2010 12:25 pm

~nia
User avatar
nia
Forum Founder
 
Posts: 242
Joined: Sat Dec 12, 2009 12:51 pm
Location: MI, USA

Re: Success: Using mt, mtx and tar with mhvtl

Postby seamap3d » Tue Jul 27, 2010 11:19 pm

Hi,

thanks for the detailed report. We are trying to use mhvtl for testing access to scsi tape devices
We have mhvtl version 0.18.9 up and running (as it seems) using the default device.conf files etc.
Operating system is Ubuntu 9.10 , 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64 GNU/Linux

lsscsi -g gives us:

[0:0:0:0] disk ATA WDC WD5000AAKS-7 12.0 /dev/sda /dev/sg0
[1:0:0:0] cd/dvd Optiarc DVD+-RW AD-5170S 101B /dev/sr0 /dev/sg1
[8:0:0:0] mediumx SPECTRA PYTHON 550V /dev/sch0 /dev/sg10
[8:0:1:0] tape IBM ULT3580-TD5 550V /dev/st0 /dev/sg2
[8:0:2:0] tape IBM ULT3580-TD5 550V /dev/st1 /dev/sg3
[8:0:3:0] tape IBM ULT3580-TD4 550V /dev/st2 /dev/sg4
[8:0:4:0] tape IBM ULT3580-TD4 550V /dev/st3 /dev/sg5
[8:0:8:0] mediumx SPECTRA PYTHON 550V /dev/sch1 /dev/sg11
[8:0:9:0] tape IBM ULT3580-TD4 550V /dev/st4 /dev/sg6
[8:0:10:0] tape IBM ULT3580-TD4 550V /dev/st5 /dev/sg7
[8:0:11:0] tape IBM ULT3580-TD4 550V /dev/st6 /dev/sg8
[8:0:12:0] tape IBM ULT3580-TD4 550V /dev/st7 /dev/sg9

Also we get:

mtx -f /dev/sg10 status

Storage Changer /dev/sg10:4 Drives, 34 Slots ( 4 Import/Export )
Data Transfer Element 0:Empty
Data Transfer Element 1:Empty
Data Transfer Element 2:Empty
Data Transfer Element 3:Empty
Storage Element 1:Full :VolumeTag=DD1001S3
Storage Element 2:Full :VolumeTag=DD1002S3
Storage Element 3:Full :VolumeTag=DD1003S3
Storage Element 4:Full :VolumeTag=DD1004S3
Storage Element 5:Full :VolumeTag=DD1005S3
Storage Element 6:Full :VolumeTag=DD1006S3
Storage Element 7:Full :VolumeTag=DD1007S3
Storage Element 8:Full :VolumeTag=DD1008S3
Storage Element 9:Full :VolumeTag=DD1009S3
Storage Element 10:Full :VolumeTag=DD1010S3
Storage Element 11:Full :VolumeTag=UD1011L4
Storage Element 12:Full :VolumeTag=UD1012L4
Storage Element 13:Full :VolumeTag=UD1013L4
Storage Element 14:Full :VolumeTag=UD1014L4
Storage Element 15:Full :VolumeTag=UD1015L4
Storage Element 16:Full :VolumeTag=UD1016L4
Storage Element 17:Full :VolumeTag=UD1017L4
Storage Element 18:Full :VolumeTag=UD1018L4
Storage Element 19:Full :VolumeTag=UD1019L4
Storage Element 20:Full :VolumeTag=UD1020L4
Storage Element 21:Full :VolumeTag=CLN100S3
Storage Element 22:Full :VolumeTag=CLN101L4
Storage Element 23:Full :VolumeTag=CLN102L5
Storage Element 24:Full :VolumeTag=UD1024L5
Storage Element 25:Full :VolumeTag=UD1025L5
Storage Element 26:Full :VolumeTag=UD1026L5
Storage Element 27:Full :VolumeTag=UD1027L5
Storage Element 28:Full :VolumeTag=UD1028L5
Storage Element 29:Full :VolumeTag=UD1029L5
Storage Element 30:Full :VolumeTag=UD1030L5
Storage Element 31 IMPORT/EXPORT:Empty
Storage Element 32 IMPORT/EXPORT:Empty
Storage Element 33 IMPORT/EXPORT:Empty
Storage Element 34 IMPORT/EXPORT:Empty

so far looking pretty good.
However, when we try to load a tape we get this:

mtx -f /dev/sg10 load 5 0

Loading media from Storage Element 5 into drive 0...mtx: Request Sense: Long Report=yes
mtx: Request Sense: Valid Residual=yes
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Hardware Error
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Residual = 00 00 00 00
mtx: Request Sense: Additional Sense Code = 04
mtx: Request Sense: Additional Sense Qualifier = 03
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
MOVE MEDIUM from Element Address 1028 to 1 Failed

We've looked through the forum, but didn't find anything related.

Any thoughts ? Doesn't seem we are far away from getting this up and running ...

Cheers
seamap3d
Registered
 
Posts: 2
Joined: Tue Jul 27, 2010 11:11 pm

Re: Success: Using mt, mtx and tar with mhvtl

Postby ap2010 » Wed Jul 28, 2010 5:56 am

Yes,

seen on the tape label extension S3 you have defined SDLT tapes for the first 10 elements, the labels ending in L4 are LTO4 tapes. As you have defined all your tapedrives as LTO5 and LTO4 drives (names ending in -TD5 and -TD4) you are trying to insert an SDLT tape into an LTO5 drive.

mtx -f /dev/sg10 load 11 2

would work, as you are trying to insert an LTO4 tape into an LTO4 drive.

So your problem is in the configuration.

Cheers,

Albert
ap2010
Member
 
Posts: 11
Joined: Thu May 13, 2010 5:18 am

Re: Success: Using mt, mtx and tar with mhvtl

Postby seamap3d » Wed Jul 28, 2010 7:37 pm

Wow,
thanks for that Albert and thanks for your quick reply !

I tried what you suggested and it worked just fine.

mtx -f /dev/sg10 load 11 2
Loading media from Storage Element 11 into drive 2...done

All the other tests posted above (nia) work just fine from here too.

Sorry I wasn't familiar with the tape labeling schemes ...

Cheers,
Christof
seamap3d
Registered
 
Posts: 2
Joined: Tue Jul 27, 2010 11:11 pm


Return to MHVTL Discussion Forums

Who is online

Users browsing this forum: d_y19, rami766 and 0 guests