OEL6.8安装虚拟带库模拟器
最近在虛擬機下搭建了一個OSB備份環境,其中使用到了虛擬帶庫,以下是虛擬帶庫的配置過程,簡要記錄之。
1、下載虛擬帶庫的源碼(mhvtl-2016-03-10.tgz)。
2、解壓縮源碼。
# cd /tmp # gunzip mhvtl-2016-03-10.tgz # tar -xvf mhvtl-2016-03-10.tar |
?
3、源碼安裝失敗。
# cd /tmp/mhvtl-1.5/kernel [root@vmtape kernel]# make make -C /lib/modules/4.1.12-37.4.1.el6uek.x86_64/build SUBDIRS=/tmp/mhvtl-1.5/kernel modules make: *** /lib/modules/4.1.12-37.4.1.el6uek.x86_64/build: No such file or directory. Stop. make: *** [default] Error 2 [root@vmtape kernel]# |
可見安裝失敗,提示缺少/lib/modules/4.1.12-37.4.1.el6uek.x86_64/build。
[root@vmtape kernels]# ll /lib/modules/4.1.12-37.4.1.el6uek.x86_64/build lrwxrwxrwx. 1 root root 52 Dec 25 12:23 /lib/modules/4.1.12-37.4.1.el6uek.x86_64/build -> ../../../usr/src/kernels/4.1.12-37.4.1.el6uek.x86_64 [root@vmtape kernels]# cd /usr/src/kernels [root@vmtape kernels]# ll total 0 [root@vmtape kernels]# |
發現/usr/src/kernels下沒有任何內容。
解決辦法:安裝kernel-devel即可。
[root@vmtape kernels]# mount /dev/cdrom /mnt/cdrom mount: block device /dev/sr0 is write-protected, mounting read-only [root@vmtape kernels]# yum install -y kernel-devel ? [root@vmtape kernels]# cd /usr/src/kernels [root@vmtape kernels]# ll total 4 drwxr-xr-x 22 root root 4096 Jan 11 22:08 2.6.32-642.el6.x86_64 [root@vmtape kernels]# |
我們可以發現安裝的是2.6.32-642.el6,而當前是4.1.12-37.4.1.el6uek UEK內核,只需要將當前內核切換到RedHat兼容即可。
[root@vmtape ~]# uname -a Linux vmtape 4.1.12-37.4.1.el6uek.x86_64 #2 SMP Tue May 17 07:23:38 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux [root@vmtape ~]# # vi /etc/grub.conf default=0 修改為1 [root@vmtape ~]# uname -a Linux vmtape 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 12:00:56 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux [root@vmtape ~]# |
?
3、修復錯誤后,重新源碼安裝。
[root@vmtape ~]# cd /tmp/mhvtl-1.5/kernel/ [root@vmtape kernel]# make make -C /lib/modules/2.6.32-642.el6.x86_64/build SUBDIRS=/tmp/mhvtl-1.5/kernel modules make[1]: Entering directory `/usr/src/kernels/2.6.32-642.el6.x86_64' CC [M] /tmp/mhvtl-1.5/kernel/mhvtl.o /tmp/mhvtl-1.5/kernel/mhvtl.c:304: warning: initialization from incompatible pointer type Building modules, stage 2. MODPOST 1 modules CC /tmp/mhvtl-1.5/kernel/mhvtl.mod.o LD [M] /tmp/mhvtl-1.5/kernel/mhvtl.ko.unsigned NO SIGN [M] /tmp/mhvtl-1.5/kernel/mhvtl.ko make[1]: Leaving directory `/usr/src/kernels/2.6.32-642.el6.x86_64' [root@vmtape kernel]# [root@vmtape kernel]# make install install -o root -g root -m 644 mhvtl.ko /lib/modules/`uname -r`/kernel/drivers/scsi/; \ depmod -a; \ if [ -f "/etc/modprobe.d/unsupported-modules" ]; then \ sed -i 's/^allow_unsupported_modules 0/allow_unsupported_modules 1/' /etc/modprobe.d/unsupported-modules; \ fi [root@vmtape kernel]# ? [root@vmtape ~]# cd /tmp/mhvtl-1.5/ # make # make install |
?
4、重啟操作系統。
# reboot |
?
5、查看虛擬帶庫設備。
# lsscsi -g …… [6:0:0:0] mediumx IBM 03584L32 4.02 - /dev/sg21 [6:0:1:0] tape IBM ULTRIUM-TD3 51TB - /dev/sg17 [6:0:2:0] tape IBM ULTRIUM-TD3 51TB - /dev/sg18 [6:0:3:0] tape IBM ULTRIUM-TD3 51TB - /dev/sg19 [6:0:4:0] tape IBM ULTRIUM-TD3 51TB - /dev/sg20 |
至此,虛擬帶庫已經安裝完畢。
轉載于:https://www.cnblogs.com/missyou-shiyh/p/10381632.html
總結
以上是生活随笔為你收集整理的OEL6.8安装虚拟带库模拟器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 1. 添加资源定义
- 下一篇: 微信小程序家庭记账本开发进度二