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

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

node1下安装软件包

[root@node1 asm]# rpm -ivh *

//安装3个软件包,i-install,v-安装过程,h-显示安装信息。*-所有软件包

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

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

node2下安装软件包

node2下:

[root@node1 /]# scp/soft/asm/* node2:/home/oracle/

//把asm下的软件包从node1复制到node2以下

[root@node1 soft]# scp -r asm  node2:/home/oracle/

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmd5YW5sb25n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

[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查看

 

个1G

个5G

个4G

 

个1G的为OCR_VOTE1盘     
当中两个为镜像

个5G的为ASM_DATA1盘    
当中一个为镜像

个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):

First cylinder (1-2610, default 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):

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):

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):

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   primary partition (1-4)

l

First cylinder (985-3916, default 985):

Using default value 985

Last cylinder or +size or +sizeM or+sizeK (985-3916, default 3916):
+5G

recoveryarea

Command (m for help): n

Command action

l   logical (5 or over)                                                        //再创建逻辑分区

p   primary partition (1-4)

l

First cylinder (1594-3916, default 1594):

Using default value 1594

Last cylinder or +size or +sizeM or+sizeK (1594-3916, default 3916):
+4G

recoveryarea

Command (m for help): n

Command action

l   logical (5 or over)                                                        //再创建逻辑分区

p   primary partition (1-4)

l

First cylinder (2081-3916, default 2081):

Using default value 2081

Last cylinder or +size or +sizeM or+sizeK (2081-3916, default 3916):
+4G

剩余一些空间,单独分了一个区

Command (m for help): n

Command action

l   logical (5 or over)                                                        //再创建逻辑分区

p   primary partition (1-4)

l

First cylinder (2568-3916, default 2568):

Using default value 2568

Last cylinder or +size or +sizeM or+sizeK (2568-3916, default 3916):

Command (m for help): p                    
  //查看分区结果

Command (m for help): w                      
//保存退出

[root@node1 ~]# fdisk -l                             
//分区结果

2)创建asm盘

配置asm 磁盘(node1、node2)

node1上

[root@node1 soft]# serviceoracleasm configure

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of theOracle ASM library

driver.  Thefollowing 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 []:
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]:

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [  OK  ]

Scanning the system for Oracle ASMLib disks: [  OK  ]

node2上

[root@node2 asm]# serviceoracleasm configure

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of theOracle ASM library

driver.  Thefollowing 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 []:
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]:

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [  OK  ]

Scanning the system for Oracle ASMLib disks: [  OK  ]

建立asm 磁盘(node1)

在node1上

[root@node1 soft]# serviceoracleasm

Usage: /etc/init.d/oracleasm{start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}

[root@node1 soft]# serviceoracleasm createdisk OCR_VOTE1 /dev/sdc1 

//磁盘名用大写

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

[root@node1 soft]# serviceoracleasm createdisk OCR_VOTE2 /dev/sdc2

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

[root@node1 soft]# serviceoracleasm createdisk OCR_VOTE3 /dev/sdc3

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

[root@node1 soft]# serviceoracleasm createdisk ASM_DATA1  /dev/sdc5

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

[root@node1 soft]# serviceoracleasm createdisk ASM_DATA2  /dev/sdc6

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

[root@node1 soft]# serviceoracleasm createdisk ASM_RCY1   /dev/sdc7

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

[root@node1 soft]# serviceoracleasm createdisk ASM_RCY2   /dev/sdc8

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

[root@node1 soft]# serviceoracleasm listdisks      
//查看asm创建结果

ASM_DATA1

ASM_DATA2

ASM_RCY1

ASM_RCY2

OCR_VOTE1

OCR_VOTE2

OCR_VOTE3

验证ASM磁盘信息(node2)

在node2节点扫描出磁盘。查看共享磁盘信息

[root@node2 asm]# serviceoracleasm scandisks     
//扫描共享磁盘asm

Scanning the system for Oracle ASMLib disks: [  OK  ]

[root@node2 asm]# serviceoracleasm listdisks       
//查看共享盘信息

ASM_DATA1

ASM_DATA2

ASM_RCY1

ASM_RCY2

OCR_VOTE1

OCR_VOTE2

OCR_VOTE3

版权声明:本文博主原创文章,博客,未经同意不得转载。

linux下一个Oracle11g RAC建立(四)的更多相关文章

  1. linux下一个Oracle11g RAC建立(五岁以下儿童)

    linux下一个Oracle11g RAC建立(五岁以下儿童) 四.建立主机之间的信任关系(node1.node2) 建立节点之间oracle .grid 用户之间的信任(通过ssh 建立公钥和私钥) ...

  2. linux下一个Oracle11g RAC建立(八)

    linux下一个Oracle11g RAC建立(八) 七.安装oracle软件   直接在图形界面里安装oracle.在node1操作 在虚拟机界面中,直接切换到oracle用户下: [grid@no ...

  3. linux下一个oracle11G DG建立(一个):准备环境

    linux下一个oracle11G  DG建立(一个):准备环境 周围环境 名称 主库 备库 主机名 bjsrv shsrv 软件版本号 RedHat Enterprise5.5.Oracle 11g ...

  4. Linux下搭建Oracle11g RAC(2)----配置DNS服务器,确认SCAN IP可以被解析

    从Oracle 11gR2开始,引入SCAN(Single Client Access Name) IP的概念,相当于在客户端和数据库之间增加一层虚拟的网络服务层,即是SCAN IP和SCAP IP  ...

  5. Linux下搭建Oracle11g RAC(5)----配置ASM磁盘

    将共享磁盘格式化.然后用asmlib将其配置为ASM磁盘,用于将来存放OCR.Voting Disk和数据库用. 注意:只需在其中1个节点上格式化就可以,接下来我们选择在node1节点上格式化. 这里 ...

  6. Linux下搭建Oracle11g RAC(3)----创建用户及配置相关文件

    配置11gR2 RAC需要安装Oracle Grid Infrastructure软件.Oracle数据库软件,其中Grid软件等同于Oracle 10g的Clusterware集群件.Oracle建 ...

  7. Linux下搭建Oracle11g RAC(9)----创建RAC数据库

    接下来,使用DBCA来创建RAC数据库. ① 以oracle用户登录图形界面,执行dbca,进入DBCA的图形界面,选择第1项,创建RAC数据库: ② 选择创建数据库选项,Next: ③ 选择创建通用 ...

  8. Linux下搭建Oracle11g RAC(8)----创建ASM磁盘组

    以grid用户创建ASM磁盘组,创建的ASM磁盘组为下一步创建数据库提供存储. ① grid用户登录图形界面,执行asmca命令来创建磁盘组: ② 进入ASMCA配置界面后,单击Create,创建新的 ...

  9. Linux下搭建Oracle11g RAC(7)----安装Oracle 软件

    从此步骤开始,我们正式安装oracle软件: ① 以oracle用户登录图形界面,执行/home/oracle/database/runInstaller,进入OUI的图形安装界面: ② 进入OUI安 ...

随机推荐

  1. 开源 自由 java CMS - FreeCMS1.8 网上申报

    项目地址:http://code.google.com/p/freecms/ 在线申报 1. 转交申报 用户能够把申报转交给其它人办理,系统会记录此申报的转交记录. 注意:同一时候仅仅能转交一个申报. ...

  2. WindowsPhone 在 根据公历 获取月球日期数据

    WindowsPhone 在 根据公历 获取月球日期数据 WindowsPhone 在 它们的定义 类,根据公历 获取月球日期数据 using System; using System.Collect ...

  3. 求pi 的公式

    pi = 3.1415926..... 下面用c 语言来求解PI 现有公式 (pi*pi)/6 = 1 + 1/(2*2) + 1/(3*3) + ... + 1/(n*n); #include &l ...

  4. LeetCode204:Count Primes

    Description: Count the number of prime numbers less than a non-negative number, n. 比计算少n中素数的个数. 素数又称 ...

  5. aspx向silverlight传值

    原文:http://www.cnblogs.com/lensso/archive/2010/07/27/1785844.html 方法1: 向嵌入aspx页面的silverlight对象添加imnit ...

  6. Echache整合Spring缓存实例讲解(转)

    林炳文Evankaka原创作品.转载请注明出处http://blog.csdn.net/evankaka 摘要:本文主要介绍了EhCache,并通过整合Spring给出了一个使用实例. 一.EhCac ...

  7. DiskFileUpload类

    1.2.2 DiskFileUpload类 DiskFileUpload类是Apache文件上传组件的核心类,应用程序开发者通过这个类来与Apache文件上传组件进行交互.以下介绍DiskFileUp ...

  8. java 注解 学习

    周末闲来无事,想要研究一下注解方面的知识,曾经看过几次,都忘记了,这次学习下,而且写篇文章记录下, 1.元注解  元注解是指注解的注解.包含 @Retention @Target @Document ...

  9. rac 中节点的vip在该节点启动不了,在其它节点正常启动。

    本实验是在虚拟机中! 与实验同样的问题:http://blog.csdn.net/wanghui5767260/article/details/38850335 问题描写叙述: 节点1.节点2和节点3 ...

  10. HDU-2857-Mirror and Light(计算几何)

    Problem Description The light travels in a straight line and always goes in the minimal path between ...