RAC 기준으로 설명
오라클 ASM diskgroup 생성 및 disk 추가
※ 선행 작업으로 disk 쪼개고 공유 설정 후 서버에 할당 해줌
여기서는 버추얼 박스로 총 ASM01~05까지 5개를 만들고 서버마다 할당 해줌
-- 쪼개기
H:\Vbox\storage>vboxmanage createmedium --filename ASM01.vdi --size 100 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 519461cf-729c-418f-af0f-0fede3ed646b
H:\Vbox\storage>vboxmanage createmedium --filename ASM02.vdi --size 100 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 3715751b-9226-40b2-95e9-f68698b16a63
H:\Vbox\storage>vboxmanage createmedium --filename ASM03.vdi --size 100 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 1e423ac5-6474-4617-a6e8-8e7b6270593e
H:\Vbox\storage>vboxmanage createmedium --filename ASM04.vdi --size 100 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 361e559f-1efe-4e95-ad13-9ad007149583
H:\Vbox\storage>vboxmanage createmedium --filename ASM05.vdi --size 100 --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: a8432efa-251b-4f1f-8a05-b99d57fbd009
-- 버추얼 박스 관리자에서 각각의 서버에 공유 볼륨을 똑 같은 순서로 할당
-- 공유 디바이스로 설정
H:\Vbox\storage>vboxmanage modifymedium ASM01.vdi --type shareable
H:\Vbox\storage>vboxmanage modifymedium ASM02.vdi --type shareable
H:\Vbox\storage>vboxmanage modifymedium ASM03.vdi --type shareable
H:\Vbox\storage>vboxmanage modifymedium ASM04.vdi --type shareable
H:\Vbox\storage>vboxmanage modifymedium ASM05.vdi --type shareable
====================================
-- 추가한 disk 확인
[root@rac1 dev]# ls -al sd*
brw-rw----. 1 root disk 8, 0 6월 8 16:11 sda
brw-rw----. 1 root disk 8, 1 6월 8 16:11 sda1
brw-rw----. 1 root disk 8, 2 6월 8 16:11 sda2
brw-rw----. 1 root disk 8, 16 6월 8 16:11 sdb
brw-rw----. 1 root disk 8, 17 6월 8 16:11 sdb1
brw-rw----. 1 root disk 8, 32 6월 8 16:11 sdc
brw-rw----. 1 root disk 8, 33 6월 8 16:11 sdc1
brw-rw----. 1 root disk 8, 48 6월 8 16:11 sdd
brw-rw----. 1 root disk 8, 49 6월 8 16:11 sdd1
brw-rw----. 1 root disk 8, 64 6월 8 16:11 sde
brw-rw----. 1 root disk 8, 65 6월 8 16:11 sde1
brw-rw----. 1 root disk 8, 80 6월 8 16:11 sdf
brw-rw----. 1 root disk 8, 81 6월 8 16:11 sdf1
brw-rw----. 1 root disk 8, 96 6월 8 16:11 sdg
brw-rw----. 1 root disk 8, 97 6월 8 16:11 sdg1
brw-rw----. 1 root disk 8, 112 6월 8 16:16 sdh
brw-rw----. 1 root disk 8, 113 6월 8 17:19 sdh1
brw-rw----. 1 root disk 8, 128 6월 8 16:11 sdi
brw-rw----. 1 root disk 8, 144 6월 8 16:11 sdj
brw-rw----. 1 root disk 8, 160 6월 8 16:11 sdk
brw-rw----. 1 root disk 8, 176 6월 8 16:11 sdl
brw-rw----. 1 root disk 8, 192 6월 8 16:11 sdm
-- 파티션 생성
[root@rac1 dev]# fdisk /dev/sdi
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 0x1763f317.
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):
First sector (2048-204799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-204799, default 204799):
Using default value 204799
Partition 1 of type Linux and of size 99 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 dev]# fdisk /dev/sdj
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 0x697410e9.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-204799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-204799, default 204799):
Using default value 204799
Partition 1 of type Linux and of size 99 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 dev]# fdisk /dev/sdk
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 0x0dde1be5.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-204799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-204799, default 204799):
Using default value 204799
Partition 1 of type Linux and of size 99 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 dev]# fdisk /dev/sdl
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 0xd45bb1c8.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-204799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-204799, default 204799):
Using default value 204799
Partition 1 of type Linux and of size 99 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 dev]# fdisk /dev/sdm
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 0x57f6bcbe.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-204799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-204799, default 204799):
Using default value 204799
Partition 1 of type Linux and of size 99 MiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
-- ASM disk 등록
oracleasm createdisk asm01 /dev/sdi1
oracleasm createdisk asm02 /dev/sdj1
oracleasm createdisk asm03 /dev/sdk1
oracleasm createdisk asm04 /dev/sdl1
oracleasm createdisk asm05 /dev/sdm1
-- 그리드 계정에서 접속
sqlplus / as sysasm
set line 200
col path for a30
select group_number, mount_status, path, total_mb
from v$asm_disk where mount_status='CLOSED';
GROUP_NUMBER MOUNT_STATUS PATH TOTAL_MB
------------ --------------------- ------------------------------ ----------
0 CLOSED /dev/oracleasm/disks/ASM03 0
0 CLOSED /dev/oracleasm/disks/ASM01 0
0 CLOSED /dev/oracleasm/disks/ASM05 0
0 CLOSED /dev/oracleasm/disks/ASM02 0
0 CLOSED /dev/oracleasm/disks/ASM04 0
-- disk group 생성
SQL> create diskgroup asmdata external redundancy disk '/dev/oracleasm/disks/ASM01' ;
Diskgroup created.
-- DISK 추가
SQL> create diskgroup asmdata external redundancy disk '/dev/oracleasm/disks/ASM01' ;
Diskgroup created.
SQL> alter diskgroup asmdata add disk '/dev/oracleasm/disks/ASM02' REBALANCE POWER 5;
Diskgroup altered.
SQL> alter diskgroup asmdata add disk '/dev/oracleasm/disks/ASM03' REBALANCE POWER 5;
Diskgroup altered.
alter diskgroup asmdata add disk '/dev/oracleasm/disks/ASM02' REBALANCE POWER 5;
※ REBALANCE POWER : 0부터 1024까지 설정 할 수 있으며 숫자가 높을수록 리밸런스 속도가 빨라지지만
I/O 가 늘어남으로 시스템 상태 사용률이 낮거나 업무시간 이후에 높이는 것 추천!!
SQL> col path for a30
SQL> col name for a14
SQL> select group_number, disk_number, name, mount_status, path, total_mb, free_mb
2 from v$asm_disk
3 order by 1,3;
GROUP_NUMBER DISK_NUMBER NAME MOUNT_STATUS PATH TOTAL_MB FREE_MB
------------ ----------- -------------- --------------------- ------------------------------ ---------- ----------
0 0 CLOSED /dev/oracleasm/disks/ASM05 0 0
1 0 CRS_0000 CACHED /dev/oracleasm/disks/CRS1 1020 760
1 1 CRS_0001 CACHED /dev/oracleasm/disks/CRS2 1020 764
1 2 CRS_0002 CACHED /dev/oracleasm/disks/CRS3 1020 760
1 3 CRS_0003 CACHED /dev/oracleasm/disks/CRS4 1020 816
2 1 DATA2 CACHED /dev/oracleasm/disks/DATA2 50996 47884
2 0 DATA_0000 CACHED /dev/oracleasm/disks/DATA 30716 28820
3 0 FRA_0000 CACHED /dev/oracleasm/disks/FRA 20476 19084
4 0 ASMDATA_0000 CACHED /dev/oracleasm/disks/ASM01 99 79
4 1 ASMDATA_0001 CACHED /dev/oracleasm/disks/ASM02 99 79
4 2 ASMDATA_0002 CACHED /dev/oracleasm/disks/ASM03 99 79
4 3 ASMDATA_0003 CACHED /dev/oracleasm/disks/ASM04 99 79
12 rows selected.
'ORACLE > ADMIN' 카테고리의 다른 글
oracle COMBO OF OJVM RU COMPONENT 12.2.0.1.220118 + 12.2.0.1.220118DBJAN2022RU (패치) (0) | 2023.09.20 |
---|---|
오라클 manual 11G GIPSU 절차 (0) | 2023.09.15 |
ORACLE ASM DISK 삭제(DROP) 정리 (0) | 2023.06.08 |
oracle restart 기동 절차 (0) | 2023.06.02 |
ORACLE ASM DISKGROUP 삭제 (0) | 2023.05.25 |