linux下Oracle11g RAC搭建(四)
三、配置共享存储
配置ASM管理准备
1)OCRDISK :存储CRS资源配置信息
2)VOTEDISK:仲裁盘,记录节点状态
3)DataDisk:存放datafile、controlfile、redologfile、spfile等
4)RecoveryArea:存放flashbackdatabase log、archivelog、rmanbackup等
安装asm软件包
分别在node1和node2安装
node1下:
[root@node1 ~]# cd /soft
[root@node1 soft]# ls
asm linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip linux_11gR2_grid.zip
[root@node1 asm]# cd asm
[root@node1 asm]# ls
oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm-support-2.1.3-1.el5.i386.rpm
注意和内核版本的匹配
说明:
1、查看到asm软件包版本2.6.18-194.el5,系统内核版本2.6.18-194.el5,两者匹配,可以继续安装;
2、i386代表32位。
[root@node1 asm]# uname-a 或uname -r
//检查系统内核版本是否和asm版本相同
Linux node1 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686i386 GNU/Linux

node1下安装软件包
[root@node1 asm]# rpm -ivh *
//安装3个软件包,i-install,v-安装过程,h-显示安装信息,*-全部软件包

[root@node1 asm]# rpm -qa |grep asm //查看安装完成的信息

node2下安装软件包
node2下:
[root@node1 /]# scp/soft/asm/* node2:/home/oracle/
//把asm下的软件包从node1拷贝到node2下面
或[root@node1 soft]# scp -r asm node2:/home/oracle/

[root@node2 ~]#cd/home/oracle
[root@node2 oracle]# ls
oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm-support-2.1.3-1.el5.i386.rpm
[root@node2 asm]# rpm -ivh *

1)在共享阵列上建立分区
在node1分区,完成后在node2查看
OCR+VOTE盘:3个1G
DATABASE 盘:2个5G
RECOVERY盘:2个4G
3个1G的为OCR_VOTE1盘 其中两个为镜像
2个5G的为ASM_DATA1盘 其中一个为镜像
2个4G的为ASM_RCY1盘 其中一个为镜像
[root@node1 ~]# fdisk -l
//查看磁盘信息
Disk /dev/sda: 21.4 GB, 21474836480bytes
255 heads, 63 sectors/track, 2610cylinders
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/sdc: 22.7 GB, 22769827840bytes
255 heads, 63 sectors/track, 2768cylinders
Units = cylinders of 16065 * 512 =8225280 bytes
Disk /dev/sdc doesn't contain avalid partition table
#fdisk/dev/sdc //对sdc分区
OCR+VOTE
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p //先创建第一个主分区
Partition number (1-4): 1
First cylinder (1-2610, default 1): 1
Last cylinder or +size or +sizeM or+sizeK (1-2610, default 2610): +1024M
//表示主分区的大小为1024M,OCR盘分1G
OCR+VOTE
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p //创建第二个主分区
Partition number (1-4): 2
First cylinder (126-2610, default1):
Last cylinder or +size or +sizeM or+sizeK (126-2610, default 2610): +1024M
OCR+VOTE
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p //创建第三个主分区
Partition number (1-4): 3
First cylinder (251-2610, default 251):
Last cylinder or +size or +sizeM or+sizeK (251-2610, default 2610): +1024M
创建扩展分区
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e //在创建一个扩展分区,大小为剩下的全部容量
Partition number (1-4): 4
First cylinder (376-2610, default 376):
Using default value 126
Last cylinder or +size or +sizeM or+sizeK (376-2610, default 2610):
Using default value 2610
databasearea
Command (m for help): n
Command action
l logical (5 or over) //再创建逻辑分区
p primary partition (1-4)
l
First cylinder (376-3916, default 376):
Using default value 376
Last cylinder or +size or +sizeM or+sizeK (376-3916, default 3916): +5G
databasearea
Command (m for help): n
Command action
l logical (5 or over) //再创建逻辑分区
p