rhel5.8安裝oracle 10g ASM

來源:互聯網
上載者:User

標籤:des   style   blog   http   os   io   使用   strong   ar   

1.所有的配置和檔案系統一樣 2.規劃:

加了8塊小盤,ASM為了實驗使用asmlib驅動(rhel6不再支援asmlib驅動),裸裝置的2種方法(rowdevice和udev)

三塊盤使用asmlib,兩塊使用rowdevice,兩塊使用udev 2.分區

(1)查看

[[email protected] ~]# 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  System

(2)fdisk /dev/sdb

指令順序:n -- p -- 1 -- 斷行符號 -- 斷行符號 -- w 

/dev/sdc /dev/sdd  /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi 執行相同的操作 3.建立磁碟組及裸裝置

[[email protected] ~]# uname -rm

2.6.18-308.el5 x86_64

:http://www.oracle.com/technetwork/server-storage/linux/downloads/index-088143.html

建立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

查看

[[email protected] ~]# 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}

[[email protected] ~]# 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方式

[[email protected] 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

查看:

[[email protected] ~]# 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執行個體

在dbca的時候建立ASM

可見,所有的裸裝置都已經被識別

,好了,開始選擇所需要的磁碟裝置,單擊下一步開始安裝。

  4,安裝的過程中遇到的一些問題 第一,dbca配置ASM執行個體

解決

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

localconfig delete

[[email protected] 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

[[email protected] 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錯誤

解決:

在網上查了一下。修改了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以前的都可能導致這個錯誤的產生。

rhel5.8安裝oracle 10g ASM

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.