当前位置:数据库 > Oracle >>

Oracle RAC添加和删除Voting Disks

Oracle RAC添加和删除Voting Disks
 
添加删除voting Disk示例:
环境:  www.zzzyk.com  
[plain] 
[oracle@node2 ~]$ uname -a  
Linux node2 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux  
[plain] 
SQL> select * from v$version;  
  
BANNER  
----------------------------------------------------------------  
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod  
PL/SQL Release 10.2.0.1.0 - Production  
CORE    10.2.0.1.0      Production  
TNS for Linux: Version 10.2.0.1.0 - Production  
NLSRTL Version 10.2.0.1.0 - Production  
1.查看当前的Voting Disks和关闭Oracle Clusterware
注意:添加和删除Voting Disk应先关闭所有节点Oracle  Clusterware。虽然加-force参数能在线操作,但有可能会损坏集群配置。
 
[plain] 
[oracle@node1 ~]$ crsctl query  css votedisk  
 0.     0    /dev/raw/raw2  
  
located 1 votedisk(s). 
 
[plain] 
[root@node1 bin]# ./crsctl stop crs  
Stopping resources.  
Successfully stopped CRS resources   
Stopping CSSD.  
Shutting down CSS daemon.  
Shutdown request successfully issued.  
[root@node2 bin]# ./crsctl stop crs  
Stopping resources.  
Successfully stopped CRS resources   
Stopping CSSD.  
Shutting down CSS daemon.  
Shutdown request successfully issued.  
 
2.增加Voting Disk
[plain] 
[root@node1 bin]# ./crsctl add css votedisk /dev/raw/raw5 -force  
Now formatting voting disk: /dev/raw/raw5  
successful addition of votedisk /dev/raw/raw5.  
如果不加-force则会出现如下情况:
[plain] 
[root@node1 bin]# ./crsctl add css votedisk /dev/raw/raw6  
Cluster is not in a ready state for online disk addition  
 
3.查看刚添加的Voting Disk
[plain] 
[oracle@node1 ~]$ crsctl query  css votedisk  
 0.     0    /dev/raw/raw2  
 1.     0    /dev/raw/raw5  
 
可以看到raw5已添加成功。
 
4.删除Voting Disk(先查看和关闭Oracle clusterware,同上)
[plain] 
[root@node1 bin]# ./crsctl delete css votedisk /dev/raw/raw5 -force  
successful deletion of votedisk /dev/raw/raw5.  
如果不加-force则会出现如下情况:
[plain] 
[root@node1 bin]# ./crsctl delete css votedisk /dev/raw/raw5  
Cluster is not in a ready state for online disk removal  
5.查看是否已删除
[plain] 
[root@node1 bin]# ./crsctl query  css votedisk  
 0.     0    /dev/raw/raw2  
  
located 1 votedisk(s).  
 
只剩下raw2说明已删除
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,