1.登陆服务器
2.登陆到ASM实例
su - grid
sqlplus '/as sysasm'
SQL> SELECT path FROM v$asm_disk WHERE NAME IS NULL;
PATH
/dev/rdsk/c0t60060E8007C72E000030C72E000003BFd0s0
/dev/rdsk/c0t60060E8007C72E000030C72E000003C0d0s0
SQL>
3.加盘到DATA_TEST_DG:
alter diskgroup DATA_TEST_DG add disk '/dev/rdsk/c0t60060E8007C72E000030C72E000003BFd0s0' rebalance power 0;
alter diskgroup DATA_TEST_DG add disk '/dev/rdsk/c0t60060E8007C72E000030C72E000003C0d0s0' rebalance power 0;
4.所有盘加完后开启rebalance power 4:
alter diskgroup DATA_TEST_DG rebalance power 4;
观察数据库异常等待事件10min;
select s.inst_id,sw.sid,s.serial#,s.username,sw.event,sw.wait_class,sw.P1,sw.p2,sw.p3,sw.wait_time "WAIT",sw.state,sw.seconds_in_wait sec,s.status,to_char(s.logon_time,'dd/hh24:mi:ss') log_time
from gv$session s,gv$session_wait sw
where s.username is not null and sw.sid =s.sid and s.inst_id=sw.inst_id
and sw.event not like '%SQL*Net%'
and sw.event not like 'PX Deq%'
order by s.inst_id,sw.event;
观察数据库异常等待事件10min;
select event,count() from v$session_wait group by event having count()>10;
查看预估rebalance完需要多少时间,能否在早上6点前rebalance完成。
select * from v$asm_operation;
5.rebalance完成后,检查各磁盘是否均衡:
select name,path,total_mb,free_mb,state,header_status from v$asm_disk where name like 'DATA_TEST_DG%' order by free_mb desc;
是否还有rebalance进程:
select * from v$asm_operation;
6.如在早上6点还未有rebalance完成:
alter diskgroup DATA_TEST_DG rebalance power 0;
检查确保没有rebalance进程:
select * from v$asm_operation;