메뉴 건너뛰기

Korea Oracle User Group

Install/Configuration

Oracle 19c RAC 설치 with Oracle Linux 8.2 - 1 (OS 및 스토리지 설정)

 

0. Oracle Linux 설치 환경

1. 방화벽 비활성화(node 1, 2)

2. 불필요한 서비스 정지(node 1, 2)

3. 설치된 패키지 upgrade(node 1, 2)

4. /etc/hosts 파일 수정(node 1, 2)

5. Selinux 비활성화(node 1, 2)

6. chrony 설정 비활성화(node 1, 2)

7. preinstall 점검 패키지 설치(node 1, 2)

8. 추가 OS 계정 생성 및 변경

9. grid / oracle 계정의 .bash_profile 수정

10. grid / oracle /root Equivalence 설정

11. iscsi 를 통해 ASM에 사용할 디스크 설정

12. SCAN 사용을 위해 DNS 설정하기

 

0. Oracle Linux 설치 환경

Version : 8.2 Enterprise Linux

CPU : 4 core

Memory : 10 GB

OS : Oracle Linux 8.2

Swap : 20 GB

 

OS 설치시 Software Selection 에서 아래 내용으로 패키지 설치하였습니다.

Base Environment : Server with GUI
Additional software for Selected Environment :
     Debugging Tools
     File and Storage Server
     Network File System Client
     Performance Tools
     Remote Desktop Clients
     Remote Management for Linux
     Legacy UNIX Compatibility
     Development Tools
     Graphical Administration Tools
     Security Tools
     System Tools

 

IP 설정 : public 192.168.45.201 / 192.168.45.202

            private 1.1.1.201 / 1.1.1.202

            vip 192.168.45.211 / 192.168.45.212

            scan 192.168.45.221 / 192.168.45.222 / 192.168.45.223

1. 방화벽 비활성화(node 1, 2)

1) 방화벽 상태 확인

[root@mprac1 ~]# systemctl status firewalld.service 
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-11-16 22:11:00 KST; 12h ago
     Docs: man:firewalld(1)
 Main PID: 1238 (firewalld)
    Tasks: 2 (limit: 48742)
   Memory: 33.6M
   CGroup: /system.slice/firewalld.service
           └─1238 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid

Nov 16 22:10:58 mprac1.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 16 22:11:00 mprac1.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Nov 16 22:11:01 mprac1.localdomain firewalld[1238]: WARNING: AllowZoneDrifting is enabled. This is consider>
lines 1-13/13 (END)

 

2) 방화벽 서비스 정지 및 disable

[root@mprac1 ~]# systemctl stop firewalld.service
[root@mprac1 ~]# systemctl disable firewalld.service
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@mprac1 ~]# systemctl status firewalld.service 
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Nov 16 22:10:58 mprac1.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 16 22:11:00 mprac1.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Nov 16 22:11:01 mprac1.localdomain firewalld[1238]: WARNING: AllowZoneDrifting is enabled. This is consider>
Nov 17 10:34:37 mprac1.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
Nov 17 10:34:38 mprac1.localdomain systemd[1]: firewalld.service: Succeeded.
Nov 17 10:34:38 mprac1.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.

 

2. 불필요한 서비스 정지(node 1, 2)

[root@mprac2 ~]# systemctl stop bluetooth
[root@mprac2 ~]# systemctl disable bluetooth
Removed /etc/systemd/system/dbus-org.bluez.service.
Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service.
[root@mprac2 ~]# systemctl stop avahi-daemon.socket avahi-daemon.service 
Job for avahi-daemon.socket canceled.
[root@mprac2 ~]# systemctl disable avahi-daemon.socket avahi-daemon.service
Removed /etc/systemd/system/multi-user.target.wants/avahi-daemon.service.
Removed /etc/systemd/system/sockets.target.wants/avahi-daemon.socket.
Removed /etc/systemd/system/dbus-org.freedesktop.Avahi.service.
[root@mprac2 ~]# systemctl mask avahi-daemon.socket avahi-daemon.service        
Created symlink /etc/systemd/system/avahi-daemon.socket → /dev/null.
Created symlink /etc/systemd/system/avahi-daemon.service → /dev/null.
[root@mprac2 ~]# systemctl stop libvirtd.service
Warning: Stopping libvirtd.service, but it can still be activated by:
  libvirtd-ro.socket
  libvirtd-admin.socket
  libvirtd.socket
[root@mprac2 ~]# systemctl disable libvirtd.service
Removed /etc/systemd/system/multi-user.target.wants/libvirtd.service.
Removed /etc/systemd/system/sockets.target.wants/virtlogd.socket.
Removed /etc/systemd/system/sockets.target.wants/virtlockd.socket.
[root@mprac2 ~]# 

 

3. 설치된 패키지 upgrade(node 1, 2)

[root@mprac1 ~]# dnf upgrade
Last metadata expiration check: 2:15:07 ago on Tue 17 Nov 2020 08:25:06 AM KST.
Dependencies resolved.
Nothing to do.
Complete!

 

4. /etc/hosts 파일 수정(node 1, 2)

[root@mprac1 ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

# Public
192.168.45.201 mprac1 mprac1.localdomain
192.168.45.202 mprac2 mprac2.localdomain

# Private
1.1.1.201 mprac1-priv mprac1-priv.localdomain
1.1.1.202 mprac2-priv mprac2-priv.localdomain

# VIP
192.168.45.211 mprac1-vip mprac1-vip.localdomain
192.168.45.212 mprac2-vip mprac2-vip.localdomain

# iscsi Storage Server
192.168.45.105 kwanst kwanst.localdomain
1.1.1.105 kwanst-priv kwanst-priv.localdomain

 

5. Selinux 비활성화(node 1, 2)

1) Selinux 설정 확인

[root@mprac1 ~]# getenforce
Enforcing

 

2) disable로 설정 변경

[root@mprac1 ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

 

3) 시스템 Reboot 후 변경 내용 확인

[root@mprac1 ~]# getenforce
Disabled
[root@mprac1 ~]# sestatus -v
SELinux status:                 disabled

 

6. chrony 설정 비활성화(node 1, 2)

[root@mprac1 ~]# systemctl stop chronyd
[root@mprac1 ~]# systemctl disable chronyd
[root@mprac1 ~]# mv /etc/chrony.conf /etc/chrony.conf.bak

 

7. preinstall 점검 패키지 설치(node 1, 2)

설치 정보 확인 후 설치되어 있지 않으면 설치

[root@mprac1 ~]# dnf list oracle-database-preinstall*
Last metadata expiration check: 2:41:17 ago on Tue 17 Nov 2020 08:25:06 AM KST.
Available Packages
oracle-database-preinstall-19c.src                         1.0-1.el8                       ol8_baseos_latest
oracle-database-preinstall-19c.x86_64                      1.0-1.el8                       ol8_baseos_latest
[root@mprac1 ~]# dnf install oracle-database-preinstall-19c
Last metadata expiration check: 2:42:11 ago on Tue 17 Nov 2020 08:25:06 AM KST.
Dependencies resolved.
============================================================================================================
 Package                              Architecture Version                    Repository               Size
============================================================================================================
Installing:
 oracle-database-preinstall-19c       x86_64       1.0-1.el8                  ol8_baseos_latest        24 k
Installing dependencies:
 ksh                                  x86_64       20120801-254.0.1.el8       ol8_appstream           927 k
 libaio-devel                         x86_64       0.3.112-1.el8              ol8_baseos_latest        19 k
 libnsl                               x86_64       2.28-127.0.1.el8           ol8_baseos_latest        99 k

Transaction Summary
============================================================================================================
Install  4 Packages

Total download size: 1.0 M
Installed size: 3.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm                   95 kB/s |  24 kB     00:00    
(2/4): libaio-devel-0.3.112-1.el8.x86_64.rpm                                 72 kB/s |  19 kB     00:00    
(3/4): libnsl-2.28-127.0.1.el8.x86_64.rpm                                   372 kB/s |  99 kB     00:00    
(4/4): ksh-20120801-254.0.1.el8.x86_64.rpm                                   31 MB/s | 927 kB     00:00    
------------------------------------------------------------------------------------------------------------
Total                                                                       3.5 MB/s | 1.0 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                    1/1 
  Installing       : ksh-20120801-254.0.1.el8.x86_64                                                    1/4 
  Running scriptlet: ksh-20120801-254.0.1.el8.x86_64                                                    1/4 
  Installing       : libnsl-2.28-127.0.1.el8.x86_64                                                     2/4 
  Installing       : libaio-devel-0.3.112-1.el8.x86_64                                                  3/4 
  Running scriptlet: oracle-database-preinstall-19c-1.0-1.el8.x86_64                                    4/4 
  Installing       : oracle-database-preinstall-19c-1.0-1.el8.x86_64                                    4/4 
  Running scriptlet: oracle-database-preinstall-19c-1.0-1.el8.x86_64                                    4/4 
  Verifying        : libaio-devel-0.3.112-1.el8.x86_64                                                  1/4 
  Verifying        : oracle-database-preinstall-19c-1.0-1.el8.x86_64                                    2/4 
  Verifying        : libnsl-2.28-127.0.1.el8.x86_64                                                     3/4 
  Verifying        : ksh-20120801-254.0.1.el8.x86_64                                                    4/4 

Installed:
  ksh-20120801-254.0.1.el8.x86_64              libaio-devel-0.3.112-1.el8.x86_64                           
  libnsl-2.28-127.0.1.el8.x86_64               oracle-database-preinstall-19c-1.0-1.el8.x86_64             

Complete!
[root@mprac1 ~]#

 

패키지가 설치되면 오라클 설치에 필요한 설정에 대해서 변경 작업을 수행하고 해당 내용의 로그를 아래 파일에 기록하게 된다.

/var/log/oracle-database-preinstall-19c/backup/Oct-15-2020-22-58-11/orakernel.log

로그 내용을 확인하고 체크해야한다.

 

패키지가 설치 수행되면 설치에 필요한 계정과 그룹이 생성되게 된다.

8. 추가 OS 계정 생성 및 변경

1) 아래 내용으로 modify_oracle_user.sh shell script 생성

[root@mprac1 ~]# vi modify_oracle_user.sh
#!/usr/bin/ksh
# Program : modify_oracle_users.sh
# Author : Sean Francis
# Date : July 2019
# Purpose : To complete the setup of the oracle and grid users for a new
# server install.
#
# Notes : This script assumes the pre-install database package has been
# installed.
################################################################################
# STANDARD ORACLE USER AND GROUP IDs
#
# USERS:
ORACLE_UID=1000
GRID_UID=1001
# GROUPS:
OINSTALL_GID=1001
DBA_GID=1002
OPER_GID=1003
BACKUPDBA_GID=1004
DGDBA_GID=1005
KMDBA_GID=1006
RACDBA_GID=1007
ASMDBA_GID=1008
ASMADMIN_GID=1009
ASMOPER_GID=1010
################################################################################
# add group
groupmod -g ${OINSTALL_GID} oinstall
groupmod -g ${DBA_GID} dba
groupmod -g ${OPER_GID} oper
groupmod -g ${BACKUPDBA_GID} backupdba
groupmod -g ${DGDBA_GID} dgdba
groupmod -g ${KMDBA_GID} kmdba
groupmod -g ${RACDBA_GID} racdba

# add missing ASM groups
groupadd -g ${ASMDBA_GID} asmdba
groupadd -g ${ASMADMIN_GID} asmadmin
groupadd -g ${ASMOPER_GID} asmoper

# modify oracle
usermod -u ${ORACLE_UID} -g oinstall -G dba,backupdba,dgdba,kmdba,racdba,asmdba,oper oracle

# add grid
useradd -u ${GRID_UID} -g oinstall -G dba,asmdba,asmadmin,asmoper,racdba grid

# display the new user configurations
echo ""
echo "oracle user id: " `id oracle`
echo ""
echo "grid user id: " `id grid`
# eof modify_oracle_users.sh

 

2) shell script 수행

먼저 생성한 kwan 이란 유저가 이미 uid 1000을 사용하고 있어 이를 먼저 변경해 줌

[root@mprac2 ~]# usermod -u 50000 kwan

 

1)에서 생성한 shell 스크립트를 수행함

[root@mprac2 ~]# sh modify_oracle_user.sh 

oracle user id:  uid=1000(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1003(oper),1004(backupdba),1005(dgdba),1006(kmdba),1007(racdba),1008(asmdba)

grid user id:  uid=1001(grid) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1007(racdba),1008(asmdba),1009(asmadmin),1010(asmoper)
[root@mprac2 ~]# 

 

3) grid 유저와 oracle 유저 패스워드 변경

[root@mprac1 ~]# passwd grid
Changing password for user grid.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@mprac1 ~]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.

 

9. grid / oracle 계정의 .bash_profile 수정

1) grid 유저의 .bash_profile 수정

아래 내용을 추가해 준다.

stty erase ^H
umask 022
ORACLE_SID=+ASM1
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/19.0.0/grid
LD_LIBRARY_PATH=$ORACLE_HOME/lib
TMP=/tmp
TMPDIR=/tmp
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
export PATH ORACLE_SID ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH TMP TMPDIR
export CV_ASSUME_DISTID=OEL8.1 #for Linux 8 ver
export ORA_DISABLED_CVU_CHECKS="TASKNTP,TASKCTSSINTEGRITY" #for ntp error solution

#export SQLPATH=
export PS1=`hostname`'@$LOGNAME:$ORACLE_SID:$PWD> '

alias sqlss='sqlplus / as sysdba'
alias ob="cd ${ORACLE_BASE}"
alias oh="cd ${ORACLE_HOME}"

 

2번 노드의 경우 +ASM1을 +ASM2로 변경해야 한다.

2) oracle 유저의 .bash_profile 수정

아래 내용을 추가해 준다.

umask 022
ORACLE_SID=MPRAC1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1
LD_LIBRARY_PATH=$ORACLE_HOME/lib
TMP=/tmp
TMPDIR=/tmp
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
export PATH ORACLE_SID ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH TMP TMPDIR
export CV_ASSUME_DISTID=OEL8.1 #for Linux 8 ver

#export SQLPATH=
export PS1=`hostname`'@$LOGNAME:$ORACLE_SID:$PWD> '

alias sqlss='sqlplus / as sysdba'
alias ob="cd ${ORACLE_BASE}"
alias oh="cd ${ORACLE_HOME}"

 

2번 노드의 경우 MPRAC1을 MPRAC2로 변경해야 한다.

 

3) root 유저의 .bash_profile 수정

아래 내용 추가

ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/19.0.0/grid

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export PATH ORACLE_BASE ORACLE_HOME
export PS1=`hostname`'@$LOGNAME:$PWD> '
 
alias sqlss='sqlplus / as sysdba'
alias gb="cd ${ORACLE_BASE}"
alias gh="cd ${ORACLE_HOME}"

 

10. grid / oracle /root Equivalence 설정

1) grid 유저 세팅

[root@mprac1 ~]# su - grid
mprac1.localdomain@grid:+ASM1:/home/grid> rm -rf ~/.ssh
mprac1.localdomain@grid:+ASM1:/home/grid> mkdir ~/.ssh
mprac1.localdomain@grid:+ASM1:/home/grid> chmod 700 ~/.ssh
mprac1.localdomain@grid:+ASM1:/home/grid> cd ~/.ssh
mprac1.localdomain@grid:+ASM1:/home/grid/.ssh> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/grid/.ssh/id_rsa.
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:aiIT93zG/quJSs+rgEMfZ8yDX25nZYB+eF0NbuITbmU grid@mprac1.localdomain
The key's randomart image is:
+---[RSA 3072]----+
|             .   |
|        .   . o  |
|       . . o E . |
|    + . . = B    |
| ..o.* +So O     |
|...o=o+oo + .    |
|o +.o.=o+o       |
| . = =.=o.       |
|    oo=.+oo.     |
+----[SHA256]-----+
mprac1.localdomain@grid:+ASM1:/home/grid/.ssh> ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_dsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/grid/.ssh/id_dsa.
Your public key has been saved in /home/grid/.ssh/id_dsa.pub.
The key fingerprint is:
SHA256:1XnW1hRnSDKOzlae+vZMlILkDJfpRRNxDfiDuS1xdhA grid@mprac1.localdomain
The key's randomart image is:
+---[DSA 1024]----+
|            B=E*=|
|           B.*o++|
|        . B *+o.+|
|         @ =++=o.|
|        S O +*oo |
|         . .oo.  |
|          .  ..  |
|           ..o   |
|           ...o  |
+----[SHA256]-----+
mprac1.localdomain@grid:+ASM1:/home/grid/.ssh> 

 

2번 노드에서도 동일한 작업 수행한다.

 

1번 노드에서 아래 작업을 먼저 수행해 준다.

mprac1.localdomain@grid:+ASM1:/home/grid/.ssh> cat *.pub >> authorized_keys
mprac1.localdomain@grid:+ASM1:/home/grid/.ssh> scp authorized_keys mprac2:~/.ssh/
The authenticity of host 'mprac2 (192.168.45.202)' can't be established.
ECDSA key fingerprint is SHA256:9v1lPT2PH1kBqc12BXj/9l2mX3n6R0ty8HskOobKGEo.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'mprac2,192.168.45.202' (ECDSA) to the list of known hosts.
grid@mprac2's password: 
authorized_keys                                                            100% 1190     1.2MB/s   00:00    
mprac1.localdomain@grid:+ASM1:/home/grid/.ssh> 

 

2번 노드에서 아래 작업을 수행해 준다.

mprac2.localdomain@grid:+ASM2:/home/grid/.ssh> cat *.pub >> authorized_keys 
mprac2.localdomain@grid:+ASM2:/home/grid/.ssh> scp authorized_keys mprac1:~/.ssh
The authenticity of host 'mprac1 (192.168.45.201)' can't be established.
ECDSA key fingerprint is SHA256:1t+EAq3dCzlIZbRAfHKReCGV1+fyqsdaAiIKdXIEjHQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'mprac1,192.168.45.201' (ECDSA) to the list of known hosts.
grid@mprac1's password: 
authorized_keys                                                            100% 2380     2.2MB/s   00:00    
mprac2.localdomain@grid:+ASM2:/home/grid/.ssh> 

 

2) oracle 유저 세팅

grid 유저 세팅과 같은 동일 작업을 oracle 계정에서 수행한다.
 

3) root 유저 세팅

grid 유저 세팅과 같은 동일 작업을 root 계정에서 수행한다.

 

11. iscsi 를 통해 ASM에 사용할 디스크 설정

1) RAC에서 사용할 disk 추가

아래 링크의 내용을 참조하여 노드 1,2 에 디스크 추가 작업 수행

iscsi 서버/클라이언트 설정하기(with targetcli)

 

2) 추가된 디스크에 대해서 RAC에서 사용할 수 있게 추가 설정 수행

[root@mprac1 ~]# lsblk
NAME               MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                  8:0    0   80G  0 disk 
├─sda1               8:1    0  600M  0 part /boot/efi
├─sda2               8:2    0    1G  0 part /boot
└─sda3               8:3    0 78.4G  0 part 
  ├─ol_mprac1-root 252:0    0   40G  0 lvm  /
  ├─ol_mprac1-swap 252:1    0   16G  0 lvm  [SWAP]
  └─ol_mprac1-home 252:2    0   20G  0 lvm  /home
sdb                  8:16   0    5G  0 disk 
sdc                  8:32   0   50G  0 disk 
sdd                  8:48   0   50G  0 disk 
sde                  8:64   0    5G  0 disk 
sdf                  8:80   0    5G  0 disk 
sr0                 11:0    1 1024M  0 rom  
[root@mprac1 ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.32.1).
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.
Created a new DOS disklabel with disk identifier 0x51f27e81.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (65528-10485759, default 65528): 
Last sector, +sectors or +size{K,M,G,T,P} (65528-10485759, default 10485759): 

Created a new partition 1 of type 'Linux' and of size 5 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@mprac1 ~]# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.32.1).
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.
Created a new DOS disklabel with disk identifier 0xb195a875.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (65528-104857599, default 65528): 
Last sector, +sectors or +size{K,M,G,T,P} (65528-104857599, default 104857599): 

Created a new partition 1 of type 'Linux' and of size 50 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@mprac1 ~]# fdisk /dev/sdd

Welcome to fdisk (util-linux 2.32.1).
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.
Created a new DOS disklabel with disk identifier 0xa756a75e.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (65528-104857599, default 65528): 
Last sector, +sectors or +size{K,M,G,T,P} (65528-104857599, default 104857599): 

Created a new partition 1 of type 'Linux' and of size 50 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@mprac1 ~]# fdisk /dev/sde

Welcome to fdisk (util-linux 2.32.1).
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.
Created a new DOS disklabel with disk identifier 0x9021e45b.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (65528-10485759, default 65528): 
Last sector, +sectors or +size{K,M,G,T,P} (65528-10485759, default 10485759): 

Created a new partition 1 of type 'Linux' and of size 5 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@mprac1 ~]# fdisk /dev/sdf

Welcome to fdisk (util-linux 2.32.1).
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.
Created a new DOS disklabel with disk identifier 0x3c5b8b1e.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (65528-10485759, default 65528): 
Last sector, +sectors or +size{K,M,G,T,P} (65528-10485759, default 10485759): 

Created a new partition 1 of type 'Linux' and of size 5 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@mprac1 ~]# partprobe -s
/dev/sda: gpt partitions 1 2 3
/dev/sdb: msdos partitions 1
/dev/sdc: msdos partitions 1
/dev/sdd: msdos partitions 1
/dev/sde: msdos partitions 1
/dev/sdf: msdos partitions 1
[root@mprac1 ~]# lsblk
NAME               MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                  8:0    0   80G  0 disk 
├─sda1               8:1    0  600M  0 part /boot/efi
├─sda2               8:2    0    1G  0 part /boot
└─sda3               8:3    0 78.4G  0 part 
  ├─ol_mprac1-root 252:0    0   40G  0 lvm  /
  ├─ol_mprac1-swap 252:1    0   16G  0 lvm  [SWAP]
  └─ol_mprac1-home 252:2    0   20G  0 lvm  /home
sdb                  8:16   0    5G  0 disk 
└─sdb1               8:17   0    5G  0 part 
sdc                  8:32   0   50G  0 disk 
└─sdc1               8:33   0   50G  0 part 
sdd                  8:48   0   50G  0 disk 
└─sdd1               8:49   0   50G  0 part 
sde                  8:64   0    5G  0 disk 
└─sde1               8:65   0    5G  0 part 
sdf                  8:80   0    5G  0 disk 
└─sdf1               8:81   0    5G  0 part 
sr0                 11:0    1 1024M  0 rom  
[root@mprac1 ~]# 

 

2번 노드에서 1번 작업을 아래와 같이 인식 시켜준다.

 

[root@mprac2 ~]# lsblk
NAME               MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                  8:0    0   80G  0 disk 
├─sda1               8:1    0  600M  0 part /boot/efi
├─sda2               8:2    0    1G  0 part /boot
└─sda3               8:3    0 78.4G  0 part 
  ├─ol_mprac2-root 252:0    0   40G  0 lvm  /
  ├─ol_mprac2-swap 252:1    0   16G  0 lvm  [SWAP]
  └─ol_mprac2-home 252:2    0   20G  0 lvm  /home
sdb                  8:16   0    5G  0 disk 
sdc                  8:32   0   50G  0 disk 
sdd                  8:48   0   50G  0 disk 
sde                  8:64   0    5G  0 disk 
sdf                  8:80   0    5G  0 disk 
sr0                 11:0    1 1024M  0 rom  
[root@mprac2 ~]# partprobe -s
/dev/sda: gpt partitions 1 2 3
/dev/sdb: msdos partitions 1
/dev/sdc: msdos partitions 1
/dev/sdd: msdos partitions 1
/dev/sde: msdos partitions 1
/dev/sdf: msdos partitions 1
[root@mprac2 ~]# lsblk
NAME               MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                  8:0    0   80G  0 disk 
├─sda1               8:1    0  600M  0 part /boot/efi
├─sda2               8:2    0    1G  0 part /boot
└─sda3               8:3    0 78.4G  0 part 
  ├─ol_mprac2-root 252:0    0   40G  0 lvm  /
  ├─ol_mprac2-swap 252:1    0   16G  0 lvm  [SWAP]
  └─ol_mprac2-home 252:2    0   20G  0 lvm  /home
sdb                  8:16   0    5G  0 disk 
└─sdb1               8:17   0    5G  0 part 
sdc                  8:32   0   50G  0 disk 
└─sdc1               8:33   0   50G  0 part 
sdd                  8:48   0   50G  0 disk 
└─sdd1               8:49   0   50G  0 part 
sde                  8:64   0    5G  0 disk 
└─sde1               8:65   0    5G  0 part 
sdf                  8:80   0    5G  0 disk 
└─sdf1               8:81   0    5G  0 part 
sr0                 11:0    1 1024M  0 rom  
[root@mprac2 ~]#

 

3) 서버 리부팅시 disk 경로가 변경되는 것을 방지하기 위해 udev 설정

먼저 scsi_id 명령어를 통해 SCSI identifier를 확인한다.

[root@mprac1 ~]# alias scsi_id='/lib/udev/scsi_id'
[root@mprac1 ~]# scsi_id -g -u -d /dev/sdb
36001405150efb8a20cc435c92be91e38
[root@mprac1 ~]# scsi_id -g -u -d /dev/sdc
36001405412ee63805e040f08669b65a0
[root@mprac1 ~]# scsi_id -g -u -d /dev/sdd
3600140584f1512ff6954ce5be73f805b
[root@mprac1 ~]# scsi_id -g -u -d /dev/sde
36001405e63c5d3439c846449d9edd5bd
[root@mprac1 ~]# scsi_id -g -u -d /dev/sdf
360014051e0c93ebbb23423fa5508dc6b
[root@mprac1 ~]# 

 

udev 설정을 위해 아래 내용으로 신규 rule를 추가해 준다.

5G 사이즈의 disk는 OCR / VOTING용으로 사용하고 50G 사이즈의 disk는 각 data 영역과 fra 영역으로 사용하도록 설정한다.

 

[root@mprac1 ~]# vi /lib/udev/rules.d/99-iscsidevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36001405150efb8a20cc435c92be91e38", SYMLINK+="rac/crs1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36001405e63c5d3439c846449d9edd5bd", SYMLINK+="rac/crs2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="360014051e0c93ebbb23423fa5508dc6b", SYMLINK+="rac/crs3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36001405412ee63805e040f08669b65a0", SYMLINK+="rac/data", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="3600140584f1512ff6954ce5be73f805b", SYMLINK+="rac/fra", OWNER="grid", GROUP="asmadmin", MODE="0660"

 

아래 명령어를 통해 테스트 후 device 명이 설정되었는지 확인한다.

 

[root@mprac1 ~]# udevadm test /block/sdb/sdb1
...
...
[root@mprac1 ~]# ls -al /dev/rac
total 0
drwxr-xr-x  2 root root   60 Nov 17 15:59 .
drwxr-xr-x 20 root root 3660 Nov 17 15:59 ..
lrwxrwxrwx  1 root root    7 Nov 17 15:59 crs1 -> ../sdb1

 

작업 후 시스템 reboot 후 아래와 같이 다시 확인해 본다.

 

[root@mprac1 ~]# ls -al /dev/rac
total 0
drwxr-xr-x  2 root root  140 Nov 17 16:02 .
drwxr-xr-x 20 root root 3660 Nov 17 16:02 ..
lrwxrwxrwx  1 root root    7 Nov 17 16:02 crs1 -> ../sdb1
lrwxrwxrwx  1 root root    7 Nov 17 16:02 crs2 -> ../sde1
lrwxrwxrwx  1 root root    7 Nov 17 16:02 crs3 -> ../sdf1
lrwxrwxrwx  1 root root    7 Nov 17 16:02 data -> ../sdc1
lrwxrwxrwx  1 root root    7 Nov 17 16:02 fra -> ../sdd1

 

12. SCAN 사용을 위해 DNS 설정하기

아래 링크된 게시글을 참조하기 바랍니다.

RAC SCAN 사용을 위한 DNS 서버 설정하기

 

 

 

번호 제목 글쓴이 날짜 조회 수
32 Oracle Database 19c Patch Update(단일 인스턴스 오라클 DB 19.3 에서 19.9로 RU Update) 명품관 2020.11.24 5
31 Oracle EM(Enterprise Manager) 13.4 설치 및 구성 - 1 file 명품관 2020.11.23 6
30 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 5 (DBCA로 Database 생성) file 명품관 2020.11.19 12
29 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 4 (Database Software 설치) file 명품관 2020.11.19 10
28 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 3 (사용할 Disk Group 생성) file 명품관 2020.11.19 31
27 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 2 (Grid Infrastructure) file 명품관 2020.11.19 9
» Oracle 19c RAC 설치 with Oracle Linux 8.2 - 1 (OS 및 스토리지 설정) 명품관 2020.11.14 16
25 ORA-27300, ORA-27301, ORA-27302 Error 와 함께 DB Shutdown - 작성중. Talros 2020.08.28 123
24 ASM 에 spfile 등록 및 삭제 하기 우뽕 2020.07.27 79
23 메뉴얼하게 DB 추가 작업 - GRID 리소스에 DB 추가 작업 우뽕 2020.07.27 67
22 19c RAC - Manual Patch 적용방법 우뽕 2020.05.05 252
21 19c RAC OJVM 패치작업 우뽕 2020.04.22 107
20 19c RAC 2Node 삭제 하기 file 우뽕 2020.04.22 207
19 19c RAC 2Node 설치-11[ dbca ] file 우뽕 2020.04.22 73
18 19c RAC 2Node 설치-10 [ dbca ] file 우뽕 2020.04.22 81
17 19c RAC 2Node 설치-9 [ dbca ] file 우뽕 2020.04.22 39
16 19c RAC 2Node 설치-8 [ Patch ] 우뽕 2020.04.22 108
15 19c RAC 2Node 설치-7 [ db sw ] file 우뽕 2020.04.22 97
14 19c RAC 2Node 설치-6 [ db sw ] file 우뽕 2020.04.22 38
13 19c RAC 2Node 설치-5 [ asmca ] file 우뽕 2020.04.21 64
위로