OS환경 : Oracle Linux 7.6 (64bit)
DB 환경 : Oracle Database 19.11.0.0
방법 : 오라클 19c ASM diskgroup 생성
asmca gui가 불가능한 환경에서 수동으로 ASM diskgroup 를 생성하는 방법을 설명함
OS에 disk 를 추가하고 fdisk로 포맷하는 내용은 아래 참조 게시글에서 설명함
현재 bash_profile 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export TMP=/tmp;
export TMPDIR=$TMP;
export ORACLE_BASE=/oracle/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/19c;
export ORACLE_SID=ORADB1;
export GRID_HOME=/ORA19/app/grid/19c;
export GRID_SID=+ASM1;
export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
#export DISPLAY=192.168.137.1:0.0;
alias grid='export ORACLE_HOME=$GRID_HOME; export ORACLE_SID=$GRID_SID; export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH; echo $ORACLE_SID; echo $ORACLE_HOME'
alias db='. ~oracle/.bash_profile;export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH; echo $ORACLE_SID;echo $ORACLE_HOME'
alias oh='cd $ORACLE_HOME;pwd'
alias ss='sqlplus / as sysdba'
|
grid 입력
1
2
3
|
$ grid
+ASM1
/ORA19/app/grid/19c
|
grid 정보로 export됨
asm인스턴스로 접속
1
|
$ sqlplus / as sysasm
|
디스크 그룹별 상세 정보 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
+ASM1>
set lines 200
col group_number for 99
col path for a30
col name for a14
select group_number, disk_number, name, mount_status, path, total_mb, free_mb
from v$asm_disk
order by 1,3;
GROUP_NUMBER DISK_NUMBER NAME MOUNT_S PATH TOTAL_MB FREE_MB
------------ ----------- -------------- ------- ------------------------------ ---------- ----------
0 0 CLOSED /dev/oracleasm/disks/DATA01 0 0
1 0 OCR_VOTE1 CACHED /dev/oracleasm/disks/OCR_VOTE1 1024 708
1 1 OCR_VOTE2 CACHED /dev/oracleasm/disks/OCR_VOTE2 1024 716
1 2 OCR_VOTE3 CACHED /dev/oracleasm/disks/OCR_VOTE3 1024 708
|
/dev/oracleasm/disks/DATA01 를 ORADATA diskgroup로 생성
1
2
3
|
SQL> create diskgroup oradata external redundancy disk '/dev/oracleasm/disks/DATA01';
Diskgroup created.
|
disk가 1개 밖에 없어서 redundancy를 external로 생성해야함
디스크 그룹별 상세 정보 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
+ASM1>
set lines 200
col group_number for 99
col path for a30
col name for a14
select group_number, disk_number, name, mount_status, path, total_mb, free_mb
from v$asm_disk
order by 1,3;
GROUP_NUMBER DISK_NUMBER NAME MOUNT_S PATH TOTAL_MB FREE_MB
------------ ----------- -------------- ------- ------------------------------ ---------- ----------
1 0 OCR_VOTE1 CACHED /dev/oracleasm/disks/OCR_VOTE1 1024 708
1 1 OCR_VOTE2 CACHED /dev/oracleasm/disks/OCR_VOTE2 1024 716
1 2 OCR_VOTE3 CACHED /dev/oracleasm/disks/OCR_VOTE3 1024 708
2 0 DATA01 CACHED /dev/oracleasm/disks/DATA01 20480 20422
|
정상적으로 추가됨
mount 되었는지 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
+ASM1>
SET LINE 200
COL DISK_GROUP FOR A10
COL LABEL FOR A10
COL STATE FOR A10
SELECT A.NAME AS DISK_GROUP, D.NAME "LABEL", A.STATE
FROM V$ASM_DISK D, V$ASM_DISKGROUP A
WHERE D.GROUP_NUMBER=A.GROUP_NUMBER
ORDER BY 2;
DISK_GROUP LABEL STATE
---------- ---------- ----------
ORADATA DATA01 MOUNTED
OCR_VOTE OCR_VOTE1 MOUNTED
OCR_VOTE OCR_VOTE2 MOUNTED
OCR_VOTE OCR_VOTE3 MOUNTED
|
정상적으로 mount 됨, 해당 diskgroup를 사용할수 있는 상태
참조 : https://positivemh.tistory.com/355
https://positivemh.tistory.com/357
'ORACLE > Admin' 카테고리의 다른 글
오라클 19c 유저 이름 변경 방법 (0) | 2021.07.14 |
---|---|
오라클 19c 수동 업그레이드 후 dba_registry의 status 컬럼 UPGRADED (0) | 2021.06.11 |
오라클 19c New Features 및 주요 변경사항 (0) | 2021.05.12 |
오라클 19c XDB service dispatcher 포트 변경 및 비활성화 (0) | 2021.04.22 |
오라클 11g R2 리스너 접속 기록 상세 확인 방법 (0) | 2021.04.21 |