linux下一个Oracle11g RAC建立(四)
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建立(四)的更多相关文章
- linux下一个Oracle11g RAC建立(五岁以下儿童)
linux下一个Oracle11g RAC建立(五岁以下儿童) 四.建立主机之间的信任关系(node1.node2) 建立节点之间oracle .grid 用户之间的信任(通过ssh 建立公钥和私钥) ...
- linux下一个Oracle11g RAC建立(八)
linux下一个Oracle11g RAC建立(八) 七.安装oracle软件 直接在图形界面里安装oracle.在node1操作 在虚拟机界面中,直接切换到oracle用户下: [grid@no ...
- linux下一个oracle11G DG建立(一个):准备环境
linux下一个oracle11G DG建立(一个):准备环境 周围环境 名称 主库 备库 主机名 bjsrv shsrv 软件版本号 RedHat Enterprise5.5.Oracle 11g ...
- Linux下搭建Oracle11g RAC(2)----配置DNS服务器,确认SCAN IP可以被解析
从Oracle 11gR2开始,引入SCAN(Single Client Access Name) IP的概念,相当于在客户端和数据库之间增加一层虚拟的网络服务层,即是SCAN IP和SCAP IP ...
- Linux下搭建Oracle11g RAC(5)----配置ASM磁盘
将共享磁盘格式化.然后用asmlib将其配置为ASM磁盘,用于将来存放OCR.Voting Disk和数据库用. 注意:只需在其中1个节点上格式化就可以,接下来我们选择在node1节点上格式化. 这里 ...
- Linux下搭建Oracle11g RAC(3)----创建用户及配置相关文件
配置11gR2 RAC需要安装Oracle Grid Infrastructure软件.Oracle数据库软件,其中Grid软件等同于Oracle 10g的Clusterware集群件.Oracle建 ...
- Linux下搭建Oracle11g RAC(9)----创建RAC数据库
接下来,使用DBCA来创建RAC数据库. ① 以oracle用户登录图形界面,执行dbca,进入DBCA的图形界面,选择第1项,创建RAC数据库: ② 选择创建数据库选项,Next: ③ 选择创建通用 ...
- Linux下搭建Oracle11g RAC(8)----创建ASM磁盘组
以grid用户创建ASM磁盘组,创建的ASM磁盘组为下一步创建数据库提供存储. ① grid用户登录图形界面,执行asmca命令来创建磁盘组: ② 进入ASMCA配置界面后,单击Create,创建新的 ...
- Linux下搭建Oracle11g RAC(7)----安装Oracle 软件
从此步骤开始,我们正式安装oracle软件: ① 以oracle用户登录图形界面,执行/home/oracle/database/runInstaller,进入OUI的图形安装界面: ② 进入OUI安 ...
随机推荐
- 由于空间,注定的结果——第五届山东省ACM编程比赛总结
应该是,这是一个很失败的结果.目前省赛玩具.作为志愿者说,,铁匠是一个很丢人的事. 作为队长.全然没有想到会是这种一次旅程.尽管由于去baidu的实习和各种offer的申请,对acm抱着能水就水绝不深 ...
- 关于mysql主从复制的概述与分类(转)
一.概述: 按照MySQL的同步复制特点,大体上可以分为三种类别: 1.异步复制: 2.半同步复制: 3.完全同步的复制: -------------------------------------- ...
- 辛格尔顿和Android
辛格尔顿(Singleton) .singleton.h,定义类的基本成员及接口 #ifndef SINGLETON_H_INCLUDE #define SINGLETON_H_INCLUDE cla ...
- [Python网络编程]gevent httpclient以及网页编码
之前看到geventhttpclient这个项目,https://github.com/gwik/geventhttpclient,官方文档说非常快,因为响应使用了C的解析,所以我一直想把这玩意用到项 ...
- 在小发现SQL字符串比较是不是他们的大写和小写敏感
声明:select petName from dbo.T_pet order by petName desc 成绩: petName An admin A的ascii码小于a,按理说应该 ...
- Java Web整合开发(79) -- Struts 2
一. Struts 2.x 概述 不继承任何类的Action Struts 2的Action并不一定要实现Action接口或者继承ActionSupport,任何POJO都可以做Action,只要这个 ...
- Codeforces Round #257 (Div. 2) D题:Jzzhu and Cities 删特殊边的最短路
D. Jzzhu and Cities time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- android判断是否含有某权限
boolean has_permission = (PackageManager.PERMISSION_GRANTED == pkm.checkPermission("android.per ...
- [ACM] poj 3468 A Simple Problem with Integers(段树,为段更新,懒惰的标志)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 55273 ...
- [LeetCode328]Odd Even Linked List
题目: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note ...