OS : Oracle Linux Server release 6.5
ORACLE : Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
-- 기존 경로 정보 확인
# oracleasm querydisk -p VOL1
Disk "VOL1" is a valid ASM disk
/dev/mapper/vgora04-lvora04: LABEL="VOL1" TYPE="oracleasm"
-- asm disk 만들기
# oracleasm createdisk VOL6 /dev/mapper/vgora06-lvora06
# oracleasm createdisk VOL7 /dev/mapper/vgora07-lvora07
# oracleasm createdisk VOL8 /dev/mapper/vgora08-lvora08
-- asm disk 조회
SQL> select group_number, disk_number, name, mount_status, path, total_mb
from v$asm_disk
order by path;
GROUP_NUMBER DISK_NUMBER NAME MOUNT_S PATH TOTAL_MB
------------ ----------- -------------------- ------- ------------------------------ ----------
1 0 VOL1 CACHED ORCL:VOL1 1048568
1 1 VOL2 CACHED ORCL:VOL2 1048568
1 2 VOL3 CACHED ORCL:VOL3 1048568
1 3 VOL4 CACHED ORCL:VOL4 1048568
1 4 VOL5 CACHED ORCL:VOL5 1048568
0 0 CLOSED ORCL:VOL6 0
0 1 CLOSED ORCL:VOL7 0
0 2 CLOSED ORCL:VOL8 0
8 rows selected.
-- asm disk 를 그룹에 추가
$ sqlplus "/as sysadm"
SQL> select NAME, COMPATIBILITY from v$asm_diskgroup;
NAME COMPATIBILITY
-------------------- ------------------------------
DATA 11.2.0.0.0
※ rebalance power 설정시 COMPATIBLE
.ASM
disk group attribute가 11.2.0.2 이상은 0~1024, 11.2.0.1 이하는 0~11로 설정한다.
SQL> alter diskgroup DATA add disk 'ORCL:VOL6','ORCL:VOL7','ORCL:VOL8' rebalance power 11;
SQL> select group_number, disk_number, name, mount_status, path, total_mb
from v$asm_disk
order by path;
GROUP_NUMBER DISK_NUMBER NAME MOUNT_S PATH TOTAL_MB
------------ ----------- -------------------- ------- ------------------------------ ----------
1 0 VOL1 CACHED ORCL:VOL1 1048568
1 1 VOL2 CACHED ORCL:VOL2 1048568
1 2 VOL3 CACHED ORCL:VOL3 1048568
1 3 VOL4 CACHED ORCL:VOL4 1048568
1 4 VOL5 CACHED ORCL:VOL5 1048568
1 5 VOL6 CACHED ORCL:VOL6 1023992
1 6 VOL7 CACHED ORCL:VOL7 1023992
1 7 VOL8 CACHED ORCL:VOL8 1023984
8 rows selected.
SQL> select d.name, o.operation, o.state, o.power, o.est_minutes
from v$asm_disk d, v$asm_operation o
where d.group_number=o.group_number
order by 1;
NAME OPERA STAT POWER EST_MINUTES
------------------------------ ----- ---- ---------- -----------
VOL1 REBAL RUN 11 112
VOL2 REBAL RUN 11 112
VOL3 REBAL RUN 11 112
VOL4 REBAL RUN 11 112
VOL5 REBAL RUN 11 112
VOL6 REBAL RUN 11 112
VOL7 REBAL RUN 11 112
VOL8 REBAL RUN 11 112
8 rows selected.
-- 거의 완료 된 상태에서 파워 변경 11->8
SQL> alter diskgroup DATA rebalance power 8;
SQL> select d.name, o.operation, o.state, o.power, o.est_minutes
from v$asm_disk d, v$asm_operation o
where d.group_number=o.group_number
order by 1;
NAME OPERA STAT POWER EST_MINUTES
------------------------------ ----- ---- ---------- -----------
VOL1 REBAL RUN 8 8
VOL2 REBAL RUN 8 8
VOL3 REBAL RUN 8 8
VOL4 REBAL RUN 8 8
VOL5 REBAL RUN 8 8
VOL6 REBAL RUN 8 8
VOL7 REBAL RUN 8 8
VOL8 REBAL RUN 8 8
8 rows selected.
완료시 위 결과가 아무것도 안나옴.
-- 4.7TB/5TB 에 3TB 추가시 약 150분 소요 (transaction 없음)
'OraclE > ASM' 카테고리의 다른 글
ASM DISK 추가 하기 2 (0) | 2017.04.21 |
---|