본문 바로가기
Oracle/운영

[ASM] diskgroup에 disk 추가하기

by 취미툰 2023. 5. 16.
반응형

grid계정으로 수행

 

작업 명령어

grid$ sqlplus / as sysasm

SQL> alter diskgroup DATA01 add disk '/dev/mapper/ASMdatadg010'  rebalance power 10;

Diskgroup altered.

 

작업 후에 리밸런싱 모니터링

SET LINESIZE 300
SET PAGESIZE 100
COL GROUP_NUMBER FORMAT 9
COL OPERATION FORMAT A9
COL PASS FORMAT A09
COL STATE FORMAT A05
COL ACTUAL FORMAT 999
COL ERROR_CODE FORMAT A10
SELECT GROUP_NUMBER, OPERATION, PASS, STATE, ACTUAL, SOFAR
      ,CASE WHEN PASS = 'COMPACT'
            THEN (SELECT EST_WORK FROM V$ASM_OPERATION WHERE PASS = 'REBALANCE')
            ELSE EST_WORK
       END AS "EST_WORK"
      ,CASE WHEN PASS = 'COMPACT'
            THEN ROUND(SOFAR/(SELECT SOFAR FROM V$ASM_OPERATION WHERE PASS = 'REBALANCE')*100 ,2)
            ELSE DECODE(EST_WORK,0,0,ROUND(SOFAR/EST_WORK*100,2))
       END AS "Progress(%)"
      ,(SELECT TO_CHAR(SYSDATE, 'HH24:MI:SS') FROM DUAL) TIME, ERROR_CODE
  FROM V$ASM_OPERATION
ORDER BY DECODE(PASS,'REBUILD',1,'REBALANCE',2,3);


GROUP_NUMBER OPERATION PASS      STATE ACTUAL      SOFAR   EST_WORK Progress(%) TIME                     ERROR_CODE
------------ --------- --------- ----- ------ ---------- ---------- ----------- ------------------------ ----------
           2 REBAL     REBUILD   DONE      10          0          0           0 18:34:02
           2 REBAL     REBALANCE RUN       10      54031     115216        46.9 18:34:02
           2 REBAL     COMPACT   WAIT      10          0     115216           0 18:34:02

 

반응형

댓글