版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、一Mhvtl+mhvtl gui+iscsi1.安裝:yum install lsscsi mt-st mtx zlib-devel sg3_utils zlib lzo-devel kernel-devel kernel-headers gcc接著創(chuàng)建vtl用戶:#useradd vtl#passwd vtl#mkdir /opt/mhvtl# mkdir /etc/mhvtl# chown -Rf vtl:vtl /opt/mhvtl#chown -Rf vtl:vtl /etc/mhvtl(/etc/mhvtl為配置文件路徑 /opt/mhvtl為虛擬帶庫存儲路徑)2. 編譯安裝
2、0;MHVLT# tar -zxvf mhvtl-2013-03-22.tgzrootcentos001 tool# cd mhvtl-1.4rootcentos001 mhvtl-1.4# cd kernelrootcentos001 kernel# make;make installrootcentos001 mhvtl-1.4# make;make install如果未安裝lzo和lzo-devel開發(fā)環(huán)境將收到如下報錯:Note: Since mhvtl-1.3, both lzo and zlib are required to build vtltapeTypical e
3、rror (missing lzo devel package) looks like: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 -o vtltape.o vtltape.cv
4、tltape.c:92:25: error: lzo/lzoconf.h: No such file or directoryvtltape.c:93:23: error: lzo/lzo1x.h: No such file or directoryvtltape.c: In function 'uncompress_lzo_block'rootcentos001 mhvtl-1.4# service mhvtl statusCould not locate library config file: /etc/mhvtl/lib
5、rary_contents.10Creating a default onePlease stop mhvtl & edit /etc/mhvtl/library_contents.10 to suit your requirementsCould not locate library config file: /etc/mhvtl/library_contents.30Creating a default onePlease stop mhvtl & edit /etc/mhvtl/library_contents.30 to suit your requirementsUs
6、age: /etc/init.d/mhvtl start|stop|shutdownrootcentos001 mhvtl-1.4# service mhvtl startvtllibrary process PID is 1729vtllibrary process PID is 1733查看虛擬帶庫狀態(tài)信息 rootcentos001 mhvtl-1.4# lsscsi -g1:0:0:0 cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0 /dev/sg02:0:0:0 disk VMware, VMware Virtual S 1.0
7、 /dev/sda /dev/sg13:0:0:0 mediumx STK L700 0104 /dev/sch0 /dev/sg103:0:1:0 tape IBM ULT3580-TD5 0104 /dev/st0 /dev/sg23:0:2:0 tape IBM ULT3580-TD5 0104 /dev/st1 /dev/sg33:0:3:0 tape IBM ULT3580-TD4 0104 /dev/st2 /dev/sg43:0:4:0 tape IBM ULT3580-TD4 0104 /dev/st3 /dev/sg53:0:8:0 mediumx STK L80 0104
8、/dev/sch1 /dev/sg113:0:9:0 tape STK T10000B 0104 /dev/st4 /dev/sg63:0:10:0 tape STK T10000B 0104 /dev/st5 /dev/sg73:0:11:0 tape STK T10000B 0104 /dev/st6 /dev/sg83:0:12:0 tape STK T10000B 0104 /dev/st7 /dev/sg9rootcentos001 mhvtl-1.4# lsscsi -l1:0:0:0 cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0 s
9、tate=running queue_depth=1 scsi_level=6 type=5 device_blocked=0 timeout=302:0:0:0 disk VMware, VMware Virtual S 1.0 /dev/sda state=running queue_depth=32 scsi_level=3 type=0 device_blocked=0 timeout=303:0:0:0 mediumx STK L700 0104 /dev/sch0 state=running queue_depth=32 scsi_level=6 type=8 device_blo
10、cked=0 timeout=03:0:1:0 tape IBM ULT3580-TD5 0104 /dev/st0 state=running queue_depth=32 scsi_level=6 type=1 device_blocked=0 timeout=9003:0:2:0 tape IBM ULT3580-TD5 0104 /dev/st1 state=running queue_depth=32 scsi_level=6 type=1 device_blocked=0 timeout=9003:0:3:0 tape IBM ULT3580-TD4 0104 /dev/st2 s
11、tate=running queue_depth=32 scsi_level=6 type=1 device_blocked=0 timeout=9003:0:4:0 tape IBM ULT3580-TD4 0104 /dev/st3 state=running queue_depth=32 scsi_level=6 type=1 device_blocked=0 timeout=9003:0:8:0 mediumx STK L80 0104 /dev/sch1 state=running queue_depth=32 scsi_level=6 type=8 device_blocked=0
12、 timeout=03:0:9:0 tape STK T10000B 0104 /dev/st4 state=running queue_depth=32 scsi_level=0 type=1 device_blocked=0 timeout=9003:0:10:0 tape STK T10000B 0104 /dev/st5 state=running queue_depth=32 scsi_level=0 type=1 device_blocked=0 timeout=9003:0:11:0 tape STK T10000B 0104 /dev/st6 state=running que
13、ue_depth=32 scsi_level=0 type=1 device_blocked=0 timeout=9003:0:12:0 tape STK T10000B 0104 /dev/st7 state=running queue_depth=32 scsi_level=0 type=1 device_blocked=0 timeout=900這里的/dev/sg10和/dev/sg11是機械手。這個默認的容量是500MB,這個可以查看mhvtl的配置文件mhvtl.conf:rootcentos001 mhvtl-1.4# cat /etc/mhvtl/mhvtl.conf# Hom
14、e directory for config file(s)MHVTL_CONFIG_PATH=/etc/mhvtl# Default media capacity (500 M)CAPACITY=500# Set default verbosity 0|1|2|3VERBOSE=1# Set kernel module debuging 0|1VTL_DEBUG=0capacity=500就是指默認容量為500MB。3.簡單應用:查看機械手狀態(tài):rootcentos001 mhvtl-1.4# mtx -f /dev/sg10 status Storage Changer /dev/sg10
15、:4 Drives, 43 Slots ( 4 Import/Export )Data Transfer Element 0:EmptyData Transfer Element 1:EmptyData Transfer Element 2:EmptyData Transfer Element 3:Empty Storage Element 1:Full :VolumeTag=E01001L4 Storage Element 2:Full :VolumeTag=E01002L4 Storage Element 3:Full :VolumeTag=E01003L4 Storage Element
16、 4:Full :VolumeTag=E01004L4 Storage Element 5:Full :VolumeTag=E01005L4 Storage Element 6:Full :VolumeTag=E01006L4 Storage Element 7:Full :VolumeTag=E01007L4 Storage Element 8:Full :VolumeTag=E01008L4 Storage Element 9:Full :VolumeTag=E01009L4 Storage Element 10:Full :VolumeTag=E01010L4 Storage Eleme
17、nt 11:Full :VolumeTag=E01011L4 Storage Element 12:Full :VolumeTag=E01012L4 Storage Element 13:Full :VolumeTag=E01013L4 Storage Element 14:Full :VolumeTag=E01014L4 Storage Element 15:Full :VolumeTag=E01015L4 Storage Element 16:Full :VolumeTag=E01016L4 Storage Element 17:Full :VolumeTag=E01017L4 Stora
18、ge Element 18:Full :VolumeTag=E01018L4 Storage Element 19:Full :VolumeTag=E01019L4 Storage Element 20:Full :VolumeTag=E01020L4 Storage Element 21:Empty Storage Element 22:Full :VolumeTag=CLN101L4 Storage Element 23:Full :VolumeTag=CLN102L5 Storage Element 24:Empty Storage Element 25:Empty Storage El
19、ement 26:Empty Storage Element 27:Empty Storage Element 28:Empty Storage Element 29:Empty Storage Element 30:Full :VolumeTag=F01030L5 Storage Element 31:Full :VolumeTag=F01031L5 Storage Element 32:Full :VolumeTag=F01032L5 Storage Element 33:Full :VolumeTag=F01033L5 Storage Element 34:Full :VolumeTag
20、=F01034L5 Storage Element 35:Full :VolumeTag=F01035L5 Storage Element 36:Full :VolumeTag=F01036L5 Storage Element 37:Full :VolumeTag=F01037L5 Storage Element 38:Full :VolumeTag=F01038L5 Storage Element 39:Full :VolumeTag=F01039L5 Storage Element 40 IMPORT/EXPORT:Empty Storage Element 41 IMPORT/EXPOR
21、T:Empty Storage Element 42 IMPORT/EXPORT:Empty Storage Element 43 IMPORT/EXPORT:Emptyrootcentos001 mhvtl-1.4# mtx -f /dev/sg11 status Storage Changer /dev/sg11:4 Drives, 44 Slots ( 4 Import/Export )Data Transfer Element 0:EmptyData Transfer Element 1:EmptyData Transfer Element 2:EmptyData Transfer E
22、lement 3:Empty Storage Element 1:Full :VolumeTag=G03001TA Storage Element 2:Full :VolumeTag=G03002TA Storage Element 3:Full :VolumeTag=G03003TA Storage Element 4:Full :VolumeTag=G03004TA Storage Element 5:Full :VolumeTag=G03005TA Storage Element 6:Full :VolumeTag=G03006TA Storage Element 7:Full :Vol
23、umeTag=G03007TA Storage Element 8:Full :VolumeTag=G03008TA Storage Element 9:Full :VolumeTag=G03009TA Storage Element 10:Full :VolumeTag=G03010TA Storage Element 11:Full :VolumeTag=G03011TA Storage Element 12:Full :VolumeTag=G03012TA Storage Element 13:Full :VolumeTag=G03013TA Storage Element 14:Ful
24、l :VolumeTag=G03014TA Storage Element 15:Full :VolumeTag=G03015TA Storage Element 16:Full :VolumeTag=G03016TA Storage Element 17:Full :VolumeTag=G03017TA Storage Element 18:Full :VolumeTag=G03018TA Storage Element 19:Full :VolumeTag=G03019TA Storage Element 20:Full :VolumeTag=G03020TA Storage Elemen
25、t 21:Full :VolumeTag=G03021TA Storage Element 22:Full :VolumeTag=G03022TA Storage Element 23:Full :VolumeTag=G03023TA Storage Element 24:Full :VolumeTag=G03024TA Storage Element 25:Full :VolumeTag=G03025TA Storage Element 26:Full :VolumeTag=G03026TA Storage Element 27:Full :VolumeTag=G03027TA Storag
26、e Element 28:Full :VolumeTag=G03028TA Storage Element 29:Full :VolumeTag=G03029TA Storage Element 30:Full :VolumeTag=G03030TA Storage Element 31:Full :VolumeTag=G03031TA Storage Element 32:Full :VolumeTag=G03032TA Storage Element 33:Full :VolumeTag=G03033TA Storage Element 34:Full :VolumeTag=G03034T
27、A Storage Element 35:Full :VolumeTag=G03035TA Storage Element 36:Full :VolumeTag=G03036TA Storage Element 37:Full :VolumeTag=G03037TA Storage Element 38:Full :VolumeTag=G03038TA Storage Element 39:Full :VolumeTag=G03039TA Storage Element 40:Full :VolumeTag=CLN303TA Storage Element 41 IMPORT/EXPORT:E
28、mpty Storage Element 42 IMPORT/EXPORT:Empty Storage Element 43 IMPORT/EXPORT:Empty Storage Element 44 IMPORT/EXPORT:Empty將磁帶從1號槽位裝入driver 0:rootcentos001 mhvtl-1.4# mtx -f /dev/sg10 load 1 0sLoading media from Storage Element 1 into drive 0.donerootcentos001 mhvtl-1.4# mtx -f /dev/sg10 status Storag
29、e Changer /dev/sg10:4 Drives, 43 Slots ( 4 Import/Export )Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = E01001L4 Data Transfer Element 1:EmptyData Transfer Element 2:EmptyData Transfer Element 3:Empty Storage Element 1:Empty Storage Element 2:Full :VolumeTag=E01002L4 Storage El
30、ement 3:Full :VolumeTag=E01003L4查看磁帶狀態(tài):rootcentos001 mhvtl-1.4# mt -f /dev/st0 statusSCSI 2 tape drive:File number=0, block number=0, partition=0.Tape block size 0 bytes. Density code 0x46 (LTO-4).Soft error count since last status=0General status bits on (41010000): BOT ONLINE IM_REP_EN使用tar命令測試下,能
31、否寫入文件:rootcentos001 mhvtl-1.4# tar -cvvf /dev/st1 /boottar: Removing leading /' from member namesdr-xr-xr-x root/root 0 2014-09-11 16:58 /boot/-rw-r-r- root/root 2519609 2014-07-25 17:00 /boot/System.map-2.6.32-431.20.5.el6.x86_64drwxr-xr-x root/root 0 2013-11-13 18:04 /boot/efi/drwxr-xr-x root/
32、root 0 2013-11-13 18:04 /boot/efi/EFI/drwxr-xr-x root/root 0 2014-07-30 14:55 /boot/efi/EFI/redhat/-rwxr-xr-x root/root 252990 2014-07-25 20:08 /boot/efi/EFI/redhat/grub.efi-rw-r-r- root/root 105200 2014-09-10 06:02 /boot/config-2.6.32-431.29.2.el6.x86_64-rw-r-r- root/root 193945 2014-09-10 06:02 /b
33、oot/symvers-2.6.32-431.29.2.el6.x86_64.gzdrwxr-xr-x root/root 0 2014-09-10 15:45 /boot/grub/-rw-r-r- root/root 13268 2013-11-13 18:09 /boot/grub/jfs_stage1_5-rw-r-r- root/root 12620 2013-11-13 18:09 /boot/grub/fat_stage1_5-rw-r-r- root/root 13380 2013-11-13 18:09 /boot/grub/e2fs_stage1_5-rw-r-r- roo
34、t/root 512 2013-11-13 18:09 /boot/grub/stage1-rw-r-r- root/root 13964 2013-11-13 18:09 /boot/grub/xfs_stage1_5-rw-r-r- root/root 11748 2013-11-13 18:09 /boot/grub/ffs_stage1_5-rw-r-r- root/root 11364 2013-11-13 18:09 /boot/grub/vstafs_stage1_5-rw-r-r- root/root 14412 2013-11-13 18:09 /boot/grub/reis
35、erfs_stage1_5-rw-r-r- root/root 11756 2013-11-13 18:09 /boot/grub/iso9660_stage1_5lrwxrwxrwx root/root 0 2013-11-13 18:09 /boot/grub/menu.lst -> ./grub.conf寫入成功了,測試是否能讀取呢:rootcentos001 mhvtl-1.4# tar -tvvf /dev/st1dr-xr-xr-x root/root 0 2014-09-11 16:58 boot/-rw-r-r- root/root 2519609 2014-07-25
36、17:00 boot/System.map-2.6.32-431.20.5.el6.x86_64drwxr-xr-x root/root 0 2013-11-13 18:04 boot/efi/drwxr-xr-x root/root 0 2013-11-13 18:04 boot/efi/EFI/drwxr-xr-x root/root 0 2014-07-30 14:55 boot/efi/EFI/redhat/-rwxr-xr-x root/root 252990 2014-07-25 20:08 boot/efi/EFI/redhat/grub.efi-rw-r-r- root/roo
37、t 105200 2014-09-10 06:02 boot/config-2.6.32-431.29.2.el6.x86_64-rw-r-r- root/root 193945 2014-09-10 06:02 boot/symvers-2.6.32-431.29.2.el6.x86_64.gz查看磁帶位置:rootcentos001 mhvtl-1.4# cd /opt/mhvtlrootcentos001 mhvtl# du -sm *1 CLN101L41 CLN102L51 CLN303TA1 E01001L4141 E01002L4接下來測試倒帶:rootcentos001 mhv
38、tl-1.4# mt -f /dev/st1 rewindrootcentos001 mhvtl-1.4#卸載磁帶:rootcentos001 mhvtl-1.4# mtx -f /dev/sg10 unload 1 0Unloading drive 0 into Storage Element 1.donerootcentos001 mhvtl-1.4#4. 配置linux iscsi發(fā)起端,使用tgtd,安裝tgtd(tgtd:iscsi服務器端進程),安裝iSCSI taget安裝iSCSI taget 前先安裝perl-Config-Genera
39、l-2.52-1.el6.noarch.rpm,然后安裝 scsi-target-utils-1.0.24-12.el6_5.x86_64.rpmrootcentos001 mhvtl# yum install scsi-target-utils-> Running transaction check-> Package scsi-target-utils.x86_64 0:1.0.24-12.el6_5 will be installed-> Processing Dependency: perl(Config:General) for package: scsi-targ
40、et-utils-1.0.24-12.el6_5.x86_64-> Running transaction check-> Package perl-Config-General.noarch 0:2.52-1.el6 will be installed-> Finished Dependency ResolutionDependencies Resolved= Package Arch Version Repository Size=Installing: scsi-target-utils x86_64 1.0.24-12.el6_5 updates 175 kInsta
41、lling for dependencies: perl-Config-General noarch 2.52-1.el6 base 72 kTransaction Summary=Install 2 Package(s)Total download size: 247 kInstalled size: 623 kIs this ok y/N: yDownloading Packages:(1/2): perl-Config-General-2.52-1.el6.noarch.rpm | 72 kB 00:00(2/2): scsi-target-utils-1.0.24-12.el6_5.x
42、86_64.rpm | 175 kB 00:00-Total 950 kB/s | 247 kB 00:00Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : perl-Config-General-2.52-1.el6.noarch 1/2 Installing : scsi-target-utils-1.0.24-12.el6_5.x86_64 2/2 Verifying : perl-Config-General-2.52-1.e
43、l6.noarch 1/2 Verifying : scsi-target-utils-1.0.24-12.el6_5.x86_64 2/2啟動tgtd服務rootcentos001 mhvtl# service tgtd start把帶庫映射給iscsirootcentos001 mhvtl# lsscsi -g1:0:0:0 cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0 /dev/sg02:0:0:0 disk VMware, VMware Virtual S 1.0 /dev/sda /dev/sg13:0:0:0 mediumx STK
44、L700 0104 /dev/sch0 /dev/sg103:0:1:0 tape IBM ULT3580-TD5 0104 /dev/st0 /dev/sg23:0:2:0 tape IBM ULT3580-TD5 0104 /dev/st1 /dev/sg33:0:3:0 tape IBM ULT3580-TD4 0104 /dev/st2 /dev/sg43:0:4:0 tape IBM ULT3580-TD4 0104 /dev/st3 /dev/sg53:0:8:0 mediumx STK L80 0104 /dev/sch1 /dev/sg113:0:9:0 tape STK T1
45、0000B 0104 /dev/st4 /dev/sg63:0:10:0 tape STK T10000B 0104 /dev/st5 /dev/sg73:0:11:0 tape STK T10000B 0104 /dev/st6 /dev/sg83:0:12:0 tape STK T10000B 0104 /dev/st7 /dev/sg9rootcentos001 mhvtl# vim /etc/tgt/targets.conf 添加<target iqn.2014-.example:server.targetmhvtl> backing-store /dev/sg10 bac
46、king-store /dev/sg2 backing-store /dev/sg3 backing-store /dev/sg4 backing-store /dev/sg5 backing-store /dev/sg11 backing-store /dev/sg6 backing-store /dev/sg7 backing-store /dev/sg8 backing-store /dev/sg9 device-type pt bs-type sg</target>initiator-address ALLrootcentos001 mhvtl# service tgtd
47、restartStopping SCSI target daemon: OK Starting SCSI target daemon: OK 可以查詢一下映射的帶庫rootcentos001 mhvtl# tgtadm -lld iscsi -op show -mode targetTarget 1: iqn.2014-.example:server.targetmhvtl System information: Driver: iscsi State: ready I_T nexus information: LUN information: LUN: 0 Type: controller SCSI ID: IET 00010000 SCSI SN: beaf10 Size: 0 MB, Block size: 1 Online: Yes Removable media: No Prevent removal: No Readonly: No Backing store type: null Backing store path: None Backing store flags: LUN: 1 Type: passthrough SCSI ID: IET 00010001 SCSI
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年度大米加工企業(yè)廢棄物處理合作合同3篇
- 2024年甲乙雙方關(guān)于購買家具的合同
- 辦公環(huán)境的明燈創(chuàng)新型LED手電筒的貢獻
- 辦公環(huán)境中的安全生產(chǎn)管理與風險防范
- 2025中國鐵路上海局集團限公司招聘577人高頻重點提升(共500題)附帶答案詳解
- 2025中國聯(lián)通廣西分公司招聘88人高頻重點提升(共500題)附帶答案詳解
- 2025中國移動浙江公司校園招聘580人高頻重點提升(共500題)附帶答案詳解
- 2025中國電信河北滄州分公司校園招聘4人高頻重點提升(共500題)附帶答案詳解
- 2025中國建筑一局(集團)限公司一公司廣東分公司市場經(jīng)理招聘高頻重點提升(共500題)附帶答案詳解
- 2025中國化學工程重型機械化限公司招聘75人高頻重點提升(共500題)附帶答案詳解
- 提高護理文書書寫規(guī)范率PDCA
- 八年級上冊道德與法治期末試卷3(開卷)
- DZ/T 0462.3-2023 礦產(chǎn)資源“三率”指標要求 第3部分:鐵、錳、鉻、釩、鈦(正式版)
- 《湖北省竹山縣四棵樹釩礦 礦產(chǎn)資源綜合開發(fā)利用及生態(tài)復綠方案》
- 2024年西藏自治區(qū)中考地理真題(解析版)
- 生物化學實驗智慧樹知到期末考試答案2024年
- (正式版)JBT 14682-2024 多關(guān)節(jié)機器人用伺服電動機技術(shù)規(guī)范
- 醫(yī)療機構(gòu)藥事管理專業(yè)知識專家講座
- MOOC 大學英語綜合教程(中級)-華中農(nóng)業(yè)大學 中國大學慕課答案
- 中小學足球教練員培訓
- 江南音樂文化之美智慧樹知到期末考試答案2024年
評論
0/150
提交評論