Chinaunix首页 | 论坛 | 博客
  • 博客访问: 176585
  • 博文数量: 33
  • 博客积分: 1411
  • 博客等级: 上尉
  • 技术积分: 342
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-04 13:04
文章存档

2008年(33)

我的朋友

分类:

2008-09-09 14:28:44

5)        做对应VGexportimport

  

备注说明

在db01:和db02:上执行

 

 

重建时建相同的minmber

 

db01

vgexport  vg_ora1

vgexport  vg_ora2

vgexport  vg_ora3

vgexport  vg_ora4

vgexport  vg_ora5

vgexport  vg_ora6

vgexport  vg_arch1

vgexport  vg_lock

db02

vgexport  vg_arch2

vgexport  vg_ora1

vgexport  vg_ora2

vgexport  vg_ora3

vgexport  vg_ora4

vgexport  vg_ora5

vgexport  vg_ora6

vgexport  vg_lock

删除原有vg_ora1-ora6vg_archvg_lock信息

#ioscan -fnCdisk |grep  -i no_hw |awk '{print "rmsf -H", $3}' | sh

清理原有CX 700LUN NO_HW的设备文件

重建设备文件:

 db01

mkdir vg_ora1                                

mkdir vg_ora2                                

mkdir vg_ora3                                

mkdir vg_ora4                                

mkdir vg_ora5                                

mkdir vg_ora6                                                                

mkdir vg_arch1       

mkdir vg_lock                        

                                              

mknod /dev/vg_lock/group c 64 0x030000 vg_lock

mknod /dev/vg_ora1/group c 64 0x040000 vg_ora1

mknod /dev/vg_ora2/group c 64 0x050000 vg_ora2

mknod /dev/vg_ora3/group c 64 0x060000 vg_ora3

mknod /dev/vg_ora4/group c 64 0x070000 vg_ora4

mknod /dev/vg_ora5/group c 64 0x080000 vg_ora5

mknod /dev/vg_ora6/group c 64 0x090000 vg_ora6

mknod /dev/vg_arch1/group c 64 0x010000 vg_arch1

db02

mkdir vg_ora1                                

mkdir vg_ora2                                

mkdir vg_ora3                                

mkdir vg_ora4                                

mkdir vg_ora5                                

mkdir vg_ora6                                                                

mkdir vg_arch2      

mkdir vg_lock                         

                                             

mknod /dev/vg_lock/group c 64 0x030000 vg_lock

mknod /dev/vg_ora1/group c 64 0x040000 vg_ora1

mknod /dev/vg_ora2/group c 64 0x050000 vg_ora2

mknod /dev/vg_ora3/group c 64 0x060000 vg_ora3

mknod /dev/vg_ora4/group c 64 0x070000 vg_ora4

mknod /dev/vg_ora5/group c 64 0x080000 vg_ora5

mknod /dev/vg_ora6/group c 64 0x090000 vg_ora6

mknod /dev/vg_arch2/group c 64 0x020000 vg_arch2

 

 

重建设备文件

导入vg信息:

db01

vgimport -s -v -m /tmp/vgbak/vg_ora1.map /dev/vg_ora1

vgimport –s -v -m /tmp/vgbak/vg_ora2.map /dev/vg_ora2

vgimport –s -v -m /tmp/vgbak/vg_ora3.map /dev/vg_ora3

vgimport –s -v -m /tmp/vgbak/vg_ora4.map /dev/vg_ora4

vgimport –s -v -m/tmp/vgbak/vg_ora5.map /dev/vg_ora5

vgimport –s -v -m /tmp/vgbak/vg_ora6.map /dev/vg_ora6

vgimport –s -v -m /tmp/vgbak/vg_lock.map /dev/vg_lock

vgimport –s -v -m /tmp/vgbak/vg_arch1.map /dev/vg_arch1

db02

vgimport -s -v -m /tmp/vgbak/vg_ora1.map /dev/vg_ora1

vgimport –s -v -m /tmp/vgbak/vg_ora2.map /dev/vg_ora2

vgimport –s -v -m /tmp/vgbak/vg_ora3.map /dev/vg_ora3

vgimport –s -v -m /tmp/vgbak/vg_ora4.map /dev/vg_ora4

vgimport –s -v -m/tmp/vgbak/vg_ora5.map /dev/vg_ora5

vgimport –s -v -m /tmp/vgbak/vg_ora6.map /dev/vg_ora6

vgimport –s -v -m /tmp/vgbak/vg_lock.map /dev/vg_lock

vgimport –s -v -m /tmp/vgbak/vg_arch1.map /dev/vg_arch2

 

重做vgimport

6)        修改用户权限

  

备注说明

db01

chown -R oracle:dba /dev/vg_ora1/

chown -R oracle:dba /dev/vg_ora2/

chown -R oracle:dba /dev/vg_ora3/

chown -R oracle:dba /dev/vg_ora4/

chown -R oracle:dba /dev/vg_ora5/

chown -R oracle:dba /dev/vg_ora6/

chown -R oracle:dba /dev/vg_arch1/

chown -R oracle:dba /dev/vg_lock/

db02

chown -R oracle:dba /dev/vg_ora1/

chown -R oracle:dba /dev/vg_ora2/

chown -R oracle:dba /dev/vg_ora3/

chown -R oracle:dba /dev/vg_ora4/

chown -R oracle:dba /dev/vg_ora5/

chown -R oracle:dba /dev/vg_ora6/

chown -R oracle:dba /dev/vg_arch2/

chown -R oracle:dba /dev/vg_lock/

 

 

修改用户权限信息

7)        将数据库改为双机模式

  

备注说明

重新配置MC,启动双机

db01

vgchange -a n /dev/vg_ora1

vgchange -a n /dev/vg_ora2

vgchange -a n /dev/vg_ora3

vgchange –a n /dev/vg_ora4

vgchange –a n /dev/vg_ora5

vgchange -a n/dev/vg_ora6

vhchange –a y /dev/vg_arch1

mount /dev/vg_arch1/lv_arch1  /arch1

db02

vgchange -a n /dev/vg_ora1

vgchange -a n /dev/vg_ora2

vgchange -a n /dev/vg_ora3

vgchange –a n /dev/vg_ora4

vgchange –a n /dev/vg_ora5

vgchange -a n/dev/vg_ora6

vgchange -a y /dev/vg_arch2

mount /dev/vg_arch2/lv_arch2  /arch2

db01

更改vi /etc/cmcluster.asci

更改其中的锁盘路径,这个要根据具体情况才能确认具体的硬件路径.

cmcheckconf -v -C /etc/cmcluster/cluster.ascii

cmapplyconf -v -C /etc/cmcluster/cluster.ascii

cmruncl –f –v

cmviewcl –v

 

db01

vgchange -a s -p /dev/vg_ora1

 vgchange -a s -p /dev/vg_ora2

 vgchange -a s -p /dev/vg_ora3

 vgchange -a s -p /dev/vg_ora4

vgchange -a s -p /dev/vg_ora5

 vgchange -a s -p /dev/vg_ora6

db02

vgchange -a s -p /dev/vg_ora1

 vgchange -a s -p /dev/vg_ora2

 vgchange -a s -p /dev/vg_ora3

 vgchange -a s -p /dev/vg_ora4

vgchange -a s -p /dev/vg_ora5

 vgchange -a s -p /dev/vg_ora6

 

db01db02重新组成双机环境

8)        数据库启动和业务测试

  

备注说明

su - oracle

sqlplus " /as sysdba"

SQL>startup;

数据库正常启动后,进行相关业务测试

阅读(1536) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~