Chinaunix首页 | 论坛 | 博客

qsh

  • 博客访问: 3945276
  • 博文数量: 1015
  • 博客积分: 15904
  • 博客等级: 上将
  • 技术积分: 8572
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-04 19:16
文章分类

全部博文(1015)

文章存档

2019年(1)

2017年(1)

2016年(19)

2015年(27)

2014年(30)

2013年(95)

2012年(199)

2011年(72)

2010年(109)

2009年(166)

2008年(296)

分类: 服务器与存储

2012-01-07 00:14:53

http://lhf0616.blog.51cto.com/2920914/535701

 

在安装mhvtl之前,先安装下面的包
[root@station90 ~]# yum -y install zlib-devel mt-st mtx  lsscsi
接着创建vtl用户
[root@station90 ~]# useradd vtl
[root@station90 ~]# echo "redhat" | passwd --stdin vtl
创建以下两个目录
[root@station90 ~]# mkdir /opt/mhvtl
[root@station90 ~]# mkdir /etc/mhvtl
[root@station90 ~]# chown -R vtl:vtl /opt/mhvtl /etc/mhvtl/
解压mhvtl软件包
[root@station90 stage]# tar -zxvf mhvtl.tgz
[root@station90 stage]# cd mhvtl-0.18/
[root@station90 mhvtl-0.18]# ls
doc include kernel man README usr
etc INSTALL Makefile mhvtl.spec scripts
编译mhvtl
[root@station90 mhvtl-0.18]# make distclean
[root@station90 mhvtl-0.18]# cd kernel/
[root@station90 kernel]# make;make install
[root@station90 kernel]# cd ..
[root@station90 mhvtl-0.18]# ls
doc include kernel man README usr
etc INSTALL Makefile mhvtl.spec scripts
[root@station90 mhvtl-0.18]# make;make install
启动mhvtl
[root@station90 ~]# /etc/init.d/mhvtl start
vtltape: version 0.18.10
vtltape: version 0.18.10
vtltape: version 0.18.10
vtltape: version 0.18.10
vtltape: version 0.18.10
vtltape: version 0.18.10
vtltape: version 0.18.10
vtltape: version 0.18.10
vtllibrary: version 0.18.10
vtllibrary process PID is 24829
vtllibrary: version 0.18.10
vtllibrary process PID is 24832
配置文件所在目录
[root@station90 ~]# cd /etc/mhvtl/
[root@station90 mhvtl]# ls
device.conf library_contents.10 library_contents.30 mhvtl.conf
[root@station90 mhvtl]# cd /opt/mhvtl/
[root@station90 mhvtl]# ls
CLN101L4 E01005L4 E01013L4 E03001L4 E03009L4 E03017L4 F01034L5 F03032L5
CLN102L5 E01006L4 E01014L4 E03002L4 E03010L4 E03018L4 F01035L5 F03033L5
[root@station90 log]# lsscsi -g
[0:0:0:0] disk ATA WDC WD3200BEVT-0 02.0 /dev/sda /dev/sg0
[6:0:0:0] disk SAMSUNG HM321HI /dev/sdb /dev/sg1
[8:0:0:0] mediumx STK L700 550V - /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/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
sg10,sg11是机械手
查看机械手的状态
[root@station90 network-scripts]# mtx -f /dev/sg10 status
Storage Changer /dev/sg10:2 Drives, 39 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty
Data Transfer Element 1:Empty
Storage Element 1:Full :VolumeTag=E03001L4
Storage Element 2:Full :VolumeTag=E03002L4
Storage Element 3:Full :VolumeTag=E03003L4
Storage Element 4:Full :VolumeTag=E03004L4
Storage Element 5:Full :VolumeTag=E03005L4
Storage Element 6:Full :VolumeTag=E03006L4
Storage Element 7:Full :VolumeTag=E03007L4
Storage Element 8:Full :VolumeTag=E03008L4
Storage Element 9:Full :VolumeTag=E03009L4
。。。。。。
将磁带1加载到driver 0
[root@station90 log]# mtx -f /dev/sg10 load 1 0
[root@station90 network-scripts]# mtx -f /dev/sg10 status | head -n 2
Storage Changer /dev/sg10:4 Drives, 43 Slots ( 4 Import/Export )
Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = E03001L4
查看磁带的状态
[root@station90 log]# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x46 (no translation).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN //
BOT The tape is positioned at the beginning of the first file.
DR_OPEN Door is open. Depending on the type of drive, this usually means that the drive does not have a tape in place.
测试是否能写入文件
[root@station90 log]# tar -cvf /dev/st0 /boot
tar: 从成员名中删除开头的“/”
/boot/
/boot/config-2.6.18-164.el5PAE
/boot/xen.gz-2.6.18-164.el5
/boot/config-2.6.18-164.el5xen
/boot/initrd-2.6.18-164.el5PAE.img
/boot/grub/
/boot/grub/ffs_stage1_5
/boot/grub/xfs_stage1_5
/boot/grub/device.map
/boot/grub/jfs_stage1_5
/boot/grub/minix_stage1_5
/boot/grub/splash.xpm.gz
/boot/grub/vstafs_stage1_5
/boot/grub/iso9660_stage1_5
/boot/grub/reiserfs_stage1_5
/boot/grub/menu.lst
/boot/grub/stage1
/boot/grub/e2fs_stage1_5
/boot/grub/stage2
/boot/grub/grub.conf
/boot/grub/fat_stage1_5
/boot/grub/ufs2_stage1_5
/boot/symvers-2.6.18-164.el5PAE.gz
/boot/xen-syms-2.6.18-164.el5
/boot/vmlinuz-2.6.18-164.el5xen
/boot/.vmlinuz-2.6.18-164.el5xen.hmac
/boot/symvers-2.6.18-164.el5xen.gz
/boot/System.map-2.6.18-164.el5PAE
/boot/lost+found/
/boot/.vmlinuz-2.6.18-164.el5PAE.hmac
/boot/vmlinuz-2.6.18-164.el5PAE
/boot/initrd-2.6.18-164.el5xen.img
/boot/System.map-2.6.18-164.el5xen
/boot/memtest86+-1.65
[root@station90 ~]# tar -tvf /dev/st0
测试倒带
[root@station90 network-scripts]# mt -f /dev/st1 rewind
卸载磁带

[root@station90 network-scripts]# mtx -f /dev/sg10 unload 1 0
mhvtl以附件形式上传了,方便大家实践

 

本文出自 “静静的” 博客!

阅读(1988) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~