버추얼박스 사용
vboxmanage createmedium --filename IMSI1.vdi --size 1024 --format VDI --variant Fixed
vboxmanage createmedium --filename IMSI2.vdi --size 1024 --format VDI --variant Fixed
vboxmanage createmedium --filename IMSI3.vdi --size 1024 --format VDI --variant Fixed
공유 및 서버에 할당
vboxmanage modifymedium IMSI1.vdi --type shareable
vboxmanage modifymedium IMSI2.vdi --type shareable
vboxmanage modifymedium IMSI3.vdi --type shareable
[root@rac2 ~]# fdisk -l
Disk /dev/sdj: 1073 MB, 1073741824 bytes, 2097152 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/sdi: 1073 MB, 1073741824 bytes, 2097152 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/sdh: 1073 MB, 1073741824 bytes, 2097152 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
fdisk /dev/sdh
[root@rac2 ~]# fdisk /dev/sdh
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 0x853b6083.
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-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.
.
.
.
fdisk /dev/sdi
fdisk /dev/sdj
ASM 디스크 생성
[root@rac2 ~]# oracleasm createdisk IMSI1 /dev/sdh1
Writing disk header: done
Instantiating disk: done
[root@rac2 ~]# oracleasm createdisk IMSI2 /dev/sdi1
Writing disk header: done
Instantiating disk: done
[root@rac2 ~]# oracleasm createdisk IMSI3 /dev/sdj1
Writing disk header: done
Instantiating disk: done
-- RAC 모든 노드에서 실행1,2
[root@rac1 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "IMSI3"
Instantiating disk "IMSI2"
Instantiating disk "IMSI1"
[root@rac2 ~]# oracleasm listdisks
CRS1
CRS2
CRS3
DATA
DATA2
FRA
IMSI1
IMSI2
IMSI3
[root@rac2 ~]# kfod ds=true disks=all group=diskgroup
--------------------------------------------------------------------------------
Disk Size Path Disk Group User Group
================================================================================
1: 1023 MB /dev/oracleasm/disks/CRS1 CRS oracle asmadmin
2: 1023 MB /dev/oracleasm/disks/CRS2 CRS oracle asmadmin
3: 1023 MB /dev/oracleasm/disks/CRS3 CRS oracle asmadmin
4: 30719 MB /dev/oracleasm/disks/DATA DATA oracle asmadmin
5: 50999 MB /dev/oracleasm/disks/DATA2 DATA oracle asmadmin
6: 20479 MB /dev/oracleasm/disks/FRA FRA oracle asmadmin
7: 1023 MB /dev/oracleasm/disks/IMSI1 # oracle asmadmin
8: 1023 MB /dev/oracleasm/disks/IMSI2 # oracle asmadmin
9: 1023 MB /dev/oracleasm/disks/IMSI3 # oracle asmadmin
KFOD returned no data
디스크그룹 생성
/dev/oracleasm/disks/IMSI1 , /dev/oracleasm/disks/IMSI2 2개 추가
SQL> create diskgroup IMSI external redundancy disk '/dev/oracleasm/disks/IMSI1','/dev/oracleasm/disks/IMSI2';
Diskgroup created.
SQL> set linesize 200
SQL> set pages 100
SQL> col disk_group_name for a15
SQL> col disk_path for a40
SQL> col disk_name for a20
SQL> col disk_fail_group for a20
SQL>
SQL> SELECT
2 NVL(a.name, '[CANDIDATE]') disk_group_name ,
3 b.path disk_path ,
4 b.name disk_name ,
5 b.failgroup disk_fail_group ,
6 b.os_mb
7 FROM
8 v$asm_diskgroup a,
9 v$asm_disk b
10 WHERE
11 a.group_number(+) = b.group_number
12 ORDER BY
13 a.name,
14 b.name,
15 b.path;
DISK_GROUP_NAME DISK_PATH DISK_NAME DISK_FAIL_GROUP OS_MB
--------------- ---------------------------------------- -------------------- -------------------- ----------
CRS /dev/oracleasm/disks/CRS1 CRS_0000 CRS_0000 1023
CRS /dev/oracleasm/disks/CRS3 CRS_0001 CRS_0001 1023
CRS /dev/oracleasm/disks/CRS2 CRS_0002 CRS_0002 1023
DATA /dev/oracleasm/disks/DATA2 DATA2 DATA2 50999
DATA /dev/oracleasm/disks/DATA DATA_0000 DATA_0000 30719
FRA /dev/oracleasm/disks/FRA FRA_0000 FRA_0000 20479
IMSI /dev/oracleasm/disks/IMSI1 IMSI_0000 IMSI_0000 1023
IMSI /dev/oracleasm/disks/IMSI2 IMSI_0001 IMSI_0001 1023
[CANDIDATE] /dev/oracleasm/disks/IMSI3 1023
9 rows selected.
디스크그룹에 추가
SQL> alter diskgroup IMSI add disk '/dev/oracleasm/disks/IMSI3' rebalance power 1024;
SQL> set linesize 200
SQL> set pages 100
SQL> col disk_group_name for a15
SQL> col disk_path for a40
SQL> col disk_name for a20
SQL> col disk_fail_group for a20
SQL>
SQL> SELECT
2 NVL(a.name, '[CANDIDATE]') disk_group_name ,
3 b.path disk_path ,
4 b.name disk_name ,
5 b.failgroup disk_fail_group ,
6 b.os_mb
7 FROM
8 v$asm_diskgroup a,
9 v$asm_disk b
10 WHERE
11 a.group_number(+) = b.group_number
12 ORDER BY
13 a.name,
14 b.name,
15 b.path;
DISK_GROUP_NAME DISK_PATH DISK_NAME DISK_FAIL_GROUP OS_MB
--------------- ---------------------------- ------------ ----------------- ----------
CRS /dev/oracleasm/disks/CRS1 CRS_0000 CRS_0000 1023
CRS /dev/oracleasm/disks/CRS3 CRS_0001 CRS_0001 1023
CRS /dev/oracleasm/disks/CRS2 CRS_0002 CRS_0002 1023
DATA /dev/oracleasm/disks/DATA2 DATA2 DATA2 50999
DATA /dev/oracleasm/disks/DATA DATA_0000 DATA_0000 30719
FRA /dev/oracleasm/disks/FRA FRA_0000 FRA_0000 20479
IMSI /dev/oracleasm/disks/IMSI1 IMSI_0000 IMSI_0000 1023
IMSI /dev/oracleasm/disks/IMSI2 IMSI_0001 IMSI_0001 1023
IMSI /dev/oracleasm/disks/IMSI3 IMSI_0002 IMSI_0002 1023
9 rows selected.
[root@rac2 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.chad
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.net1.network
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.ons
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 ONLINE OFFLINE STABLE
ora.CRS.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.FRA.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.IMSI.dg(ora.asmgroup)
1 OFFLINE OFFLINE STABLE
2 OFFLINE OFFLINE STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE rac2 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE rac2 STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE rac1 Started,STABLE
2 ONLINE ONLINE rac2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
.............................................
--------------------------------------------------------------------------------
[root@rac2 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 ONLINE OFFLINE STABLE
ora.CRS.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.FRA.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
.............................................
--------------------------------------------------------------------------------
[root@rac1 ~]# srvctl start diskgroup -g IMSI -n rac1
완료
[root@rac2 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.chad
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.net1.network
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.ons
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 ONLINE OFFLINE STABLE
ora.CRS.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.FRA.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.IMSI.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
'ORACLE > ADMIN' 카테고리의 다른 글
oracle 12C allow_group_access_to_sga (0) | 2024.03.27 |
---|---|
12C 이상에서 오라클 로그 위치 (0) | 2024.03.22 |
ASM 디스크 그룹 삭제 방법 (0) | 2024.02.22 |
oracle autoupgrade 12C -> 19C 업그레이드 방법 (0) | 2024.02.08 |
single to rac 방법 (0) | 2024.01.29 |