rhel5.8安裝oracle 10g ASM

 

1.全部的配置和文件系統同樣

2.規劃:

Image

加了8塊小盤,ASM爲了實驗使用asmlib驅動(rhel6再也不支持asmlib驅動),裸設備的2種方法(rowdevice和udev)css

三塊盤使用asmlib,兩塊使用rowdevice,兩塊使用udevhtml

2.分區

(1)查看node

[root@10gasm ~]# fdisk -l
Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1958    15623212+  8e  Linux LVM
Disk /dev/sdb: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdd: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sde: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdg: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdh: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
Disk /dev/sdi: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  Systemlinux

(2)fdisk /dev/sdb網絡

指令順序:n -- p -- 1 -- 回車 -- 回車 -- w oracle

/dev/sdc /dev/sdd  /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi 執行相同的操做oop

3.建立磁盤組及裸設備

[root@10gasm ~]# uname -rmspa

2.6.18-308.el5 x86_64ssr

下載地址:http://www.oracle.com/technetwork/server-storage/linux/downloads/index-088143.html3d

Image

建立ASM磁盤組

(1)下面這種方式是經過asmlib建立磁盤組,在建立

/etc/init.d/oracleasm configure

/etc/init.d/oracleasm createdisk V1 /dev/sdb1

/etc/init.d/oracleasm createdisk V2 /dev/sdc1

/etc/init.d/oracleasm createdisk V3 /dev/sdd1

/etc/init.d/oracleasm scandisks

/etc/init.d/oracleasm listdisks

(2)下面這種方式經過rowdeviece方式配置

配置文件/etc/sysconfig/rawdevices

添加:

/dev/raw/raw1   /dev/sde1
/dev/raw/raw2   /dev/sdf1
/dev/raw/raw3   /dev/sdg1

啓動服務

/etc/init.d/rawdevices start

查看

[root@10gasm ~]# raw -qa
/dev/raw/raw1:  bound to major 8, minor 65
/dev/raw/raw2:  bound to major 8, minor 81
/dev/raw/raw3:  bound to major 8, minor 97

修改權限

chown oracle:oinstall /dev/raw/raw{1,2,3}

chmod 660 /dev/raw/raw{1,2,3}

上面的兩條命令加入到/etc/rc.d/rc.local文件中,以便重啓時附權

[root@10gasm ~]# ls -l /dev/raw
total 0
crw-rw---- 1 oracle oinstall 162, 1 Sep  2 19:24 raw1
crw-rw---- 1 oracle oinstall 162, 2 Sep  2 19:24 raw2
crw-rw---- 1 oracle oinstall 162, 3 Sep  2 19:24 raw3

(3)使用udev方式

[root@10gasm raw]# vi /etc/udev/rules.d/60-raw.rules
# Enter raw device bindings here.
#
# An example would be:
#   ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
#   ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/bin/raw /dev/raw/raw5 %M %m"
# to bind /dev/raw/raw5 to the device with major 8, minor 1.
ACTION=="add", KERNEL=="sdh1", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdi1", RUN+="/bin/raw /dev/raw/raw5 %N"
KERNEL=="raw[4-5]", OWNER="oracle", GROUP="oinstall", MODE="660"

重啓服務

/sbin/start_udev

查看:

[root@10gasm ~]# ls -l /dev/raw
total 0
crw------- 1 root   root     162, 1 Sep  2 19:24 raw1
crw------- 1 root   root     162, 2 Sep  2 19:24 raw2
crw------- 1 root   root     162, 3 Sep  2 19:24 raw3
crw-rw---- 1 oracle oinstall 162, 4 Sep  2 19:33 raw4
crw-rw---- 1 oracle oinstall 162, 5 Sep  2 19:33 raw5

下面的raw4 ,raw5 爲用udev綁定的設備,這樣的好處是能夠直接把權限和屬組等直接附給裸設備,重啓後不須要再次修改權限,而是用上面rawdevice方式,須要手動修改裸設備的權限。

到如今能夠供ASM磁盤使用的裸設備有:

3個磁盤組V1 V2 V3

3塊兒rawdevece配置的裸設備

2塊兒udev配置的裸設備

3,開始安裝oracle soft

執行runInstaller(推薦在安裝軟件的時候不要新建ASM磁盤和實例,在dbca建庫的時候再建立ASM實例

Image

Image

Image

推薦:在dbca的時候建立ASM

Image

上圖可見,全部的裸設備都已經被識別

,好了,開始選擇所須要的磁盤設備,單擊下一步開始安裝。

 

4,安裝的過程當中遇到的一些問題

第一,dbca配置ASM實例

Image

解決

Please run the following batch files in the $ORACLE_HOME/bin directory(在root用戶下)

localconfig delete

[root@localhost bin]# ./localconfig delete
/etc/init.d/init.cssd: line 519: /etc/oracle/scls_scr/localhost/root/cssrun: 沒
有那個文件或目錄
/bin/touch: cannot touch ‘/etc/oracle/scls_scr/localhost/root/nooprocd’: 沒有
那個文件或目錄
/bin/touch: cannot touch ‘/etc/oracle/scls_scr/localhost/root/noclsmon’: 沒有
那個文件或目錄
Stopping CSSD.
Failure in CSS initialization opening OCR.
Shutdown has begun. The daemons should exit soon.

localconfig add

[root@localhost bin]# ./localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        localhost
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

This will help you to solve your problem

問題解決了,asm實例能夠啓動了

若是不能執行,重啓系統。

第二,上面的問題解決後,在建立ASM實例的時候又報下面的ora-00600錯誤

Image

解決:

在網上查了一下。修改了hostname後會致使這個問題。和朋友確認了一下,確實有修改過機器的hostname,緣由肯定清楚了,着手解決就很簡單了,修改/etc/hosts文件,加入hostanme便可。

其餘說明:Oracle的meatlink上文檔Doc ID: Note:5486074.8的描述:當Oracle沒法肯定主機名或者網絡地址的時候,會出現這個錯誤信息。Oracle在10.2.0.4和11.1.0.6中解決了這個bug。Oracle的metalink上指出在10.2.0.4之前的均可能致使這個錯誤的產生。

相關文章
相關標籤/搜索