2014년 4월 11일 금요일

NAME Column Null in V$ASM_DISK: Overwriting the ASM disk header


V$ASM_DISK에서 NAME 컬럼에 아무것도 나타나지 않는 경우가 있는데, 이는 다음과 같이 해결한다.

먼저, 자세한 사항을 확인해보면 다음과 같다.
[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Wed Apr 9 15:50:31 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> SET LINESIZE 2000
SQL> COL NAME FOR A10
SQL> COL PATH FOR A20
SQL> SELECT GROUP_NUMBER, MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE, NAME, PATH FROM V$ASM_DISK;

GROUP_NUMBER MOUNT_S HEADER_STATU MODE_ST STATE    NAME       PATH
------------ ------- ------------ ------- -------- ---------- --------------------
           0 CLOSED  MEMBER       ONLINE  NORMAL              ORCL:DISK01
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK02     ORCL:DISK02
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK03     ORCL:DISK03
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK04     ORCL:DISK04
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK05     ORCL:DISK05
위와 같이 NAME이 없는 데는 MOUNT_STATUS가 CLOSE임을 확인할 수 있다.

먼저, 자세히 알아보기 위해 로그를 띄운다.
[oracle@rac1 trace]$ cd /u01/app/oracle/diag/asm/+asm/+ASM1/trace
[oracle@rac1 trace]$ tail -f alert_+ASM1.log

디스크 그룹을 다시 마운트 하려고 하면 다음과 같은 에러가 나타난다.
SQL> ALTER DISKGROUP DATA MOUNT;
ALTER DISKGROUP DATA MOUNT
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot be mounted
ORA-15013: diskgroup "DATA" is already mounted

로그는 다음과 같다.
SQL> ALTER DISKGROUP DATA MOUNT
WARNING: Disk Group DATA containing spfile for this instance is not mounted
WARNING: Disk Group DATA containing configured OCR is not mounted
WARNING: Disk Group DATA containing voting files is not mounted
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot be mounted
ORA-15013: diskgroup "DATA" is already mounted
ERROR: ALTER DISKGROUP DATA MOUNT
이미 마운트 되어 있다는 결과를 표시한다.

이번에는 디스크를 다시 추가하기 위해 시도한다.
SQL> ALTER DISKGROUP DATA ADD DISK 'ORCL:DISK01';
ALTER DISKGROUP DATA ADD DISK 'ORCL:DISK01'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15033: disk 'ORCL:DISK01' belongs to diskgroup "DATA"

로그는 다음과 같다.
Wed Apr 09 15:55:49 2014
SQL> ALTER DISKGROUP DATA ADD DISK 'ORCL:DISK01'
NOTE: GroupBlock outside rolling migration privileged region
NOTE: Assigning number (1,0) to disk (ORCL:DISK01)
NOTE: requesting all-instance membership refresh for group=1
NOTE: Disk DISK01 in mode 0x7f marked for de-assignment
ERROR: ORA-15033 signalled during reconfiguration of diskgroup DATA
Wed Apr 09 15:55:50 2014
NOTE: membership refresh pending for group 1/0xcb087a77 (DATA)
NOTE: Attempting voting file refresh on diskgroup DATA
NOTE: Refresh completed on diskgroup DATA
. Found 3 voting file(s).
Wed Apr 09 15:55:53 2014
GMON querying group 1 at 6 for pid 18, osid 4320
GMON querying group 1 at 7 for pid 18, osid 4320
SUCCESS: refreshed membership for 1/0xcb087a77 (DATA)
ORA-15032: not all alterations performed
ORA-15033: disk 'ORCL:DISK01' belongs to diskgroup "DATA"
ERROR: ALTER DISKGROUP DATA ADD DISK 'ORCL:DISK01'
NOTE: Attempting voting file refresh on diskgroup DATA
NOTE: Refresh completed on diskgroup DATA
. Found 3 voting file(s).
이미 있는 디스크라 추가가 불가능하다고 에러를 출력한다.

FORCE 옵션을 주어 시도한다. 그러면 해당 문제가 해결된다.
SQL> ALTER DISKGROUP DATA ADD DISK 'ORCL:DISK01' FORCE;

Diskgroup altered.

로그는 다음과 같다.
Wed Apr 09 15:57:24 2014
SQL> ALTER DISKGROUP DATA ADD DISK 'ORCL:DISK01' FORCE
NOTE: GroupBlock outside rolling migration privileged region
NOTE: Assigning number (1,0) to disk (ORCL:DISK01)
NOTE: requesting all-instance membership refresh for group=1
NOTE: initializing header on grp 1 disk DISK01
NOTE: requesting all-instance disk validation for group=1
Wed Apr 09 15:57:26 2014
NOTE: skipping rediscovery for group 1/0xcb087a77 (DATA) on local instance.
NOTE: requesting all-instance disk validation for group=1
NOTE: skipping rediscovery for group 1/0xcb087a77 (DATA) on local instance.
Wed Apr 09 15:57:26 2014
GMON updating for reconfiguration, group 1 at 8 for pid 28, osid 5454
NOTE: group 1 PST updated.
NOTE: initiating PST update: grp = 1
GMON updating group 1 at 9 for pid 28, osid 5454
NOTE: PST update grp = 1 completed successfully
NOTE: membership refresh pending for group 1/0xcb087a77 (DATA)
GMON querying group 1 at 10 for pid 18, osid 4320
NOTE: cache opening disk 0 of grp 1: DISK01 label:DISK01
GMON querying group 1 at 11 for pid 18, osid 4320
SUCCESS: refreshed membership for 1/0xcb087a77 (DATA)
SUCCESS: ALTER DISKGROUP DATA ADD DISK 'ORCL:DISK01' FORCE
NOTE: starting rebalance of group 1/0xcb087a77 (DATA) at power 1
Starting background process ARB0
Wed Apr 09 15:57:29 2014
ARB0 started with pid=29, OS id=5950
NOTE: assigning ARB0 to group 1/0xcb087a77 (DATA) with 1 parallel I/O
cellip.ora not found.
Wed Apr 09 15:57:41 2014
NOTE: Attempting voting file refresh on diskgroup DATA
NOTE: Refresh completed on diskgroup DATA
. Found 3 voting file(s).

내부적으로 ASM OPERATION이 일어나는지 확인하면 다음과 같이 리밸런싱 작업이 일어난다.
SQL> SELECT * FROM V$ASM_OPERATION;

GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE
------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------
           1 REBAL RUN           1          1        187       1318        467           2

결과적으로는 작업이 마치면 다음과 같이 문제를 해결하게 된다.
SQL> SELECT GROUP_NUMBER, MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE, NAME, PATH FROM V$ASM_DISK;

GROUP_NUMBER MOUNT_S HEADER_STATU MODE_ST STATE    NAME       PATH
------------ ------- ------------ ------- -------- ---------- --------------------
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK01     ORCL:DISK01
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK02     ORCL:DISK02
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK03     ORCL:DISK03
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK04     ORCL:DISK04
           1 CACHED  MEMBER       ONLINE  NORMAL   DISK05     ORCL:DISK05


댓글 없음:

댓글 쓰기