一、 Oracle asmlib 安裝
在oracle.com 上下載合適的驅動程式,版本和作業系統的核心要一致。
目前只有linux 作業系統上有asmlib 包,其他的系統暫時還沒有。asmlib 簡化磁碟管理,取代原來我們在linux 上常用rawdevices 服務。
根據uname –r 檢測結果,下載的驅動程式套件名稱與其一致。務必!!!
[root@db2 ~]# uname -r
2.6.18-238.el5
這裡我最初下載包是2.6.18-238.12.1.el5 ,安裝後初始化配置時失敗。後來又找到一個oracleasm-2.6.18-238.el5-2.0.5-1.el5 的安裝包,安裝成功後才成功。
[root@db2 ~]# rpm -qa |grep asm
oracleasm-2.6.18-238.el5-2.0.5-1.el5
oracleasmlib-2.0.4-1.el5
oracleasm-2.6.18-238.12.1.el5-2.0.5-1.el5
oracleasm-support-2.1.7-1.el5
oracleasm-2.6.18-238.12.1.el5-debuginfo-2.0.5-1.el5
真正需要安裝的asmlib 包如下:
oracleasm-support-version.arch.rpm
oracleasm-kernel-version.arch.rpm
oracleasmlib- version .arch.rpm
二、Oracle asmlib 配置
在軟體包安裝以後,需要配置才能使其生效。
[root@db2 ~]# oracleasm configure
執行結果如下:
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [y]:
Fix permissions of Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: [ OK ]
Scanning system for ASM disks: [ OK ]
這個指令碼執行完成了四大任務。
1 、建立了設定檔/etc/sysconfig/oracleasm
2 、建立了掛載點/dev/oracleasm
3 、載入oracleasm 核心模組
4 、掛載ASM 函數驅動檔案系統