ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux 5.3 64bit Oracle 11G RAC install

Linux 5.3 64bit Oracle 11G RAC install

原创 Linux操作系统 作者:golden_zhou 时间:2011-03-11 08:28:54 0 删除 编辑

Linux 5.3 64bit Oracle 11G RAC install

Version Author Date Remark
V1.0 周德金 2011-01-04 第一版

目錄
一. OS Packages 確認安裝 3
1.1平台介紹 3
1.2 packages 確認 3
1.3 packages 安裝 4
二. 系統基本設置 6
2.1. 基本設置 6
2.2. 時間同步 6
2.3. 防火牆設置 7
三. 用戶及組建立 8
3.1 建立用戶組 8
3.2 建立用戶 8
四. 內核參數及環境變更設置 9
4.1 cat /etc/sysctl.conf 9
4.2 cat /etc/security/limit.conf 9
4.3 cat /etc/pam.d/login 9
4.4 cat /etc/profile 10
4.5 cat /home/grid/.bash_profile 10
4.6 cat /home/oracle/.bash_profile 11
五. 創建目錄 13
5.1 創建目錄 13
5.2 修改目錄屬性 13
六. 創建磁盤分區 14
6.1 磁盤分區設計 14
6.2 創建磁盤分區 14
七. 安裝oracleasm 程序包 19
7.1 安裝前準備 19
7.2 安裝ASM RPM 19
八. 配置oracleasm 20
8.1 配置 ASMLib。 20
8.2 创建 ASM 磁盘。 21
九. 建立用户等效性 23
9.1 grid 用戶等效性 23
9.2 oracle 用戶等效性 25
十. 安裝 oracle grid控件 28
10.1 安裝cvuqdisk包 28
10.2 驗証grid安裝環境 28
10.3 安裝oracle grid控件 29
十一. 創建 ASM 磁盤組 50
十二. 安裝oracle 11g 軟件 72
十三. 創建數據庫 103

 

一. OS Packages 確認安裝
1.1平台介紹
請確認所有節點的版本信息,保証節點間的版本信息相同.
OS Version:
[root@wmrac01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
[root@wmrac01 ~]# uname -a
Linux wmrac01 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
Oracle Version: Oracle11gR2ForLinux64
Node count:2
Storage type:ASM
1.2 packages 確認
請確認以下packages是否安裝 (在每個node執行)
binutils-2.17.50.0.6-9.el5.x86_64.rpm
binutils-devel-2.17.50.0.6-9.el5.x86_64.rpm
compat-libstdc++-296-2.96-138.x86_64.rpm
compat-libstdc++-33-3.2.3-61.x86_64.rpm
elfutils-0.137-3.el5.x86_64.rpm
elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm
elfutils-libelf-devel-0.137-3.el5.x86_64.rpm
gcc-4.1.2-44.el5.x86_64.rpm
gcc-c++-4.1.2-44.el5.x86_64.rpm
glibc-common-2.5-34.x86_64.rpm
glibc-devel-2.5-34.x86_64.rpm
glibc-headers-2.5-34.x86_64.rpm
ksh-20080202-2.el5.x86_64.rpm
libaio-0.3.106-3.2.x86_64.rpm
libgcc-4.1.2-44.el5.x86_64.rpm
libgomp-4.3.2-7.el5.x86_64.rpm
libstdc++-devel-4.1.2-44.el5.x86_64.rpm
libstdc++43-devel-4.3.2-7.el5.x86_64.rpm
make-3.81-3.el5.x86_64.rpm
libaio-devel-0.3.106-3.2.x86_64.rpm
libaio-devel-0.3.106-3.2.i386.rpm
compat-db-4.2.52-5.1.x86_64.rpm
sysstat-7.0.2-3.el5.x86_64.rpm
unixODBC-2.2.11-7.1.x86_64.rpm
unixODBC-devel-2.2.11-7.1.x86_64.rpm
unixODBC-2.2.11-7.1.i386.rpm
unixODBC-devel-2.2.11-7.1.i386.rpm

1.3 packages 安裝
一般情況下,上面黑色字體的包已經安裝,隻需安裝經色字體部分的包,安裝如下所示:
[root@wmrac01 Redhat5.3]# rpm -Uvh libaio-devel-0.3.106-3.2.x86_64.rpm
warning: libaio-devel-0.3.106-3.2.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libaio-devel           ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh libaio-devel-0.3.106-3.2.i386.rpm
warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libaio-devel           ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh compat-db-4.2.52-5.1.x86_64.rpm
warning: compat-db-4.2.52-5.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:compat-db              ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh compat-db-4.2.52-5.1.i386.rpm
warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:compat-db              ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh sysstat-7.0.2-3.el5.x86_64.rpm
warning: sysstat-7.0.2-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:sysstat                ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh unixODBC-2.2.11-7.1.x86_64.rpm
warning: unixODBC-2.2.11-7.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:unixODBC               ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh unixODBC-2.2.11-7.1.i386.rpm
warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:unixODBC               ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh unixODBC-devel-2.2.11-7.1.x86_64.rpm
warning: unixODBC-devel-2.2.11-7.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:unixODBC-devel         ########################################### [100%]
[root@wmrac01 Redhat5.3]# rpm -Uvh unixODBC-devel-2.2.11-7.1.i386.rpm
warning: unixODBC-devel-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:unixODBC-devel         ########################################### [100%]


二. 系統基本設置
2.1. 基本設置
A.定義cluster name,這是11g特有的
B.定義每個節點的public hostname也就是本機的 host name,比如wmrac01,wmrac02,這裡推薦建立bonding(具體設置略,active/passive).
C.定義public virtual hostname,一般建議為.vip 或直接接vip.
修改所有節點的/etc/hosts(每個節點執行)
127.0.0.1       localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

110.118.253.41    wmrac01
172.168.1.11     wmpri01
110.118.253.51    wmvip01

110.118.253.42    wmrac02
172.168.1.12     wmpri02
110.118.253.52    wmvip02

#single client access name(scan)
110.118.253.59    wmscan

2.2. 時間同步
通過ntpdate或rdate 設置各個節點時間同步
(所有節點設置,這裡通過ntpdate以腳本的方式來執行,時間服務器:10.191.130.130)
A. 創建時間同步腳本ntp
[root@wmrac01 run]# cat ntp
#! /bin/sh
/usr/sbin/ntpdate  110.191.130.130
/sbin/hwclock -w
B. 設置時間同步排程.
[root@wmrac01 run]# crontab -l
* * * * * sh /u01/run/loadavg 1>/u01/run/log/loadavg.txt 2>>/u01/run/log/loadavg.bad
*/20 * * * * sh /u01/run/ntp  1>/u01/run/log/ntp.log 2>>/u01/run/log/ntp.bad
C. 節點2參照節點1設置時間同步
2.3. 防火牆設置
設置SELinux 為disable(所有節點設置)
# vi /etc/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-128.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-128.el5 ro root=LABEL=/1 rhgb quiet
        initrd /initrd-2.6.18-128.el5.img
        selinux=0

 

三. 用戶及組建立
3.1 建立用戶組
兩個node執行
[root@wmrac01 Redhat5.3]# groupadd oinstall
[root@wmrac01 Redhat5.3]# groupadd asmadmin
[root@wmrac01 Redhat5.3]# groupadd asmdba
[root@wmrac01 Redhat5.3]# groupadd asmoper
[root@wmrac01 Redhat5.3]# groupadd dba
[root@wmrac01 Redhat5.3]# groupadd oper
3.2 建立用戶
兩個node執行
[root@wmrac01 Redhat5.3]# useradd -g oinstall -G smadmin,asmdba,asmoper -m -d /home/grid grid
[root@wmrac01 Redhat5.3]# id grid
uid=500(grid) gid=500(oinstall) groups=500(oinstall),501(asmadmin),502(asmdba),503(asmoper) context=root:system_r:unconfined_t:SystemLow-SystemHigh
[root@wmrac01 Redhat5.3]# passwd grid
[root@wmrac01 Redhat5.3]# useradd -g oinstall -G dba,oper,asmdba -m -d /home/oracle oracle
[root@wmrac01 Redhat5.3]# id oracle
uid=501(oracle) gid=500(oinstall) groups=500(oinstall),502(asmdba),504(dba),505(oper)
[root@wmrac01 Redhat5.3]# passwd oracle


四. 內核參數及環境變更設置
4.1 cat /etc/sysctl.conf
加入以下內容,兩個node執行
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 34359738368
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

4.2 cat /etc/security/limit.conf
加入以下內容,兩個node執行
grid soft nproc 2047
grid hard nproc 32768
grid soft nofile 1024
grid hard nofile 250000

oracle soft nproc 2047
oracle hard nproc 32768
oracle soft nofile 1024
oracle hard nofile 250000
4.3 cat /etc/pam.d/login
加入以下內容,兩個node執行
session    required     pam_limits.so
4.4 cat /etc/profile
加入以下內容,兩個node執行
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
   if [ \$SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
   else
        ulimit -u 16384 -n 65536
   fi
   umask 022
fi

4.5 cat /home/grid/.bash_profile
切換到grid用戶,並修改/home/grid/.bash_profile(兩個node執行)
[grid@wmrac01 ~]$ cat /home/grid/.bash_profile
 # .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
BASH_ENV=$HOME/.BASHRC
export BASH_ENV PATH
unset USERNAME
export TEMP=/tmp
export TMPDIR=/tmp
JAVA_HOME=/usr/local/java;export JAVA_HOME
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/product/common/oracle/bin
export PATH
export ORACLE_SID=+ASM[1|2] (注:node1->+ASM1,node2->+ASM2)
ORACLE_BASE=/u01/product/grid/crs; export ORACLE_BASE
ORACLE_HOME=/u01/product/grid/11.2.0; export ORACLE_HOME
ORACLE_TERM=vt100;export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
set -u
#PS1=`hostname`'<$PWD>$';export PS1
PS1=`hostname`'<*$ORACLE_SID*$PWD>$';export PS1
EDITOR=/bin/vi; export EDITOR
alias ll='ls -l';
alias ls='ls --color';
alias his='history';

4.6 cat /home/oracle/.bash_profile
切換到oracle用戶,並修改/home/oracle/.bash_profile(兩個node執行)
[oracle@wmrac01 ~]$ cat /home/oracle/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
BASH_ENV=$HOME/.BASHRC
export BASH_ENV
export TEMP=/tmp
export TMPDIR=/tmp
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/product/common/oracle/bin
export PATH
export ORACLE_SID=Poland[1|2] (注:node1->poland1,node2->poland2)
ORACLE_BASE=/u01/product/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1; export ORACLE_HOME
ORACLE_TERM=vt100;export ORACLE_TERM
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
#GRID_BASE=/u01/product/grid/crs; export ORACLE_BASE
#GRID_HOME=/u01/product/grid/11.2.0; export ORACLE_HOME
#export PATH=$GRID_HOME/bin:$PATH
JAVA_HOME=/usr/local/java;export JAVA_HOME
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
set -u
#PS1=`hostname`'<$PWD>$';export PS1
PS1=`hostname`'<*$ORACLE_SID*$PWD>$';export PS1
EDITOR=/bin/vi; export EDITOR
alias ll='ls -l';
alias ls='ls --color';
alias his='history';


五. 創建目錄
5.1 創建目錄
[root@poland-rac01 ~]# mkdir -p /u01/product/grid/11.2.0(grid 軟件目錄)
[root@poland-rac01 ~]# mkdir -p /u01/product/grid/crs(grid Trace目錄)
[root@poland-rac01 ~]# mkdir -p /u01/product/oracle/11.2.0/db_1

注意:
11g 單實例如果需要使用ASM,grid也必須安裝,且ORACLE_HOME在ORACLE_BASE目錄之下,
11g RAC 則不同,ORACLE_HOME與ORACLE_BASE在目錄上不能存在父子關系.
5.2 修改目錄屬性
[root@poland-rac01 ~]# chown -R grid.oinstall /u01
[root@poland-rac01 ~]# chown -R oracle.oinstall /u01/product/oracle/
[root@poland-rac01 ~]# chmod -R 775 /u01/


六. 創建磁盤分區
6.1 磁盤分區設計
為Oracle ASM 准備一組原始磁盤﹐如下﹕
physical logical
diskgroup_number RAID_type LVM_number disk_lable disk_group size redundancy function
1 RAID10 4 DATAV1 DATA About 1400G external data
   DATAV2    
   INDXV1 INDX About 1400G external index
   INDXV2    
6.2 創建磁盤分區
在wmrac01上﹐以root用戶身份執行
[root@wmrac01 ~]# cd /dev/mapper/
[root@wmrac01 mapper]# ll
total 0
crw------- 1 root root  10, 63 Feb 23 14:43 control
brw-rw---- 1 root disk 253,  0 Feb 23 14:44 data_v01
brw-rw---- 1 root disk 253,  1 Feb 23 14:44 data_v02
brw-rw---- 1 root disk 253,  2 Feb 23 14:44 indx_v01
brw-rw---- 1 root disk 253,  3 Feb 23 14:44 indx_v02

[root@wmrac01 mapper]# fdisk data_v01
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 91379.
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-91379, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-91379, default 91379):
Using default value 91379

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

[root@wmrac01 mapper]# fdisk data_v02
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 91379.
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-91379, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-91379, default 91379):
Using default value 91379

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

[root@wmrac01 mapper]# fdisk indx_v01
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 91379.
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-91379, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-91379, default 91379):
Using default value 91379

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

[root@wmrac01 mapper]# fdisk indx_v02
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 91379.
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-91379, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-91379, default 91379):
Using default value 91379
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

 

七. 安裝oracleasm 程序包
7.1 安裝前準備
安裝oracleasm程序包之前,需要先安裝以下包(以root在兩個node執行)
kernel-2.6.18-128.el5.x86_64.rpm             
kernel-doc-2.6.18-128.el5.noarch.rpm
kernel-debug-2.6.18-128.el5.x86_64.rpm       
kernel-headers-2.6.18-128.el5.x86_64.rpm
kernel-debug-devel-2.6.18-128.el5.x86_64.rpm 
kernel-xen-2.6.18-128.el5.x86_64.rpm
kernel-devel-2.6.18-128.el5.x86_64.rpm
kernel-xen-devel-2.6.18-128.el5.x86_64.rpm
注:這些包在OS安裝光盤中可以找到,安裝時請參照第一小節執行.
7.2 安裝ASM RPM
從OTN下載ASM庫,並安裝 ASM RPM. (以root在兩個node執行)
# rpm -Uvh oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm
Preparing...              
########################################### [100%]
   1:oracleasmlib
########################################### [100%]
在這個階段,您應該已經安裝了以下ASM程序包.
[root@wmrac01 oracleasm]# rpm -qa|grep oracleasm
oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm(用於默認內核)
oracleasm-2.6.18-128.el5debug-2.0.5-1.el5.i686.rpm 
oracleasm-2.6.18-128.el5-debuginfo-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-128.el5PAE-2.0.5-1.el5.i686.rpm(用於PAE內核)
oracleasm-2.6.18-128.el5xen-2.0.5-1.el5.i686.rpm(用於xen內核)
oracleasmlib-2.0.4-1.el5.i386.rpm(用戶空間庫)
oracleasm-support-2.1.3-1.el5.i386.rpm(驅動程序支持文件)

 

八. 配置oracleasm

Oracle ASM 與 Oracle 數據庫緊密集成在一起,並與Oracle 的數據管理工具套件配合工作.它可以簡化數據庫存儲管理 ,並提供原始磁盤I/O的性能.

8.1 配置 ASMLib。
以root在兩個node執行
[root@wmrac01 grid]# /usr/sbin/oracleasm configure -i
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 without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
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

[root@wmrac01 grid]# /usr/sbin/oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=grid
ORACLEASM_GID=asmadmin
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""

[root@wmrac01 grid]# /usr/sbin/oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm

[root@wmrac01 grid]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
8.2 创建 ASM 磁盘。
以 root 用户身份在任何一个节点上创建 ASM 磁盘。
[root@wmrac01 mapper]# oracleasm createdisk DATAV1 /dev/mapper/data_v01
Writing disk header: done
Instantiating disk: done
[root@wmrac01 mapper]# oracleasm createdisk DATAV2 /dev/mapper/data_v02
Writing disk header: done
Instantiating disk: done
[root@wmrac01 mapper]# oracleasm createdisk INDXV1 /dev/mapper/indx_v01
Writing disk header: done
Instantiating disk: done
[root@wmrac01 mapper]# oracleasm createdisk INDXV2 /dev/mapper/indx_v02
Writing disk header: done
Instantiating disk: done
[root@wmrac01 mapper]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@wmrac01 mapper]# oracleasm listdisks
DATAV1
DATAV2
INDXV1
INDXV2
在node2上執行查詢,若出現如下內容則OK.
[root@wmrac02 mapper]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "INDXV1"
Instantiating disk "INDXV2"
Instantiating disk "DATAV1"
Instantiating disk "DATAV2"
[root@wmrac02 mapper]# oracleasm listdisks
DATAV1
DATAV2
INDXV1
INDXV2

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25198367/viewspace-689052/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-03-09

  • 博文量
    238
  • 访问量
    301936