最近準備使用Oracle ACFS在RAC環境下搭建OGG-HA,因而在RedHat6.5 64位系統上搭建了一套Oracle11.2.0.4.0 RAC,發現ACFS沒法使用。以後查找大量資料,發現11G ACFS並不支持RedHat6.5,11.2.0.4.0只支持到RedHat6.3。接下來介紹一下OracleACFS Support on Linux的信息。linux
不支持ACFS的描述shell
[grid@redhat6.5 ~]$cat /etc/issue|sed –n ‘1p’ Red Hat Enterprise Linux Server release 6.5(Santiago) [grid@redhat6.5 ~]$ lsmod | grep acfs #不支持的OS上 [grid@redhat6.2 ~]$cat /etc/issue|sed –n ‘1p’ Red Hat Enterprise Linux Server release 6.2(Santiago) [grid@redhat6.2 ~]$lsmod| grep acfs #支持的OS上 oracleacfs 1670360 0 oracleoks 321904 2 oracleacfs,oracleadvm
從上能夠看到對於不支持ACFS的OS Kernel模塊上是沒有ACFS相關信息的。接下來咱們看看Cluster服務上的ACFS相關的服務centos
[grid@redhat6.5 ~]$ crs_stat -t -vora.registry.acfs #不支持的OS上 CRS-0210: Could not find resource ‘ora.registry.acfs’. [grid@redhat6.2 ~]$ crs_stat -t -vora.registry.acfs #支持的OS上 Name Type R/RA F/FT Target State Host --------------------------------------------------------------------------------------- ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE note1 [grid@redhat6.2 ~]$crsctl status resora.drivers.acfs –init #支持的OS上 NAME=ora.drivers.acfs TYPE=ora.drivers.acfs.type TARGET=ONLINE STATE=ONLINE on note1
在安裝Grid Infrastructure執行root.sh腳本的時候建立ACFS註冊表資源(ora.registry.acfs)。此過程會初始化集羣內節點的ACFS加載註冊表,若初始化成功,ora.registry.acfs資源狀態爲ONLINE,不然初始化失敗。對於不支持的OS都會初始化失敗。能夠經過如下方法驗證:bash
[grid@redhat6.2 ~]$ acfsdriverstate -orahome$ORACLE_HOME supported ACFS-9200: Supported [grid@redhat6.5 ~]$ acfsdriverstate-orahome $ORACLE_HOME supported ACFS-9459: ADVM/ACFS is not supported on this OSversion: ’unknown’ ACFS-9201:Not Supported
acfsdriverstate是一個shell腳本,經過調用$ORACLE_HOME/lib/acfstoolsdriver.sh腳本,以後由acfstoolsdriver.sh調用$ORACLE_HOME/lib/osds-*.pm腳本進行驗證。其中osds-acfslib.pm的perl腳本就是用於驗證支持的OSPlatforms及對應的版本。接下來咱們來看看這個腳本(因爲本人對perl不瞭解,也只是能看懂一點)oracle
# Testing for "oraclelinux_release", etcprevents us from dropping # into the code below from other RH based distroslike CentOS, for example. if ((defined($release)) && #Redhat or OEL if defined (($release =~ /^redhat-release/) || # straight RH ($release =~ /^enterprise-release/) || # Oracle Enterprise Linux ($release =~ /^oraclelinux-release/))) # Oracle Linux
這裏提到基於RedHat的發行版,如CentOS,Oracle Linux等都是基於RedHat開源源碼編譯的OS是支持ACFS的,因而就有大神此基礎上對腳本添加了對CentOS的支持以下:app
if ((defined($release)) && #Redhat or OEL if defined (($release =~ /^redhat-release/) || # straight RH ($release=~ /^enterprise-release/) || # Oracle Enterprise Linux ($release =~ /^centos-release/)|| #Centos Linux ($release =~ /^oraclelinux-release/))) # Oracle Linux
看到這裏會不會有朋友靈感爆發,嘗試去修改osds-acfslib.pm裏支持內核版本的相關信息呢?對的,筆者就嘗試過,但對於筆者這種菜鳥來講,確定是以失敗了結的。接下來再進一步分析失敗的緣由:tcp
[root@ redhat6.2 ~]#/u/app/11.2.0/grid/bin/acfsroot version_check #支持的OS上 ACFS-9316: Valid ADVM/ACFS distribution mediadetected at: ' /u/app/11.2.0/grid/install/usm/EL6/x86_64/2.6.32-220/2.6.32-220.el6-x86_64/bin' [root@ redhat6.5 ~]#/u/app/11.2.0/grid/bin/acfsroot version_check #不支持的OS上 ACFS-9459: ADVM/ACFS is not supported on this OSversion: ’unknown’ ACFS-9319:Unknown OS kernel version ’26.32-431.el6.x86_64’detected ACFS-9320:Missing file: ’oracleoks.ko’ ACFS-9320:Missing file: ’oracleacfs.ko’ ACFS-9317: No ADVM/ACFS distribution media detectedat location: ' /u/app/11.2.0/grid/install/usm'
到這裏緣由應該很清楚了,/u/app/11.2.0/grid/install/usm目錄下會有相應的內核支持目錄,這是安裝GridInfrastructure時創建的,詳情請查看grep 「acfs」/u/app/oraInventory/logs/installActions*.log的相關信息,對於不支持的OS Platforms及內核版本是不會創建的,裏面包含了ACFS驅動模塊(oracleoks.ko,oracleadvm.ko oracleacfs.ko)。所以咱們能夠經過/u/app/11.2.0/grid/install/usm目錄查看ACFS支持的Linux操做系統不一樣的內核類型(這裏我列舉2個Oracle版本的):ide
11.2.0.3.0版本:this
/u/app/11.2.0/grid/install/usm目錄下有(cmds,EL5,EL6,SLES10 ,SLES11)五個子目錄spa
[root@ redhat6.2 usm]# tree -L 3 EL5 EL6 EL5 |-- i386 | `--2.6.18-8 | |--2.6.18-8.el5-i686 | |--2.6.18-8.el5PAE-i686 | `--2.6.18-8.el5xen-i686 `-- x86_64 |--2.6.18-8 | |-- 2.6.18-8.el5-x86_64 | `-- 2.6.18-8.el5xen-x86_64 |--2.6.32-100 | `-- 2.6.32-100-x86_64 `--2.6.32-200 `--2.6.32-200-x86_64 EL6 `-- x86_64 |--2.6.32-100 | `-- 2.6.32-100-x86_64 |--2.6.32-200 | `-- 2.6.32-200-x86_64 `--2.6.32-71 `--2.6.32-71.el6-x86_64
11.2.0.4.0版本:
/u/app/11.2.0/grid/install/usm目錄下有(cmds,Novell,Oracle)三個子目錄
[root@note1 usm]# tree -L 3 Oracle Novell Oracle ├── EL5 │ └── x86_64 │ └── 2.6.18-8 ├── EL5UEK │ └── x86_64 │ ├── 2.6.32-100 │ ├── 2.6.32-200 │ ├── 2.6.32-300 │ ├── 2.6.32-400 │ ├── 2.6.39-100 │ ├── 2.6.39-200 │ ├── 2.6.39-300 │ └── 2.6.39-400 ├── EL6 │ └── x86_64 │ ├── 2.6.32-220 │ ├── 2.6.32-279 #RedHat 6.3 │ └── 2.6.32-71 └── EL6UEK └──x86_64 ├──2.6.32-100 ├──2.6.32-200 ├──2.6.32-300 ├──2.6.32-400 ├──2.6.39-100 ├──2.6.39-200 ├──2.6.39-300 └──2.6.39-400 Novell ├── SLES10 │ └── x86_64 │ └── 2.6.16.21-0.8 └── SLES11 └──x86_64 ├──2.6.27.19-5 ├──2.6.32.12-0.7 ├──3.0.13-0.27 └──3.0.61-0.9
而後經過命令uname –r (RedHat 6)、uname –r –i (RedHat5)確認OS是否支持ACFS。
對於以上總結:
一、若須要使用ACFS時,先規劃選取可用該功能OS,避免重裝,可使用CentOS,但內核版本是必須知足支持ACFS的內核。
二、也可使用UEK(UnbreakableEnterprise Kernel)進行更換內核。
三、要使用ACFS須要將asm的兼容性設置爲11.2(alterdiskgroup data set attribute 'COMPATIBLE.ASM'='11.2';)
請參考:
http://docs.oracle.com/cd/E11882_01/install.112/e47689/oraclerestart.htm
http://docs.oracle.com/database/121/CWLIN/storage.htm
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1369107.1