全部博文(33)
2008年(33)
分类:
2008-09-09 14:28:44
5) 做对应VG的export和import
命 令 |
备注说明 |
在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-ora6和vg_arch和vg_lock信息 |
#ioscan -fnCdisk |grep -i no_hw |awk '{print "rmsf -H", $3}' | sh |
清理原有CX 700的LUN 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 |
重做vg的import |
6) 修改用户权限
命 令 |
备注说明 |
在db01: chown -R chown -R chown -R chown -R chown -R chown -R chown -R chown -R 在db02: chown -R chown -R chown -R chown -R chown -R chown -R chown -R chown -R |
修改用户权限信息 |
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 |
将db01和db02重新组成双机环境 |
8) 数据库启动和业务测试
命 令 |
备注说明 |
su - sqlplus " /as sysdba" SQL>startup; |
数据库正常启动后,进行相关业务测试 |