프린트 하기

OS 환경 : Oracle Linux 9.6 (64bit)

 

방법 : Oracle Linux 9 oracle asmlib v3 구성 가이드

본문에서는 Oracle Linux 9.6에 Oracle asmlib(asm library)를 구성하는 방법을 설명함
디스크는 100gb짜리 하나를 마운트 했고 data용, reco용, ocr용 이렇게 크게 3개로 나누어서 asmdisk를 만듬

 

 

참고. asmlib를 이용해 restart 및 rac 구성하는 게시물
Oracle Linux 9.6에 Oracle 19c Restart 설치 가이드 ( https://positivemh.tistory.com/1321 )
Oracle Linux 9.6에 Oracle 19c RAC 설치 가이드 ( https://positivemh.tistory.com/1322 )

 

 

OS 설치는 아래 게시물 참조
Oracle linux 9.6 설치 가이드( https://positivemh.tistory.com/1284 )

 

 

오라클 preinstall rpm 설치

1
2
# curl -o oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm
# dnf -y localinstall oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm

 

 

디스크 1개 추가 마운트 후 확인

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
30
31
# fdisk -l
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x95bec2cc
 
Device     Boot   Start       End   Sectors  Size Id Type
/dev/sda1  *       2048   1050623   1048576  512M 83 Linux
/dev/sda2       1050624 209715199 208664576 99.5G 8e Linux LVM
 
 
Disk /dev/mapper/ol-root: 91.5 GiB, 98243182592 bytes, 191881216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
 
Disk /dev/mapper/ol-swap: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
 
Disk /dev/sdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 4194304 bytes

현재 신규로 100gb 마운트된 디스크는 /dev/sdb임

 

 

fdisk 명령으로 파티션 나누기
각각 primary 파티션 30G, 30G 씩 총 2개, Extended 파티션 20G 1개, Logical 파티션 4G, 4G, 4G 총 3개를 생성하는 명령임
아래 DEVICE에 알맞은 디스크 이름 입력

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# vi fdisk.sh
#!/bin/bash
DEVICE="/dev/sdb"
 
fdisk "$DEVICE" <<'EOF'
o
 
n
p
1
 
+30G
 
n
p
2
 
+30G
 
n
e
3
 
+20G
 
n
l
 
+4G
 
n
l
 
+4G
 
n
l
 
+4G
 
p
w
EOF

 

 

실행권한 부여 후 실행

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# chmod u+x fdisk.sh
# sh fdisk.sh
 
Welcome to fdisk (util-linux 2.37.4).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
 
Command (m for help): Created a new DOS disklabel with disk identifier 0x00dd6752.
 
Command (m for help):
 
Command (m for help): Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (1-4, default 1): First sector (8192-209715199, default 8192): Last sector, +/-sectors or +/-size{K,M,G,T,P} (8192-209715199, default 209715199):
Created a new partition 1 of type 'Linux' and of size 30 GiB.
 
Command (m for help):
 
Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (62922752-209715199, default 62922752): Last sector, +/-sectors or +/-size{K,M,G,T,P} (62922752-209715199, default 209715199):
Created a new partition 2 of type 'Linux' and of size 30 GiB.
 
Command (m for help):
 
Command (m for help): Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (3,4, default 3): First sector (125837312-209715199, default 125837312): Last sector, +/-sectors or +/-size{K,M,G,T,P} (125837312-209715199, default 209715199):
Created a new partition 3 of type 'Extended' and of size 20 GiB.
 
Command (m for help):
 
Command (m for help): Partition type
   p   primary (2 primary, 1 extended, 1 free)
   l   logical (numbered from 5)
Select (default p):
Adding logical partition 5
First sector (125845504-167780351, default 125845504): Last sector, +/-sectors or +/-size{K,M,G,T,P} (125845504-167780351, default 167780351):
Created a new partition 5 of type 'Linux' and of size 4 GiB.
 
Command (m for help):
 
Command (m for help): Partition type
   p   primary (2 primary, 1 extended, 1 free)
   l   logical (numbered from 5)
Select (default p):
Adding logical partition 6
First sector (134242304-167780351, default 134242304): Last sector, +/-sectors or +/-size{K,M,G,T,P} (134242304-167780351, default 167780351):
Created a new partition 6 of type 'Linux' and of size 4 GiB.
 
Command (m for help):
 
Command (m for help): Partition type
   p   primary (2 primary, 1 extended, 1 free)
   l   logical (numbered from 5)
Select (default p):
Adding logical partition 7
First sector (142639104-167780351, default 142639104): Last sector, +/-sectors or +/-size{K,M,G,T,P} (142639104-167780351, default 167780351):
Created a new partition 7 of type 'Linux' and of size 4 GiB.
 
Command (m for help):
 
Command (m for help):
Disk /dev/sdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 4194304 bytes
Disklabel type: dos
Disk identifier: 0x00dd6752
 
Device     Boot     Start       End  Sectors Size Id Type
/dev/sdb1            8192  62922751 62914560  30G 83 Linux
/dev/sdb2        62922752 125837311 62914560  30G 83 Linux
/dev/sdb3       125837312 167780351 41943040  20G  5 Extended
/dev/sdb5       125845504 134234111  8388608   4G 83 Linux
/dev/sdb6       134242304 142630911  8388608   4G 83 Linux
/dev/sdb7       142639104 151027711  8388608   4G 83 Linux
 
Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

정상적으로 디스크 파티션이 나뉘어짐
/dev/sdb1을 DATA, /dev/sdb2를 RECO, /dev/sdb5~7을 ocr vote 영역으로 설정 예정임

 

 

디스크 권한 부여

1
2
3
4
5
6
7
8
9
# chown oracle:dba /dev/sdb*
# ll /dev/sdb*
brw-rw----. 1 oracle dba 8, 16 Dec 23 10:52 /dev/sdb
brw-rw----. 1 oracle dba 8, 17 Dec 23 10:52 /dev/sdb1
brw-rw----. 1 oracle dba 8, 18 Dec 23 10:52 /dev/sdb2
brw-rw----. 1 oracle dba 8, 19 Dec 23 10:52 /dev/sdb3
brw-rw----. 1 oracle dba 8, 21 Dec 23 10:52 /dev/sdb5
brw-rw----. 1 oracle dba 8, 22 Dec 23 10:52 /dev/sdb6
brw-rw----. 1 oracle dba 8, 23 Dec 23 10:52 /dev/sdb7

 

 

asmlib 패키지 설치

1
2
3
4
5
6
7
8
9
10
11
12
# rpm -ivh oracleasm-support-3.1.1-4.el9.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracleasm-support-3.1.1-4.el9    ################################# [100%]
Created symlink /etc/systemd/system/multi-user.target.wants/oracleasm.service → /usr/lib/systemd/system/oracleasm.service.
 
# rpm -ivh oracleasmlib-3.1.1-1.el9.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracleasmlib-3.1.1-1.el9         ################################# [100%]

참고 : 아래 링크에서 다운로드 가능
asm support : https://yum.oracle.com/repo/OracleLinux/OL9/addons/x86_64/index.html
asmlib : https://www.oracle.com/linux/downloads/linux-asmlib-v9-downloads.html

 

 

Oracle ASM 설정 및 시작(oracle, dba, y, y 순서대로 입력)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# oracleasm configure -i
Configuring the Oracle ASM system service.
 
This will configure the on-boot properties of the Oracle ASM system
service.  The following questions will determine whether the service
is started 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 ASM disk devices []: oracle  <-- oracle 입력
Default group to own the ASM disk devices []: dba  <-- dba 입력
Start Oracle ASM system service on boot (y/n) [y]: y  <-- y 입력
Scan for Oracle ASM disks when starting the oracleasm service (y/n) [y]: y  <-- y 입력
Maximum number of ASM disks that can be used on system [2048]:  <-- 엔터 입력
Enable iofilter if kernel supports it (y/n) [y]: y  <-- y 입력
Writing Oracle ASM system service configuration: done
 
Configuration changes only come into effect after the Oracle ASM
system service is restarted.  Please run 'systemctl restart oracleasm'
after making changes.
 
WARNING: All of your Oracle and ASM instances must be stopped prior
to restarting the oracleasm service.

 

 

asmlib 활성화 및 상태 확인

1
2
3
4
5
6
7
8
9
10
11
# systemctl enable --now oracleasm
# oracleasm status
Checking if the oracleasm kernel module is loaded: no (not required with UEK8)
Checking if /dev/oracleasm is mounted: no (not required with UEK8)
Checking which I/O Interface is in use: io_uring (KABI_V3)
Checking if ASMLIB can be loaded: yes
Checking if io_uring is enabled: yes
Checking if io_uring is accessible to the configured DB user: yes
Checking if io_uring supports integrity passthrough: yes
Checking if ASM disks have the correct ownership and permissions: yes
Checking if ASM I/O filter is set up: yes

정상임

 

 

asm 디스크 라벨링

1
2
3
4
5
6
#
oracleasm createdisk DATA /dev/sdb1
oracleasm createdisk RECO /dev/sdb2
oracleasm createdisk OCR_VOTE1 /dev/sdb5
oracleasm createdisk OCR_VOTE2 /dev/sdb6
oracleasm createdisk OCR_VOTE3 /dev/sdb7

 

 

asm 디스크 스캔

1
2
3
4
5
# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Setting up iofilter map for ASM disks: done
Scanning system for ASM disks...

 

 

생성 리스트 확인(5개가 나와야 정상)

1
2
3
4
5
6
# oracleasm listdisks
DATA
OCR_VOTE1
OCR_VOTE2
OCR_VOTE3
RECO

 

 

asm 디스크 라벨링 상세 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# oracleasm querydisk -p DATA
Disk "DATA" is a valid ASM disk
/dev/sdb1: LABEL="DATA" TYPE="oracleasm"
# oracleasm querydisk -p RECO
Disk "RECO" is a valid ASM disk
/dev/sdb2: LABEL="RECO" TYPE="oracleasm"
# oracleasm querydisk -p OCR_VOTE1
Disk "OCR_VOTE1" is a valid ASM disk
/dev/sdb5: LABEL="OCR_VOTE1" TYPE="oracleasm"
# oracleasm querydisk -p OCR_VOTE2
Disk "OCR_VOTE2" is a valid ASM disk
/dev/sdb6: LABEL="OCR_VOTE2" TYPE="oracleasm"
# oracleasm querydisk -p OCR_VOTE3
Disk "OCR_VOTE3" is a valid ASM disk
/dev/sdb7: LABEL="OCR_VOTE3" TYPE="oracleasm"

 

 

asm 디스크 라벨링 상세 확인2

1
2
3
4
5
6
7
8
9
10
# oracleasm querydisk /dev/sdb1
Device "/dev/sdb1" is marked as an ASM disk with the label "DATA"
# oracleasm querydisk /dev/sdb2
Device "/dev/sdb2" is marked as an ASM disk with the label "RECO"
# oracleasm querydisk /dev/sdb5
Device "/dev/sdb5" is marked as an ASM disk with the label "OCR_VOTE1"
# oracleasm querydisk /dev/sdb6
Device "/dev/sdb6" is marked as an ASM disk with the label "OCR_VOTE2"
# oracleasm querydisk /dev/sdb7
Device "/dev/sdb7" is marked as an ASM disk with the label "OCR_VOTE3"

 

 

asm 디스크 라벨링 상세 확인3

1
2
3
4
5
6
7
8
9
# oracleasm discover
Using ASMLIB from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
[ASM Library - Linux, version 3.1.1 (KABI_V3), 2025-07-24 22:50]
 
Discovered disk: ORCL:OCR_VOTE1 [8388608 blocks (4294967296 bytes), blksz 512/512, maxio 4194304 bytes, integrity unsupported]
Discovered disk: ORCL:OCR_VOTE2 [8388608 blocks (4294967296 bytes), blksz 512/512, maxio 4194304 bytes, integrity unsupported]
Discovered disk: ORCL:OCR_VOTE3 [8388608 blocks (4294967296 bytes), blksz 512/512, maxio 4194304 bytes, integrity unsupported]
Discovered disk: ORCL:RECO [62914560 blocks (32212254720 bytes), blksz 512/512, maxio 4194304 bytes, integrity unsupported]
Discovered disk: ORCL:DATA [62914560 blocks (32212254720 bytes), blksz 512/512, maxio 4194304 bytes, integrity unsupported]

 

 

결론 :
본문의 방법을 이용해 asmlib 버전3을 이용해 grid 및 db를 구성할 수 있음
asmlib3 버전부터는 oracleasm createdisk 명령을 수행해도 /dev/oracleasm에 파일이 생기지 않음, 대신 /dev/disk/by-label에 생기는데 이부분을 참고해서 설치해야함
rac의 경우 2번 노드에서 oracleasm listdisk시 바로 디스크가 안보이는 경우 partprobe 명령을 수행해줘야 제대로 보였음
grid 구성시 asm disk를 만드는 부분에서 diskstring는 ORCL:*로 설정하면됨

 

 

참고. asmlib를 이용해 restart 및 rac 구성하는 게시물
Oracle Linux 9.6에 Oracle 19c Restart 설치 가이드 ( https://positivemh.tistory.com/1321 )
Oracle Linux 9.6에 Oracle 19c RAC 설치 가이드 ( https://positivemh.tistory.com/1322 )

 

 

참조 : 

Bug 35578393 - Warnings During Oracle Gateway pg4appc after 19c(19.19) install on ol9 (Doc ID 35578393.8)
19c regular client installation on OL9/RHEL9 using Silent method aborted after relink error "Error in invoking target 'client_sharedlib' of makefile '$ORACLE_HOME/rdbms/lib/ins_rdbms.mk'" (Doc ID 3008635.1)
Requirements for Installing Oracle Database/Client 19c (19.22 or higher) on OL9 or RHEL9 64-bit (x86-64) (Doc ID 2982833.1)
19.x: ./runInstaller failed with " PRVF-7532 : Package "compat-libcap1" is missing on node "(HOSTNAME)" " on OL9/RHEL9 (Doc ID 3018358.1)
19c Database Installation/relink fails with :"Error in invoking target 'libasmclntsh19.ohso libasmperl19.ohso client_sharedlib' of makefile ins_rdbms.mk " (Doc ID 2760289.1)
Primary Note of Linux OS Requirements for Database Server (Doc ID 851598.1)
OL9:ORA-15186: ASMLIB Error Function = [asm_init] [io_uring not permitted for this process] (Doc ID 3108578.1)
ASM and Database Services Not Starting After 19.27 RU Patching (STANDALONE) (Doc ID 3092401.1)
CVU Report PRVE-3155 error (Doc ID 2630514.1)
Wrong DiscoveryString /dev/*: rootupgrade.sh/root.sh hangs (Doc ID 1916106.1)
https://docs.oracle.com/en/database/oracle/oracle-database/19/cwlin/supported-oracle-linux-9-distributions-for-x86-64.html
https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/supported-oracle-linux-9-distributions-for-x86-64.html
https://yum.oracle.com/repo/OracleLinux/OL9/addons/x86_64/index.html
https://www.oracle.com/linux/downloads/linux-asmlib-v9-downloads.html
https://docs.oracle.com/en/operating-systems/oracle-linux/asmlib/
https://dataforum.io/pages/viewpage.action?pageId=5734410
https://dev.to/vahidusefzadeh/installing-oracle-grid-infrastructure-1925-on-oracle-linux-95-using-asmlib-3-4bki
https://blog.purestorage.com/purely-technical/installation-configuration-oracle-asmlib-v3-1-on-oracle-linux-9/
https://positivemh.tistory.com/765
https://positivemh.tistory.com/175
https://positivemh.tistory.com/762
https://positivemh.tistory.com/763
https://positivemh.tistory.com/764
https://positivemh.tistory.com/765
https://positivemh.tistory.com/1321
https://positivemh.tistory.com/1322