oracle 安裝asm grid

可參見oracle 官方安裝文檔:

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/install/gridinstss/gridinstss.htm#t2s1

 

圖片太多了,就沒有上傳,下次整理再補....

 

ORACLE 11g GRID安裝

1.          ASM磁盤創建.. 2

1.1.           oracleasmlib 和 安裝ASM包(root身份)2

1.2.           配置oracleasm(root身份)2

1.3.           準備磁盤設備.. 3

1.3.1.           給虛擬機增加硬盤.. 3

1.3.2.           進入操作系統 fdisk 格式化硬盤(root身份)4

1.4.           創建asm磁盤卷設備(root身份)6

1.4.1.           異常錯誤處理.. 6

1.5.           準備grid安裝軟件.. 7

1.6.         安裝grid. 7

1.7.           安裝grid. 21

 

 


 

1.       ASM磁盤創建

1.1.  oracleasmlib 和 安裝ASM包(root身份)

此相關軟件包下載地址:

http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html#oracleasm_rhel5_x86

注意,請順序安裝,如果中間卻少相關係統包,請找到相關包進行安裝;

rpm -vhi oracleasm-support-2.1.7-1.el5.i386.rpm

rpm -ivh oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm

rpm -vhi oracleasmlib-2.0.4-1.el5.i386.rpm

 

rpm -vhi oracleasm-2.6.18-194.el5debug-2.0.5-1.el5.i686.rpm

rpm -vhi oracleasm-2.6.18-194.el5-debuginfo-2.0.5-1.el5.i686.rpm

rpm -vhi oracleasm-2.6.18-194.el5PAE-2.0.5-1.el5.i686.rpm

rpm -vhi oracleasm-2.6.18-194.el5xen-2.0.5-1.el5.i686.rpm

在我們的實驗裏,我需要如下系統包:

kernel-debug-2.6.18-194.el5.i686.rpm

kernel-PAE-2.6.18-194.el5.i686.rpm

kernel-xen-2.6.18-194.el5.i686.rpm

1.2.  配置oracleasm(root身份)

 

[root@dbserver2 oracle]# /etc/init.d/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) [n]: y  

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [  OK  ]

Scanning the system for Oracle ASMLib disks:

[  OK  ]

[root@dbserver2 oracle]#

 

1.3.  準備磁盤設備

1.3.1. 給虛擬機增加硬盤

一路點 next 直到創建盤成功;

1.3.2. 進入操作系統  fdisk 格式化硬盤(root身份)

 

[root@dbserver2 oracle]# fdisk -l

 

Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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        2610    20860402+  8e  Linux LVM

 

Disk /dev/sdb: 8589 MB, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Disk /dev/sdb doesn't contain a valid partition table

[root@dbserver2 oracle]#

 

 

[root@dbserver2 oracle]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

 

 

The number of cylinders for this disk is set to 1044.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

Command (m for help): n 

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1044, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): +5000m

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (610-1044, default 610):

Using default value 610

Last cylinder or +size or +sizeM or +sizeK (610-1044, default 1044):

Using default value 1044

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

[root@dbserver2 oracle]#

 

[root@dbserver2 oracle]# fdisk -l

 

Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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        2610    20860402+  8e  Linux LVM

 

Disk /dev/sdb: 8589 MB, 8589934592 bytes

255 heads, 63 sectors/track, 1044 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1         609     4891761   83  Linux

/dev/sdb2            610        1044     3494137+  83  Linux

[root@dbserver2 oracle]#

 

 

 

 

1.4.  創建asm磁盤卷設備(root身份)

[root@localhost oracle]#

[root@localhost oracle]# /etc/init.d/oracleasm createdisk vol1 /dev/sdb1

Marking disk "vol1" as an ASM disk:                        [  OK  ]

[root@localhost oracle]# /etc/init.d/oracleasm createdisk vol2 /dev/sdb2

Marking disk "vol2" as an ASM disk:                        [  OK  ]

 [root@localhost oracle]#

[root@localhost oracle]# /etc/init.d/oracleasm listdisks

VOL1

VOL2

 

1.4.1. 異常錯誤處理

如果出出現錯誤:Marking disk "VOL1" as an ASM disk: [FAILED]

查看日誌

[root@Oracle11gOcp_catalog disks]# less /var/log/oracleasm

1.如果是如下錯誤信息:

       Disk "VOL1" does not exist or is not instantiated

       Writing disk header: done

       Instantiating disk: oracleasm-instantiate-disk: Unable to open manager: No such file or directory

       failed

       Clearing disk header: done

 

       此表示沒有啓用 oracleasm 需要執行:

       [root@Oracle11gOcp_catalog ~]# /etc/init.d/oracleasm enable

 

2.如果是如下錯誤信息:

  Device "/dev/sdc1" is already labeled for ASM disk "VOL1"

 

  解決的兩種方法:

         1). 刪除已存在的asm  

               /etc/init.d/oracleasm deletedisk VOL1

         2). 更名增加asm

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

1.5.  準備grid安裝軟件

 [oracle@dbserver2 ~]$ cd /oracle_soft/

[oracle@dbserver2 oracle_soft]$ ls

database  p10404530_112030_LINUX_3of7.zip

 

[oracle@dbserver2 oracle_soft]$ unzip p10404530_112030_LINUX_3of7.zip

 

[oracle@dbserver2 oracle_soft]$ ls

database  grid  p10404530_112030_LINUX_3of7.zip

[oracle@dbserver2 oracle_soft]$

[oracle@dbserver2 oracle_soft]$

[oracle@dbserver2 oracle_soft]$ rm -rf p10404530_112030_LINUX_3of7.zip

[oracle@dbserver2 oracle_soft]$

[oracle@dbserver2 oracle_soft]$ ls

database  grid

1.6.  創建數據庫 

 請見相關章節

 

有個奇怪現象,我沒有配置系統啓動asm實例與oracle實例,怎麼一啓操作系統就隨系統啓動了...

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章