ORACLE 10.2.0.5 RAC OCR&vote disk 磁盘迁移 DG Rebalance测试


1 OCR 迁移

  查看 ocr vote disk信息

 

[root@10grac1 ~]# ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     204560

         Used space (kbytes)      :       3860

         Available space (kbytes) :     200700

         ID                       : 2010075016

         Device/File Name         : /dev/raw/raw1

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/raw/raw2

                                    Device/File integrity check succeeded

 

         Cluster registry integrity check succeeded

[root@10grac1 ~]# crsctl query css votedisk

 0.     0    /dev/raw/raw5

 1.     0    /dev/raw/raw6

 2.     0    /dev/raw/raw7

 

开始Ocr信息迁移

我们系统现有其他的磁盘叫raw3 ,raw4 计划把ocr信息在线迁移到 这两块盘。

 

#ocrconfig -replace ocr /dev/raw/raw3

[root@10grac1 ~]# ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     204560

         Used space (kbytes)      :       3860

         Available space (kbytes) :     200700

         ID                       : 2010075016

         Device/File Name         : /dev/raw/raw3

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/raw/raw2

                                    Device/File integrity check succeeded

#ocrconfig -replace ocrmirror /dev/raw/raw4

-bash: ocrccheck: command not found

[root@10grac1 ~]# ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     204560

         Used space (kbytes)      :       3860

         Available space (kbytes) :     200700

         ID                       : 2010075016

         Device/File Name         : /dev/raw/raw3

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/raw/raw4

                                    Device/File integrity check succeeded

 

         Cluster registry integrity check succeeded

 

[root@10grac1 ~]# ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     204560

         Used space (kbytes)      :       3868

         Available space (kbytes) :     200692

         ID                       : 2010075016

         Device/File Name         : /dev/raw/raw3

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/raw/raw4

                                    Device/File integrity check succeeded

 

         Cluster registry integrity check succeeded

 

Vote迁移

  查看当前vote 磁盘信息,我们打算把vote 迁移到raw8,raw9 ,raw10上,然后删除老的raw5,raw6,raw7

         [root@10grac1 ~]# crsctl query css votedisk

          0.     0    /dev/raw/raw5

          1.     0    /dev/raw/raw6

          2.     0    /dev/raw/raw7

        

         located 3 votedisk(s).

        

         增加新的vote 磁盘 我们这里增加三块 raw8 raw9 raw10

         [root@10grac1 ~]# crsctl add    css votedisk /dev/raw/raw8 -force

        

         Now formatting voting disk: /dev/raw/raw8

         successful addition of votedisk /dev/raw/raw8.

         located 4 votedisk(s).

         [root@10grac1 ~]# crsctl add    css votedisk /dev/raw/raw9 -force

        

         Now formatting voting disk: /dev/raw/raw9

         successful addition of votedisk /dev/raw/raw9.

         [root@10grac1 ~]#

         [root@10grac1 ~]# crsctl add    css votedisk /dev/raw/raw10 -force

        

         Now formatting voting disk: /dev/raw/raw10

         successful addition of votedisk /dev/raw/raw10.

          

         [root@10grac1 ~]# crsctl query css votedisk                      

          0.     0    /dev/raw/raw5

          1.     0    /dev/raw/raw6

          2.     0    /dev/raw/raw7

          3.     0    /dev/raw/raw8

          4.     0    /dev/raw/raw9

          5.     0    /dev/raw/raw10

         删除老的vote disk 磁盘

         [root@10grac1 ~]# crsctl delete    css votedisk /dev/raw/raw5 -force

         successful deletion of votedisk /dev/raw/raw5.

         [root@10grac1 ~]# 

         [root@10grac1 ~]# crsctl delete  css votedisk /dev/raw/raw6 -force

         successful deletion of votedisk /dev/raw/raw6.

         [root@10grac1 ~]# 

         [root@10grac1 ~]# crsctl delete css votedisk /dev/raw/raw7 -force

         successful deletion of votedisk /dev/raw/raw7.

          

         [root@10grac1 ~]# crsctl query css votedisk

          0.     0    /dev/raw/raw8

          1.     0    /dev/raw/raw9

          2.     0    /dev/raw/raw10

        

 

数据文件rebalance,环境是原来fidg中有三个failgroup(sto1,sto2,sto3)做的是normal冗余,我们计划把数据文件rebalance 到新加的三个failgroup sto4,sto5,sto6上。

首先在原来fiodg中增加三个failgroup ,老的failgroup sto1 sto2 sto3

  alter  DISKGROUP fiodg add

FAILGROUP sto4 DISK

'/dev/raw/raw17',

'/dev/raw/raw18'

FAILGROUP sto5 DISK

'/dev/raw/raw19',

'/dev/raw/raw20'

FAILGROUP sto6 DISK

'/dev/raw/raw21',

'/dev/raw/raw22';

 增加完成后我们在数据库创建数据文件,插入数据

然后drop 旧的failgroup sto1,sto2,sto3 中disks

ALTER DISKGROUP fiodg drop DISKS IN FAILGROUP sto1;

ALTER DISKGROUP fiodg drop DISKS IN FAILGROUP sto2;

ALTER DISKGROUP fiodg drop DISKS IN FAILGROUP sto3;

我们看到有重平衡在操作,等重平衡之后我可以升级存储os

 

SQL> /

 

GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES

------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------

           1 REBAL REAP         11          4        667       1352        493           1

 

 

GROUP_NUMBER GNAME      STATE         TOTAL_MB TYPE   DISK_NUMBER STATE    DNAME                  DMB PATH                                       FAILGROUP

------------ ---------- ----------- ---------- ------ ----------- -------- --------------- ---------- ------------------------------------------ -------------------

           1 FIODG      MOUNTED           5880 NORMAL          11 NORMAL   FIODG_0011             980 /dev/raw/raw22                             STO6

           1 FIODG      MOUNTED           5880 NORMAL           8 NORMAL   FIODG_0008             980 /dev/raw/raw19                             STO5

           1 FIODG      MOUNTED           5880 NORMAL           7 NORMAL   FIODG_0007             980 /dev/raw/raw18                             STO4

           1 FIODG      MOUNTED           5880 NORMAL           9 NORMAL   FIODG_0009             980 /dev/raw/raw20                             STO5

           1 FIODG      MOUNTED           5880 NORMAL          10 NORMAL   FIODG_0010             980 /dev/raw/raw21                             STO6

           1 FIODG      MOUNTED           5880 NORMAL           6 NORMAL   FIODG_0006             980 /dev/raw/raw17                             STO4

整个过程中集群一直是正常。

root@10grac1 ~]# crs_stat -t -v

Name           Type           R/RA   F/FT   Target    State     Host       

----------------------------------------------------------------------

ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    10grac1    

ora....C1.lsnr application    0/5    0/0    ONLINE    ONLINE    10grac1    

ora....ac1.gsd application    0/5    0/0    ONLINE    ONLINE    10grac1    

ora....ac1.ons application    0/3    0/0    ONLINE    ONLINE    10grac1    

ora....ac1.vip application    0/0    0/0    ONLINE    ONLINE    10grac1    

ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    10grac2    

ora....C2.lsnr application    0/5    0/0    ONLINE    ONLINE    10grac2    

ora....ac2.gsd application    0/5    0/0    ONLINE    ONLINE    10grac2    

ora....ac2.ons application    0/3    0/0    ONLINE    ONLINE    10grac2    

ora....ac2.vip application    0/0    0/0    ONLINE    ONLINE    10grac2    

ora.rac.db     application    0/0    0/1    ONLINE    ONLINE    10grac1     

ora....c1.inst application    0/5    0/0    ONLINE    ONLINE    10grac1    

ora....c2.inst application    0/5    0/0    ONLINE    ONLINE    10grac2  

 

总结

 ?整个测试接近生产环境,整个操作流程没有出现问题。但是问题是在生产环境 替换VOTE 的时候会引起无规律的css shutdown
官方文档如下描述,看来生产环境还是要停机。

crsctl add css votedisk path 

Run the following command as the root user to remove a voting disk:

crsctl delete css votedisk path 

Note:

Bring down  ocssd  using the  -force  option prior to modifying the voting disk configuration with either of these commands to avoid interacting with active Oracle Clusterware daemons. Note also that using the  -force  option while any cluster node is active may corrupt your configuration.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26175573/viewspace-2057438/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26175573/viewspace-2057438/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值