centos65+mhvtl+gui+iscsitgt虚拟磁带库的安装与应用.docx
- 文档编号:28623377
- 上传时间:2023-07-19
- 格式:DOCX
- 页数:27
- 大小:151.05KB
centos65+mhvtl+gui+iscsitgt虚拟磁带库的安装与应用.docx
《centos65+mhvtl+gui+iscsitgt虚拟磁带库的安装与应用.docx》由会员分享,可在线阅读,更多相关《centos65+mhvtl+gui+iscsitgt虚拟磁带库的安装与应用.docx(27页珍藏版)》请在冰豆网上搜索。
centos65+mhvtl+gui+iscsitgt虚拟磁带库的安装与应用
一.Mhvtl+mhvtlgui+iscsi
1.安装:
yuminstalllsscsimt-stmtxzlib-develsg3_utilszliblzo-develkernel-develkernel-headersgcc
接着创建vtl用户:
#useraddvtl
#passwdvtl
#mkdir/opt/mhvtl
#mkdir/etc/mhvtl
#chown-Rfvtl:
vtl/opt/mhvtl
#chown-Rfvtl:
vtl/etc/mhvtl
(/etc/mhvtl为配置文件路径/opt/mhvtl为虚拟带库存储路径)
2.编译安装 MHVLT
#tar-zxvfmhvtl-2013-03-22.tgz
[rootcentos001tool]#cdmhvtl-1.4
[rootcentos001mhvtl-1.4]#cdkernel
[rootcentos001kernel]#make;makeinstall
[rootcentos001mhvtl-1.4]#make;makeinstall
如果未安装lzo和lzo-devel开发环境将收到如下报错:
Note:
Sincemhvtl-1.3,bothlzoandzlibarerequiredtobuildvtltape
Typicalerror(missinglzodevelpackage)lookslike:
cc-Wall-Wshadow-g-O2-D_LARGEFILE64_SOURCE -I../kernel-DMHVTL_VERSION=\"1.4.0\"-DMHVTL_DEBUG-DUSR=\"vtl\"-DMHVTL_HOME_PATH=\"/opt/mhvtl\"-DMHVTL_CONFIG_PATH=\"/etc/mhvtl\" -c-ovtltape.ovtltape.c
vtltape.c:
92:
25:
error:
lzo/lzoconf.h:
Nosuchfileordirectory
vtltape.c:
93:
23:
error:
lzo/lzo1x.h:
Nosuchfileordirectory
vtltape.c:
Infunction'uncompress_lzo_block'
[rootcentos001mhvtl-1.4]#servicemhvtlstatus
Couldnotlocatelibraryconfigfile:
/etc/mhvtl/library_contents.10
Creatingadefaultone
Pleasestopmhvtl&edit/etc/mhvtl/library_contents.10tosuityourrequirements
Couldnotlocatelibraryconfigfile:
/etc/mhvtl/library_contents.30
Creatingadefaultone
Pleasestopmhvtl&edit/etc/mhvtl/library_contents.30tosuityourrequirements
Usage:
/etc/init.d/mhvtl{start|stop|shutdown}
[rootcentos001mhvtl-1.4]#servicemhvtlstart
vtllibraryprocessPIDis1729
vtllibraryprocessPIDis1733
查看虚拟带库状态信息
[rootcentos001mhvtl-1.4]#lsscsi-g
[1:
0:
0:
0]cd/dvdNECVMWarVMwareIDECDR101.00/dev/sr0/dev/sg0
[2:
0:
0:
0]diskVMware,VMwareVirtualS1.0/dev/sda/dev/sg1
[3:
0:
0:
0]mediumxSTKL7000104/dev/sch0/dev/sg10
[3:
0:
1:
0]tapeIBMULT3580-TD50104/dev/st0/dev/sg2
[3:
0:
2:
0]tapeIBMULT3580-TD50104/dev/st1/dev/sg3
[3:
0:
3:
0]tapeIBMULT3580-TD40104/dev/st2/dev/sg4
[3:
0:
4:
0]tapeIBMULT3580-TD40104/dev/st3/dev/sg5
[3:
0:
8:
0]mediumxSTKL800104/dev/sch1/dev/sg11
[3:
0:
9:
0]tapeSTKT10000B0104/dev/st4/dev/sg6
[3:
0:
10:
0]tapeSTKT10000B0104/dev/st5/dev/sg7
[3:
0:
11:
0]tapeSTKT10000B0104/dev/st6/dev/sg8
[3:
0:
12:
0]tapeSTKT10000B0104/dev/st7/dev/sg9
[rootcentos001mhvtl-1.4]#lsscsi-l
[1:
0:
0:
0]cd/dvdNECVMWarVMwareIDECDR101.00/dev/sr0
state=runningqueue_depth=1scsi_level=6type=5device_blocked=0timeout=30
[2:
0:
0:
0]diskVMware,VMwareVirtualS1.0/dev/sda
state=runningqueue_depth=32scsi_level=3type=0device_blocked=0timeout=30
[3:
0:
0:
0]mediumxSTKL7000104/dev/sch0
state=runningqueue_depth=32scsi_level=6type=8device_blocked=0timeout=0
[3:
0:
1:
0]tapeIBMULT3580-TD50104/dev/st0
state=runningqueue_depth=32scsi_level=6type=1device_blocked=0timeout=900
[3:
0:
2:
0]tapeIBMULT3580-TD50104/dev/st1
state=runningqueue_depth=32scsi_level=6type=1device_blocked=0timeout=900
[3:
0:
3:
0]tapeIBMULT3580-TD40104/dev/st2
state=runningqueue_depth=32scsi_level=6type=1device_blocked=0timeout=900
[3:
0:
4:
0]tapeIBMULT3580-TD40104/dev/st3
state=runningqueue_depth=32scsi_level=6type=1device_blocked=0timeout=900
[3:
0:
8:
0]mediumxSTKL800104/dev/sch1
state=runningqueue_depth=32scsi_level=6type=8device_blocked=0timeout=0
[3:
0:
9:
0]tapeSTKT10000B0104/dev/st4
state=runningqueue_depth=32scsi_level=0type=1device_blocked=0timeout=900
[3:
0:
10:
0]tapeSTKT10000B0104/dev/st5
state=runningqueue_depth=32scsi_level=0type=1device_blocked=0timeout=900
[3:
0:
11:
0]tapeSTKT10000B0104/dev/st6
state=runningqueue_depth=32scsi_level=0type=1device_blocked=0timeout=900
[3:
0:
12:
0]tapeSTKT10000B0104/dev/st7
state=runningqueue_depth=32scsi_level=0type=1device_blocked=0timeout=900
这里的/dev/sg10和/dev/sg11是机械手。
这个默认的容量是500MB,这个可以查看mhvtl的配置文件mhvtl.conf:
[rootcentos001mhvtl-1.4]#cat/etc/mhvtl/mhvtl.conf
#Homedirectoryforconfigfile(s)
MHVTL_CONFIG_PATH=/etc/mhvtl
#Defaultmediacapacity(500M)
CAPACITY=500
#Setdefaultverbosity[0|1|2|3]
VERBOSE=1
#Setkernelmoduledebuging[0|1]
VTL_DEBUG=0
capacity=500就是指默认容量为500MB。
3.简单应用:
查看机械手状态:
[rootcentos001mhvtl-1.4]#mtx-f/dev/sg10status
StorageChanger/dev/sg10:
4Drives,43Slots(4Import/Export)
DataTransferElement0:
Empty
DataTransferElement1:
Empty
DataTransferElement2:
Empty
DataTransferElement3:
Empty
StorageElement1:
Full:
VolumeTag=E01001L4
StorageElement2:
Full:
VolumeTag=E01002L4
StorageElement3:
Full:
VolumeTag=E01003L4
StorageElement4:
Full:
VolumeTag=E01004L4
StorageElement5:
Full:
VolumeTag=E01005L4
StorageElement6:
Full:
VolumeTag=E01006L4
StorageElement7:
Full:
VolumeTag=E01007L4
StorageElement8:
Full:
VolumeTag=E01008L4
StorageElement9:
Full:
VolumeTag=E01009L4
StorageElement10:
Full:
VolumeTag=E01010L4
StorageElement11:
Full:
VolumeTag=E01011L4
StorageElement12:
Full:
VolumeTag=E01012L4
StorageElement13:
Full:
VolumeTag=E01013L4
StorageElement14:
Full:
VolumeTag=E01014L4
StorageElement15:
Full:
VolumeTag=E01015L4
StorageElement16:
Full:
VolumeTag=E01016L4
StorageElement17:
Full:
VolumeTag=E01017L4
StorageElement18:
Full:
VolumeTag=E01018L4
StorageElement19:
Full:
VolumeTag=E01019L4
StorageElement20:
Full:
VolumeTag=E01020L4
StorageElement21:
Empty
StorageElement22:
Full:
VolumeTag=CLN101L4
StorageElement23:
Full:
VolumeTag=CLN102L5
StorageElement24:
Empty
StorageElement25:
Empty
StorageElement26:
Empty
StorageElement27:
Empty
StorageElement28:
Empty
StorageElement29:
Empty
StorageElement30:
Full:
VolumeTag=F01030L5
StorageElement31:
Full:
VolumeTag=F01031L5
StorageElement32:
Full:
VolumeTag=F01032L5
StorageElement33:
Full:
VolumeTag=F01033L5
StorageElement34:
Full:
VolumeTag=F01034L5
StorageElement35:
Full:
VolumeTag=F01035L5
StorageElement36:
Full:
VolumeTag=F01036L5
StorageElement37:
Full:
VolumeTag=F01037L5
StorageElement38:
Full:
VolumeTag=F01038L5
StorageElement39:
Full:
VolumeTag=F01039L5
StorageElement40IMPORT/EXPORT:
Empty
StorageElement41IMPORT/EXPORT:
Empty
StorageElement42IMPORT/EXPORT:
Empty
StorageElement43IMPORT/EXPORT:
Empty
[rootcentos001mhvtl-1.4]#mtx-f/dev/sg11status
StorageChanger/dev/sg11:
4Drives,44Slots(4Import/Export)
DataTransferElement0:
Empty
DataTransferElement1:
Empty
DataTransferElement2:
Empty
DataTransferElement3:
Empty
StorageElement1:
Full:
VolumeTag=G03001TA
StorageElement2:
Full:
VolumeTag=G03002TA
StorageElement3:
Full:
VolumeTag=G03003TA
StorageElement4:
Full:
VolumeTag=G03004TA
StorageElement5:
Full:
VolumeTag=G03005TA
StorageElement6:
Full:
VolumeTag=G03006TA
StorageElement7:
Full:
VolumeTag=G03007TA
StorageElement8:
Full:
VolumeTag=G03008TA
StorageElement9:
Full:
VolumeTag=G03009TA
StorageElement10:
Full:
VolumeTag=G03010TA
StorageElement11:
Full:
VolumeTag=G03011TA
StorageElement12:
Full:
VolumeTag=G03012TA
StorageElement13:
Full:
VolumeTag=G03013TA
StorageElement14:
Full:
VolumeTag=G03014TA
StorageElement15:
Full:
VolumeTag=G03015TA
StorageElement16:
Full:
VolumeTag=G03016TA
StorageElement17:
Full:
VolumeTag=G03017TA
StorageElement18:
Full:
VolumeTag=G03018TA
StorageElement19:
Full:
VolumeTag=G03019TA
StorageElement20:
Full:
VolumeTag=G03020TA
StorageElement21:
Full:
VolumeTag=G03021TA
StorageElement22:
Full:
VolumeTag=G03022TA
StorageElement23:
Full:
VolumeTag=G03023TA
StorageElement24:
Full:
VolumeTag=G03024TA
StorageElement25:
Full:
VolumeTag=G03025TA
StorageElement26:
Full:
VolumeTag=G03026TA
StorageElement27:
Full:
VolumeTag=G03027TA
StorageElement28:
Full:
VolumeTag=G03028TA
StorageElement29:
Full:
VolumeTag=G03029TA
StorageElement30:
Full:
VolumeTag=G03030TA
StorageElement31:
Full:
VolumeTag=G03031TA
StorageElement32:
Full:
VolumeTag=G03032TA
StorageElement33:
Full:
VolumeTag=G03033TA
StorageElement34:
Full:
VolumeTag=G03034TA
StorageElement35:
Full:
VolumeTag=G03035TA
StorageElement36:
Full:
VolumeTag=G03036TA
StorageElement37:
Full:
VolumeTag=G03037TA
StorageElement38:
Full:
VolumeTag=G03038TA
StorageElement39:
Full:
VolumeTag=G03039TA
StorageElement40:
Full:
VolumeTag=CLN303TA
StorageElement41IMPORT/EXPORT:
Empty
StorageElement42IMPORT/EXPORT:
Empty
StorageElement43IMPORT/EXPORT:
Empty
StorageElement44IMPORT/EXPORT:
Empty
将磁带从1号槽位装入driver0:
[rootcentos001mhvtl-1.4]#mtx-f/dev/sg10load10
sLoadingmediafromStorageElement1intodrive0...done
[rootcentos001mhvtl-1.4]#mtx-f/dev/sg10status
StorageChanger/dev/sg10:
4Drives,43Slots(4Import/Export)
DataTransferElement0:
Full(StorageElement1Loaded):
VolumeTag=E01001L4
DataTransferElement1:
Empty
DataTransferElement2:
Empty
DataTransferElement3:
Empty
StorageElement1:
Empty
StorageElement2:
Full:
VolumeTag=E01002L4
StorageElement3:
Full:
VolumeTag=E01003L4
查看磁带状态:
[rootcentos001mhvtl-1.4]#mt-f/dev/st0status
SCSI2tapedrive:
Filenumber=0,blocknumber=0,partition=0.
Tapeblocksize0bytes.Densitycode0x46(LTO-4).
Softerrorcountsincelaststatus=0
Generalstatusbitson(41010000):
BOTONLINEIM_REP_EN
使用tar命令测试下,能否写入文件:
[rootcentos001mhvtl-1.4]#tar-cvvf/dev/st1/boot
tar:
Removingleading`/'frommembernames
dr-xr-xr-xroot/root02014-09-1116:
58/boot/
-rw-r--r--root/root25196092014-07-2517:
00/boot/System.map-2.6.32-431.20.5.el6.x86_64
drwxr-xr-xroot/root02013-11-1318:
04/boot/efi/
drwxr-xr-xroot/root02013-11-1318:
04/boot/efi/EFI/
drwxr-xr-xroot/root02014-07-3014:
55/boot/efi/EFI/redhat/
-rwxr-xr-xroot/root2529902014-07-2520:
08/boot/efi/EFI/redhat/grub.efi
-rw-r--r--root/root1052002014-09-1006:
02/boot/config-2.6.32-431.29
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- centos65 mhvtl gui iscsitgt 虚拟 磁带库 安装 应用