공유 스토리지 구성

스토리지 구성

파일 이름 용량 용도
rac1.vdi 48GB RAC1 스토리지 영역
rac2.vdi 48GB RAC2 스토리지 영역
CRS1.vdi 1GB CRS 저장 영역
CRS2.vdi 1GB
CRS3.vdi 1GB
DATA.vdi 15GB DATA 영역
FRA.vdi 10GB Fast Recovery Area

 

가상 스토리지 파일 생성

공유 스토리지 가상 디스크 생성

 

VirtualBox [파일 - 가상미디어 관리자] 선택

 

만들기 선택

 

가상 하드디스크 VDI 만들기 선택

 

고정 크기 선택

 

위치 설정 및 크기 설정

 

스토리지 파일 공유 설정

 

같은 방식으로 CRS2, CRS3, DATA, FRA 를 생성한다.

파일 이름 용량 타입
CRS1.vdi 1GB Fixed / Shareable
CRS2.vdi 1GB Fixed / Shareable
CRS3.vdi 1GB Fixed / Shareable
DATA.vdi 15GB Fixed / Shareable
FRA.vdi 10GB Fixed / Shareable

 

공유 스토리지 생성 완료

 

VM에 스토리지 연결

RAC1 설정에 들어가 저장소를 선택 후 컨트롤러에서 스토리지를 추가한다.

 

CRS1, CRS2, CRS3, DATA, FRA 영역 추가

 

스토리지 추가 완료

 


ASM 환경 구성

ASM 환경 설정

Oracle ASM 설정 및 시작 (oracle, oinstall, y, y 입력)

[root@rac1 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done

 

/dev/oracleasm 디렉토리 생성

oracleasm/disks에 라벨링된 디스크가 저장

[root@rac1 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm

 

ASM 상태 확인

[root@rac1 ~]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@rac1 ~]# oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=oracle
ORACLEASM_GID=oinstall
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_SCAN_DIRECTORIES=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"

 

디스크 파티셔닝

현재 디스크 확인

[root@rac1 ~]# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdc  /dev/sdd  /dev/sde  /dev/sdf

 

스토리지 파티션 생성

ls /dev/sd*
fdisk /dev/sdb  # "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sdc  # "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sdd  # "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sde  # "n", "p", "1", "엔터", "엔터", "w" 입력
fdisk /dev/sdf  # "n", "p", "1", "엔터", "엔터", "w" 입력
ls /dev/sd*
더보기

fdisk /dev/sdb

fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde
fdisk /dev/sdf

모두 아래와 같이 진행

[root@rac1 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x06188bd3.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-2097151, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151):
Using default value 2097151
Partition 1 of type Linux and of size 1023 MiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@rac1 ~]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x3ebe8212.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-2097151, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151):
Using default value 2097151
Partition 1 of type Linux and of size 1023 MiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

 

디스크 파티셔닝 확인

[root@rac1 ~]# ls /dev/sd*
/dev/sda   /dev/sda2  /dev/sdb1  /dev/sdc1  /dev/sdd1  /dev/sde1  /dev/sdf1
/dev/sda1  /dev/sdb   /dev/sdc   /dev/sdd   /dev/sde   /dev/sdf

 

ASM 디스크 생성

VM에 마운트된 디스크를 각각 ASM Disk로 할당

oracleasm createdisk CRS1 /dev/sdb1
oracleasm createdisk CRS2 /dev/sdc1
oracleasm createdisk CRS3 /dev/sdd1
oracleasm createdisk DATA /dev/sde1
oracleasm createdisk FRA /dev/sdf1
oracleasm scandisks
oracleasm listdisks
더보기
[root@rac1 ~]# oracleasm createdisk CRS1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk CRS2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk CRS3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk DATA /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk FRA /dev/sdf1
Writing disk header: done
Instantiating disk: done

[root@rac1 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...

[root@rac1 ~]# oracleasm listdisks
CRS1
CRS2
CRS3
DATA
FRA

 

 

참조

https://dataforum.io/display/ORCL/Oracle+Database+19c+Real+Application+Cluster

https://positivemh.tistory.com/522

+ Recent posts