创建磁盘:
[root@kel ~]# oracleasm createdisk KEL3 /dev/sdf1 Writing disk header: done Instantiating disk: done
[root@kel ~]# oracleasm listdisks DATA KEL1 KEL2 KEL3 OCR_VOTE
SQL> select name,total_mb,free_mb from v$asm_disk; NAME TOTAL_MB FREE_MB ---------- ---------- ---------- 2047 0 KEL1 2047 1995 KEL2 2047 1995 ASM_0000 2047 387 ASM_0001 2047 387
SQL> alter diskgroup ASM add disk 'ORCL:KEL3' rebalance power 1; Diskgroup altered.
查看磁盘的rebalance变化:
第一次查看:
SQL> select name,total_mb,free_mb from v$asm_disk; NAME TOTAL_MB FREE_MB ---------- ---------- ---------- KEL1 2047 1995 KEL2 2047 1995 KEL3 2047 1995 ASM_0000 2047 387 ASM_0001 2047 387
SQL> / NAME TOTAL_MB FREE_MB ---------- ---------- ---------- KEL1 2047 1995 KEL2 2047 1995 KEL3 2047 993 ASM_0000 2047 885 ASM_0001 2047 885
SQL> show parameter asm_power_limit NAME TYPE VALUE ------------------------------------ ---------- ------------------------------ asm_power_limit integer 1
SQL> select group_number,name from v$asm_disk; GROUP_NUMBER NAME ------------ ---------- 2 KEL1 2 KEL2 1 KEL3 1 ASM_0000 1 ASM_0001
SQL> alter diskgroup ASM drop disk "KEL3" rebalance power 11; Diskgroup altered.
SQL> select group_number,name from v$asm_disk; GROUP_NUMBER NAME ------------ ---------- 2 KEL1 2 KEL2 1 KEL3 1 ASM_0000 1 ASM_0001 SQL> select group_number,name from v$asm_disk; GROUP_NUMBER NAME ------------ ---------- 0 2 KEL1 2 KEL2 1 ASM_0000 1 ASM_0001