三、Oracle 集群软件的资源的管理
1.如果需要修改资源的属性,使用crs_profile -update 选项;具体例子可以参见五-1的错误二;
2.如果资源的状态为UNKNOWN,要对该资源进行关闭,使用crs_stop的命令的时候需要加入-f参数;
3.使用crs_profile -print 来查看资源的属性情况,包括依赖关系等等,
同样也可以使用crs_stat -p 来实现;
4.关于CRS的日志:主要在$CRS_HOME/log/node_name目录下,但需要提醒的是,系统日志中也会有
比较重要的日志信息,比如Solaris下的/var/adm/messages、linux一般在/var/log/messages ,
HPUX则是/var/adm/syslog/syslog.log文件;
5.启动、关闭、和查看crs资源的命令分别为crs_start 和crs_stop 和crs_stat,
每个命令都可以使用-H参数得到相应语法;
也可以使用stvctl start nodeapps -n rac1命令;
四、对集群软件进行测试
1.手工切换节点:
在任意节点上依次使用下面的命令,以oracle或者root执行均可,只要配置正确的$PATH环境变量
crs_stop -all;
crs_start havip -c rac02;
crs_start listener -c rac02;
crs_start disk_group -c rac02;
crs_start oradata_mount -c rac02;
crs_start orcl_db -c rac02;
然后,登陆到rac02(现在为主节点)使用df -h /oradata 检查共享盘是否挂载,
使用ps -ef|grep ora_检查到oracle启动,检查后台报警日志中没有错误信息,
2.自动切换:
手工模拟主节点的故障情况:使用reboot命令
root@rac01 # reboot
Jan 8 14:53:57 rac01 reboot: [ID 662345 auth.crit] rebooted by root
从日志中看到备用节点rac02上的crs感应到了主节点的失败,并接管相关服务:
2008-01-08 14:30:33.929: [ CRSMAIN][1] Starting Threads
2008-01-08 14:30:33.929: [ CRSMAIN][1] CRS Daemon Started.
2008-01-08 14:52:18.777: [ CRSEVT][71] Processing member leave for rac01, incarnation: 2
2008-01-08 14:52:18.878: [ CRSEVT][71] Do failover for: rac01
2008-01-08 14:52:42.180: [ CRSRES][73] startRunnable: setting CLI values
2008-01-08 14:52:42.193: [ CRSRES][73] Attempting to start `disk_group` on member `rac02`
2008-01-08 14:52:45.722: [ CRSRES][73] Start of `disk_group` on member `rac02` succeeded.
2008-01-08 14:52:45.731: [ CRSRES][73] startRunnable: setting CLI values
2008-01-08 14:52:45.732: [ CRSRES][73] Attempting to start `oradata_mount` on member `rac02`
2008-01-08 14:52:45.986: [ CRSRES][73] Start of `oradata_mount` on member `rac02` succeeded.
2008-01-08 14:52:46.013: [ CRSRES][73] startRunnable: setting CLI values
2008-01-08 14:52:46.015: [ CRSRES][73] Attempting to start `orcl_db` on member `rac02`
2008-01-08 14:53:31.486: [ CRSRES][73] Start of `orcl_db` on member `rac02` succeeded.
2008-01-08 14:53:31.487: [ CRSEVT][71] Post recovery done evmd event for: rac01
2008-01-08 14:53:31.603: [ CRSEVT][75] Processing RecoveryDone
阅读(339) | 评论(0) | 转发(0) |