1. 디스크 파티션 작업

파티션명파티션 크기용도
/dev/sdb115GRaw Device 영역으로 세부 분할하여 사용
/dev/sdb25GOCFS2 영역으로 할당하여 Fast Recovery Area로 사용 (OCFS2를 이용한 공유 영역)


A) 디스크 파티션 생성

root 유저로 수행
fdisk /dev/sdb
[root@rac1 ~]# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb

[root@rac1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x71c49a77.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): +15G

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1960-2610, default 1960):
Using default value 1960
Last cylinder, +cylinders or +size{K,M,G} (1960-2610, default 2610):
Using default value 2610

Command (m for help): p

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x71c49a77

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1959    15735636   83  Linux
/dev/sdb2            1960        2610     5229157+  83  Linux

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/sda1  /dev/sda2  /dev/sdb  /dev/sdb1  /dev/sdb2

fdisk 명령어로 Raw Device로 사용할 디스크의 파티션을 생성합니다.

각 프롬프트에서 n → p → 1 → "엔터(기본값 1)" → "+15G" → n → p → 2 → "엔터(기본값 1960)" → "엔터(기본값 2610)" → p → w 를 입력하여 파티션 분할

B) 디스크 파티션 확인

root 유저로 수행
fdisk -l /dev/sdb
[root@rac1 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x71c49a77

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1959    15735636   83  Linux
/dev/sdb2            1960        2610     5229157+  83  Linux

생성한 파티션은 fdisk의 l 옵션으로 확인할 수 있습니다.

2. Raw Device 설정

Raw Device의 이름과 크기는 다음의 표와 같이 분할하여 할당합니다.

논리 볼륨명크기Raw Device 명용도
ocr01300MB/dev/raw/raw1Oracle Cluster Registry 1번
ocr02300MB/dev/raw/raw2Oracle Cluster Registry 2번
vote01300MB/dev/raw/raw3Voting Disk 1번
vote02300MB/dev/raw/raw4Voting Disk 2번
vote03300MB/dev/raw/raw5Voting Disk 3번
system1024MB/dev/raw/raw6system 테이블스페이스
sysaux1024MB/dev/raw/raw7sysaux 테이블스페이스
users1024MB/dev/raw/raw8users 테이블스페이스
temp700MB/dev/raw/raw9temp 테이블스페이스
undotbs11024MB/dev/raw/raw101번 노드 undo 테이블스페이스
undotbs21024MB/dev/raw/raw112번 노드 undo 테이블스페이스
control01100MB/dev/raw/raw12컨트롤파일 1번
control02100MB/dev/raw/raw13컨트롤파일 2번
redo01200MB/dev/raw/raw14리두 로그 1번 그룹
redo02200MB/dev/raw/raw15리두 로그 2번 그룹
redo03200MB/dev/raw/raw16리두 로그 3번 그룹
redo04200MB/dev/raw/raw17리두 로그 4번 그룹
redo05200MB/dev/raw/raw18리두 로그 5번 그룹
redo06200MB/dev/raw/raw19리두 로그 6번 그룹
spfile200MB/dev/raw/raw20파라미터 파일


A) 물리 볼륨 생성

root 유저로 수행
pvcreate /dev/sdb1
[root@rac1 ~]# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created

파티션을 pvcreate 명령어로 물리 볼륨으로 생성합니다.

B) 물리 볼륨 확인

root 유저로 수행
pvdisplay /dev/sdb1
[root@rac1 ~]# pvdisplay /dev/sdb1
  "/dev/sdb1" is a new physical volume of "15.01 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sdb1
  VG Name
  PV Size               15.01 GiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               z91Jgt-E254-UQGX-RMLd-FIzn-npCL-Cjo30R

생성된 물리 볼륨은 pvdisplay 명령어로 확인할 수 있습니다.

C) 볼륨 그룹 생성

root 유저로 수행
vgcreate rac /dev/sdb1
[root@rac1 ~]# vgcreate rac /dev/sdb1
  Volume group "rac" successfully created

vgcreate 명령어로 물리 볼륨을 볼륨 그룹으로 생성합니다.

D) 볼륨 그룹 확인

root 유저로 수행
vgdisplay rac
[root@rac1 ~]# vgdisplay rac
  --- Volume group ---
  VG Name               rac
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               15.00 GiB
  PE Size               4.00 MiB
  Total PE              3841
  Alloc PE / Size       0 / 0
  Free  PE / Size       3841 / 15.00 GiB
  VG UUID               EE23Lq-Ctgg-2JJN-bHw6-sCA3-Ou26-15aFXs

볼륨 그룸은 vgdisplay 명령어로 확인할 수 있습니다.

E) 논리 볼륨 생성

root 유저로 수행
lvcreate -L 300M -n ocr01 rac
lvcreate -L 300M -n ocr02 rac
lvcreate -L 300M -n vote01 rac
lvcreate -L 300M -n vote02 rac
lvcreate -L 300M -n vote03 rac
lvcreate -L 1024M -n system rac
lvcreate -L 1024M -n sysaux rac
lvcreate -L 1024M -n users rac
lvcreate -L 700M -n temp rac
lvcreate -L 1024M -n undotbs1 rac
lvcreate -L 1024M -n undotbs2 rac
lvcreate -L 100M -n control01 rac
lvcreate -L 100M -n control02 rac
lvcreate -L 200M -n redo01 rac
lvcreate -L 200M -n redo02 rac
lvcreate -L 200M -n redo03 rac
lvcreate -L 200M -n redo04 rac
lvcreate -L 200M -n redo05 rac
lvcreate -L 200M -n redo06 rac
lvcreate -L 200M -n spfile rac
[root@rac1 ~]# lvcreate -L 300M -n ocr01 rac
  Logical volume "ocr01" created.
[root@rac1 ~]# lvcreate -L 300M -n ocr02 rac
  Logical volume "ocr02" created.
[root@rac1 ~]# lvcreate -L 300M -n vote01 rac
  Logical volume "vote01" created.
[root@rac1 ~]# lvcreate -L 300M -n vote02 rac
  Logical volume "vote02" created.
[root@rac1 ~]# lvcreate -L 300M -n vote03 rac
  Logical volume "vote03" created.
[root@rac1 ~]# lvcreate -L 1024M -n system rac
  Logical volume "system" created.
[root@rac1 ~]# lvcreate -L 1024M -n sysaux rac
  Logical volume "sysaux" created.
[root@rac1 ~]# lvcreate -L 1024M -n users rac
  Logical volume "users" created.
[root@rac1 ~]# lvcreate -L 700M -n temp rac
  Logical volume "temp" created.
[root@rac1 ~]# lvcreate -L 1024M -n undotbs1 rac
  Logical volume "undotbs1" created.
[root@rac1 ~]# lvcreate -L 1024M -n undotbs2 rac
  Logical volume "undotbs2" created.
[root@rac1 ~]# lvcreate -L 100M -n control01 rac
  Logical volume "control01" created.
[root@rac1 ~]# lvcreate -L 100M -n control02 rac
  Logical volume "control02" created.
[root@rac1 ~]# lvcreate -L 200M -n redo01 rac
  Logical volume "redo01" created.
[root@rac1 ~]# lvcreate -L 200M -n redo02 rac
  Logical volume "redo02" created.
[root@rac1 ~]# lvcreate -L 200M -n redo03 rac
  Logical volume "redo03" created.
[root@rac1 ~]# lvcreate -L 200M -n redo04 rac
  Logical volume "redo04" created.
[root@rac1 ~]# lvcreate -L 200M -n redo05 rac
  Logical volume "redo05" created.
[root@rac1 ~]# lvcreate -L 200M -n redo06 rac
  Logical volume "redo06" created.
[root@rac1 ~]# lvcreate -L 200M -n spfile rac
  Logical volume "spfile" created.

볼륨 그룹에서 논리 볼륨을 lvcreate 명령어로 생성합니다.

각 논리 볼륨을 데이터베이스에서 사용할 크기에 맞게 분할합니다.


F) 논리 볼륨 확인

root 유저로 확인
lvdisplay
[root@rac1 ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/rac/ocr01
  LV Name                ocr01
  VG Name                rac
  LV UUID                2A6pwH-TC3c-ZvEW-gG0x-Optj-cnVh-VvEvGy
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:38 +0900
  LV Status              available
  # open                 0
  LV Size                300.00 MiB
  Current LE             75
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:0

  --- Logical volume ---
  LV Path                /dev/rac/ocr02
  LV Name                ocr02
  VG Name                rac
  LV UUID                5efRaq-GIK5-W3mf-Z65P-ei23-DIJN-WjMBQ3
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:38 +0900
  LV Status              available
  # open                 0
  LV Size                300.00 MiB
  Current LE             75
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:1

  --- Logical volume ---
  LV Path                /dev/rac/vote01
  LV Name                vote01
  VG Name                rac
  LV UUID                mSwKQF-QfFh-zrfz-JLIf-3fph-rKBc-iy5JKy
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:38 +0900
  LV Status              available
  # open                 0
  LV Size                300.00 MiB
  Current LE             75
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:2

  --- Logical volume ---
  LV Path                /dev/rac/vote02
  LV Name                vote02
  VG Name                rac
  LV UUID                XfS7eI-4YqP-DgAM-wEZC-msD0-QCQw-erlZr9
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:38 +0900
  LV Status              available
  # open                 0
  LV Size                300.00 MiB
  Current LE             75
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:3

  --- Logical volume ---
  LV Path                /dev/rac/vote03
  LV Name                vote03
  VG Name                rac
  LV UUID                bPw7UB-ynRH-u4mR-37nV-u91W-bI25-Y0ebRd
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:39 +0900
  LV Status              available
  # open                 0
  LV Size                300.00 MiB
  Current LE             75
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:4

  --- Logical volume ---
  LV Path                /dev/rac/system
  LV Name                system
  VG Name                rac
  LV UUID                30EWd9-7dem-f7m3-K9cX-ht20-otLL-6cJ3Mi
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:39 +0900
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:5

  --- Logical volume ---
  LV Path                /dev/rac/sysaux
  LV Name                sysaux
  VG Name                rac
  LV UUID                wKOofc-aUji-KqbE-lGAW-vmcH-NSW2-CUZrRb
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:39 +0900
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:6

  --- Logical volume ---
  LV Path                /dev/rac/users
  LV Name                users
  VG Name                rac
  LV UUID                iTZHnk-0PLo-uUY3-c4wy-6RWL-b5T8-0MWchs
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:40 +0900
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:7

  --- Logical volume ---
  LV Path                /dev/rac/temp
  LV Name                temp
  VG Name                rac
  LV UUID                DNPNyS-j3IZ-c95S-HZOi-CTSa-0bFe-CorXNh
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:40 +0900
  LV Status              available
  # open                 0
  LV Size                700.00 MiB
  Current LE             175
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:8

  --- Logical volume ---
  LV Path                /dev/rac/undotbs1
  LV Name                undotbs1
  VG Name                rac
  LV UUID                7ulYU2-109x-kkLZ-qKpR-nZXy-P5VD-UdKK05
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:40 +0900
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:9

  --- Logical volume ---
  LV Path                /dev/rac/undotbs2
  LV Name                undotbs2
  VG Name                rac
  LV UUID                FBJ6yJ-mwAM-5G4N-DaHb-03NQ-L70B-StdMbq
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:41 +0900
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:10

  --- Logical volume ---
  LV Path                /dev/rac/control01
  LV Name                control01
  VG Name                rac
  LV UUID                pryjEM-C98N-kDtt-sEJG-1Ioz-0MYe-eLovRw
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:41 +0900
  LV Status              available
  # open                 0
  LV Size                100.00 MiB
  Current LE             25
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:11

  --- Logical volume ---
  LV Path                /dev/rac/control02
  LV Name                control02
  VG Name                rac
  LV UUID                c0OVqY-qBIM-l0Vt-9Uvh-RWnM-pJqU-lcINs1
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:41 +0900
  LV Status              available
  # open                 0
  LV Size                100.00 MiB
  Current LE             25
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:12

  --- Logical volume ---
  LV Path                /dev/rac/redo01
  LV Name                redo01
  VG Name                rac
  LV UUID                Inf829-loyW-81Z9-Qnhk-rlzV-yE2z-cdafKN
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:42 +0900
  LV Status              available
  # open                 0
  LV Size                200.00 MiB
  Current LE             50
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:13

  --- Logical volume ---
  LV Path                /dev/rac/redo02
  LV Name                redo02
  VG Name                rac
  LV UUID                5vt942-Ae1R-CVBf-JUKX-eo5y-ce7N-2j7N1o
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:42 +0900
  LV Status              available
  # open                 0
  LV Size                200.00 MiB
  Current LE             50
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:14

  --- Logical volume ---
  LV Path                /dev/rac/redo03
  LV Name                redo03
  VG Name                rac
  LV UUID                shcaEp-2Hok-VoUL-QAXY-KkHz-j8GW-OQj3Ir
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:42 +0900
  LV Status              available
  # open                 0
  LV Size                200.00 MiB
  Current LE             50
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:15

  --- Logical volume ---
  LV Path                /dev/rac/redo04
  LV Name                redo04
  VG Name                rac
  LV UUID                BUlOLg-7Y53-RfD7-6DxZ-eHFx-M5FW-S76dsj
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:42 +0900
  LV Status              available
  # open                 0
  LV Size                200.00 MiB
  Current LE             50
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:16

  --- Logical volume ---
  LV Path                /dev/rac/redo05
  LV Name                redo05
  VG Name                rac
  LV UUID                ihsSZY-dYBb-VzVP-zfHs-1p7r-wIFW-L6Sldr
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:43 +0900
  LV Status              available
  # open                 0
  LV Size                200.00 MiB
  Current LE             50
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:17

  --- Logical volume ---
  LV Path                /dev/rac/redo06
  LV Name                redo06
  VG Name                rac
  LV UUID                MGspjs-6JcA-vd9f-0fG5-nf48-QNqX-xOKBdq
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:43 +0900
  LV Status              available
  # open                 0
  LV Size                200.00 MiB
  Current LE             50
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:18

  --- Logical volume ---
  LV Path                /dev/rac/spfile
  LV Name                spfile
  VG Name                rac
  LV UUID                188sIa-Ijtj-qy65-QdEE-9yXs-TMg2-XgzyTv
  LV Write Access        read/write
  LV Creation host, time rac1, 2020-09-10 13:28:44 +0900
  LV Status              available
  # open                 0
  LV Size                200.00 MiB
  Current LE             50
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:19

분할 생성된 논리 볼륨은 lvdisplay 명령어로 확인할 수 있습니다.

G) 논리 볼륨을 Raw Device로 변환

root 유저로 vi /etc/rc.d/rc.local 실행 후 추가
raw /dev/raw/raw1 /dev/rac/ocr01
raw /dev/raw/raw2 /dev/rac/ocr02
raw /dev/raw/raw3 /dev/rac/vote01
raw /dev/raw/raw4 /dev/rac/vote02
raw /dev/raw/raw5 /dev/rac/vote03
raw /dev/raw/raw6 /dev/rac/system
raw /dev/raw/raw7 /dev/rac/sysaux
raw /dev/raw/raw8 /dev/rac/users
raw /dev/raw/raw9 /dev/rac/temp
raw /dev/raw/raw10 /dev/rac/undotbs1
raw /dev/raw/raw11 /dev/rac/undotbs2
raw /dev/raw/raw12 /dev/rac/control01
raw /dev/raw/raw13 /dev/rac/control02
raw /dev/raw/raw14 /dev/rac/redo01
raw /dev/raw/raw15 /dev/rac/redo02
raw /dev/raw/raw16 /dev/rac/redo03
raw /dev/raw/raw17 /dev/rac/redo04
raw /dev/raw/raw18 /dev/rac/redo05
raw /dev/raw/raw19 /dev/rac/redo06
raw /dev/raw/raw20 /dev/rac/spfile
[root@rac1 ~]# raw /dev/raw/raw1 /dev/rac/ocr01
/dev/raw/raw1:  bound to major 249, minor 0
[root@rac1 ~]# raw /dev/raw/raw2 /dev/rac/ocr02
/dev/raw/raw2:  bound to major 249, minor 1
[root@rac1 ~]# raw /dev/raw/raw3 /dev/rac/vote01
/dev/raw/raw3:  bound to major 249, minor 2
[root@rac1 ~]# raw /dev/raw/raw4 /dev/rac/vote02
/dev/raw/raw4:  bound to major 249, minor 3
[root@rac1 ~]# raw /dev/raw/raw5 /dev/rac/vote03
/dev/raw/raw5:  bound to major 249, minor 4
[root@rac1 ~]# raw /dev/raw/raw6 /dev/rac/system
/dev/raw/raw6:  bound to major 249, minor 5
[root@rac1 ~]# raw /dev/raw/raw7 /dev/rac/sysaux
/dev/raw/raw7:  bound to major 249, minor 6
[root@rac1 ~]# raw /dev/raw/raw8 /dev/rac/users
/dev/raw/raw8:  bound to major 249, minor 7
[root@rac1 ~]# raw /dev/raw/raw9 /dev/rac/temp
/dev/raw/raw9:  bound to major 249, minor 8
[root@rac1 ~]# raw /dev/raw/raw10 /dev/rac/undotbs1
/dev/raw/raw10: bound to major 249, minor 9
[root@rac1 ~]# raw /dev/raw/raw11 /dev/rac/undotbs2
/dev/raw/raw11: bound to major 249, minor 10
[root@rac1 ~]# raw /dev/raw/raw12 /dev/rac/control01
/dev/raw/raw12: bound to major 249, minor 11
[root@rac1 ~]# raw /dev/raw/raw13 /dev/rac/control02
/dev/raw/raw13: bound to major 249, minor 12
[root@rac1 ~]# raw /dev/raw/raw14 /dev/rac/redo01
/dev/raw/raw14: bound to major 249, minor 13
[root@rac1 ~]# raw /dev/raw/raw15 /dev/rac/redo02
/dev/raw/raw15: bound to major 249, minor 14
[root@rac1 ~]# raw /dev/raw/raw16 /dev/rac/redo03
/dev/raw/raw16: bound to major 249, minor 15
[root@rac1 ~]# raw /dev/raw/raw17 /dev/rac/redo04
/dev/raw/raw17: bound to major 249, minor 16
[root@rac1 ~]# raw /dev/raw/raw18 /dev/rac/redo05
/dev/raw/raw18: bound to major 249, minor 17
[root@rac1 ~]# raw /dev/raw/raw19 /dev/rac/redo06
/dev/raw/raw19: bound to major 249, minor 18
[root@rac1 ~]# raw /dev/raw/raw20 /dev/rac/spfile
/dev/raw/raw20: bound to major 249, minor 19

쉘에서 수행할 경우 서버를 재부팅하게 되면 초기화되므로 /etc/rc.d/rc.local에 등록합니다.

H) Raw Device 소유자, 그룹 및 권한 정의

root 유저로 vi /etc/udev/rules.d/60-raw.rules 추가
ACTION=="add", KERNEL=="raw*", OWNER=="grid", GROUP=="dba", MODE=="0660"
#ACTION=="add", KERNEL=="raw*", OWNER=="oracle", GROUP=="dba", MODE=="0660"

Raw Device 의 소유자, 그룹 및 권한 설정이 재부팅시에도 적용될 수 있도록 rules에 추가합니다.

3. FRA 영역을 위한 OCFS2 설정

A) OCFS2 설치를 위한 Linux Local Yum 설정

외부 인터넷 연결을 하지않고 설치 ISO 이미지로 YUM Repository를 구성하여 yum install을 사용할 수 있도록 설정하는 방법입니다.

디스크 마운트
mount /dev/cdrom /mnt
df | grep mnt
[root@ol6 ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

[root@ol6 ~]# df | grep mnt
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sr0         3976444  3976444         0 100% /mnt

VM에 ISO 파일을 연결하고, cdrom을 디렉토리에 mount 시켜줍니다. 

기존 Repository 파일 정리
mv /etc/yum.repos.d/public-yum-ol6.repo /etc/yum.repos.d/public-yum-ol6.repo.bak
[root@ol6 ~]# mv /etc/yum.repos.d/public-yum-ol6.repo /etc/yum.repos.d/public-yum-ol6.repo.bak

기존에 생성되어 있던 Repository 파일은 모두 이름을 변경하여, 사용하지 않도록 수정합니다.

vi /etc/yum.repos.d/local.repo
[ol6]
name=ol6
baseurl=file:///mnt/
enabled=1
gpgcheck=0
[root@ol6 ~]# cat /etc/yum.repos.d/local.repo
[ol6]
name=ol6
baseurl=file:///mnt/
enabled=1
gpgcheck=0

local.repo라는 Repository 파일을 생성합니다.

Repository 이름과 연결될 디렉토리 등을 입력합니다.

Repository 로딩 및 확인
yum clean all
yum repolist all
[root@ol6 ~]# yum clean all
Loaded plugins: refresh-packagekit, security, ulninfo
Cleaning repos: ol6
Cleaning up Everything

[root@ol6 ~]# yum repolist all
Loaded plugins: refresh-packagekit, security, ulninfo
ol6                                                       | 3.7 kB     00:00 ...
ol6/primary_db                                            | 3.1 MB     00:00 ...
repo id                            repo name                       status
ol6                                ol6                             enabled: 3,864
repolist: 3,864

Repository를 재로딩하면 정상적으로 등록된 것을 확인할 수 있습니다.

B) OCFS2 패키지 설치

OCFS2 관련 패키지 설치
yum install ocfs2-tools ocfs2-tools-devel
[root@rac1 ~]# yum install ocfs2-tools ocfs2-tools-devel
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ocfs2-tools.x86_64 0:1.8.6-2.el6 will be installed
--> Processing Dependency: redhat-lsb for package: ocfs2-tools-1.8.6-2.el6.x86_64
---> Package ocfs2-tools-devel.x86_64 0:1.8.6-2.el6 will be installed
--> Processing Dependency: e2fsprogs-devel for package: ocfs2-tools-devel-1.8.6-2.el6.x86_64
--> Running transaction check
---> Package e2fsprogs-devel.x86_64 0:1.42.8-1.0.2.el6 will be installed
---> Package redhat-lsb.x86_64 0:4.0-7.0.2.el6 will be installed
--> Processing Dependency: redhat-lsb-printing(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64
--> Processing Dependency: redhat-lsb-graphics(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64
--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64
--> Processing Dependency: redhat-lsb-compat(x86-64) = 4.0-7.0.2.el6 for package: redhat-lsb-4.0-7.0.2.el6.x86_64
--> Running transaction check
---> Package redhat-lsb-compat.x86_64 0:4.0-7.0.2.el6 will be installed
---> Package redhat-lsb-core.x86_64 0:4.0-7.0.2.el6 will be installed
--> Processing Dependency: perl-Test-Simple for package: redhat-lsb-core-4.0-7.0.2.el6.x86_64
--> Processing Dependency: perl-CGI for package: redhat-lsb-core-4.0-7.0.2.el6.x86_64
--> Processing Dependency: /usr/bin/pax for package: redhat-lsb-core-4.0-7.0.2.el6.x86_64
---> Package redhat-lsb-graphics.x86_64 0:4.0-7.0.2.el6 will be installed
--> Processing Dependency: libQtXml.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64
--> Processing Dependency: libQtSvg.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64
--> Processing Dependency: libQtSql.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64
--> Processing Dependency: libQtOpenGL.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64
--> Processing Dependency: libQtNetwork.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64
--> Processing Dependency: libQtGui.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64
--> Processing Dependency: libQtCore.so.4()(64bit) for package: redhat-lsb-graphics-4.0-7.0.2.el6.x86_64
---> Package redhat-lsb-printing.x86_64 0:4.0-7.0.2.el6 will be installed
--> Processing Dependency: /usr/bin/lpr for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64
--> Processing Dependency: /usr/bin/lp for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64
--> Processing Dependency: /usr/bin/gs for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64
--> Processing Dependency: /usr/bin/foomatic-rip for package: redhat-lsb-printing-4.0-7.0.2.el6.x86_64
--> Running transaction check
---> Package cups.x86_64 1:1.4.2-74.el6 will be installed
--> Processing Dependency: portreserve for package: 1:cups-1.4.2-74.el6.x86_64
--> Processing Dependency: poppler-utils for package: 1:cups-1.4.2-74.el6.x86_64
---> Package foomatic.x86_64 0:4.0.4-5.el6_7 will be installed
--> Processing Dependency: foomatic-db for package: foomatic-4.0.4-5.el6_7.x86_64
---> Package ghostscript.x86_64 0:8.70-21.el6 will be installed
--> Processing Dependency: urw-fonts >= 1.1 for package: ghostscript-8.70-21.el6.x86_64
--> Processing Dependency: ghostscript-fonts for package: ghostscript-8.70-21.el6.x86_64
---> Package pax.x86_64 0:3.4-10.1.el6 will be installed
---> Package perl-CGI.x86_64 0:3.51-141.el6_7.1 will be installed
---> Package perl-Test-Simple.x86_64 0:0.92-141.el6_7.1 will be installed
---> Package qt.x86_64 1:4.6.2-28.el6_5 will be installed
---> Package qt-x11.x86_64 1:4.6.2-28.el6_5 will be installed
--> Processing Dependency: qt-sqlite(x86-64) = 1:4.6.2-28.el6_5 for package: 1:qt-x11-4.6.2-28.el6_5.x86_64
--> Processing Dependency: phonon-backend(x86-64) >= 4.3 for package: 1:qt-x11-4.6.2-28.el6_5.x86_64
--> Running transaction check
---> Package foomatic-db.noarch 0:4.0-7.20091126.el6 will be installed
--> Processing Dependency: foomatic-db-ppds = 4.0-7.20091126.el6 for package: foomatic-db-4.0-7.20091126.el6.noarch
--> Processing Dependency: foomatic-db-filesystem = 4.0-7.20091126.el6 for package: foomatic-db-4.0-7.20091126.el6.noarch
---> Package ghostscript-fonts.noarch 0:5.50-23.2.el6 will be installed
---> Package phonon-backend-gstreamer.x86_64 1:4.6.2-28.el6_5 will be installed
---> Package poppler-utils.x86_64 0:0.12.4-10.el6 will be installed
--> Processing Dependency: poppler = 0.12.4-10.el6 for package: poppler-utils-0.12.4-10.el6.x86_64
--> Processing Dependency: libpoppler.so.5()(64bit) for package: poppler-utils-0.12.4-10.el6.x86_64
--> Processing Dependency: libopenjpeg.so.2()(64bit) for package: poppler-utils-0.12.4-10.el6.x86_64
---> Package portreserve.x86_64 0:0.0.4-11.el6 will be installed
---> Package qt-sqlite.x86_64 1:4.6.2-28.el6_5 will be installed
---> Package urw-fonts.noarch 0:2.4-11.el6 will be installed
--> Running transaction check
---> Package foomatic-db-filesystem.noarch 0:4.0-7.20091126.el6 will be installed
---> Package foomatic-db-ppds.noarch 0:4.0-7.20091126.el6 will be installed
---> Package openjpeg-libs.x86_64 0:1.3-11.el6 will be installed
---> Package poppler.x86_64 0:0.12.4-10.el6 will be installed
--> Processing Dependency: poppler-data >= 0.4.0 for package: poppler-0.12.4-10.el6.x86_64
--> Running transaction check
---> Package poppler-data.noarch 0:0.4.0-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                      Arch       Version                  Repository
                                                                           Size
================================================================================
Installing:
 ocfs2-tools                  x86_64     1.8.6-2.el6              ol6     540 k
 ocfs2-tools-devel            x86_64     1.8.6-2.el6              ol6     159 k
Installing for dependencies:
 cups                         x86_64     1:1.4.2-74.el6           ol6     2.3 M
 e2fsprogs-devel              x86_64     1.42.8-1.0.2.el6         ol6     221 k
 foomatic                     x86_64     4.0.4-5.el6_7            ol6     250 k
 foomatic-db                  noarch     4.0-7.20091126.el6       ol6     980 k
 foomatic-db-filesystem       noarch     4.0-7.20091126.el6       ol6     3.9 k
 foomatic-db-ppds             noarch     4.0-7.20091126.el6       ol6      19 M
 ghostscript                  x86_64     8.70-21.el6              ol6     4.4 M
 ghostscript-fonts            noarch     5.50-23.2.el6            ol6     589 k
 openjpeg-libs                x86_64     1.3-11.el6               ol6      60 k
 pax                          x86_64     3.4-10.1.el6             ol6      69 k
 perl-CGI                     x86_64     3.51-141.el6_7.1         ol6     209 k
 perl-Test-Simple             x86_64     0.92-141.el6_7.1         ol6     112 k
 phonon-backend-gstreamer     x86_64     1:4.6.2-28.el6_5         ol6     126 k
 poppler                      x86_64     0.12.4-10.el6            ol6     558 k
 poppler-data                 noarch     0.4.0-1.el6              ol6     2.2 M
 poppler-utils                x86_64     0.12.4-10.el6            ol6      73 k
 portreserve                  x86_64     0.0.4-11.el6             ol6      23 k
 qt                           x86_64     1:4.6.2-28.el6_5         ol6     3.9 M
 qt-sqlite                    x86_64     1:4.6.2-28.el6_5         ol6      51 k
 qt-x11                       x86_64     1:4.6.2-28.el6_5         ol6      12 M
 redhat-lsb                   x86_64     4.0-7.0.2.el6            ol6      11 k
 redhat-lsb-compat            x86_64     4.0-7.0.2.el6            ol6     9.9 k
 redhat-lsb-core              x86_64     4.0-7.0.2.el6            ol6      25 k
 redhat-lsb-graphics          x86_64     4.0-7.0.2.el6            ol6      12 k
 redhat-lsb-printing          x86_64     4.0-7.0.2.el6            ol6      11 k
 urw-fonts                    noarch     2.4-11.el6               ol6     3.0 M

Transaction Summary
================================================================================
Install      28 Package(s)

Total download size: 51 M
Installed size: 132 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total                                           105 MB/s |  51 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : 1:qt-4.6.2-28.el6_5.x86_64                                  1/28
  Installing : foomatic-db-filesystem-4.0-7.20091126.el6.noarch            2/28
  Installing : openjpeg-libs-1.3-11.el6.x86_64                             3/28
  Installing : 1:qt-sqlite-4.6.2-28.el6_5.x86_64                           4/28
  Installing : 1:phonon-backend-gstreamer-4.6.2-28.el6_5.x86_64            5/28
  Installing : 1:qt-x11-4.6.2-28.el6_5.x86_64                              6/28
  Installing : perl-CGI-3.51-141.el6_7.1.x86_64                            7/28
  Installing : portreserve-0.0.4-11.el6.x86_64                             8/28
  Installing : urw-fonts-2.4-11.el6.noarch                                 9/28
  Installing : perl-Test-Simple-0.92-141.el6_7.1.x86_64                   10/28
  Installing : poppler-data-0.4.0-1.el6.noarch                            11/28
  Installing : poppler-0.12.4-10.el6.x86_64                               12/28
  Installing : poppler-utils-0.12.4-10.el6.x86_64                         13/28
  Installing : 1:cups-1.4.2-74.el6.x86_64                                 14/28
  Installing : foomatic-db-ppds-4.0-7.20091126.el6.noarch                 15/28
  Installing : foomatic-db-4.0-7.20091126.el6.noarch                      16/28
  Installing : ghostscript-fonts-5.50-23.2.el6.noarch                     17/28
  Installing : ghostscript-8.70-21.el6.x86_64                             18/28
  Installing : foomatic-4.0.4-5.el6_7.x86_64                              19/28
  Installing : pax-3.4-10.1.el6.x86_64                                    20/28
  Installing : redhat-lsb-core-4.0-7.0.2.el6.x86_64                       21/28
  Installing : redhat-lsb-printing-4.0-7.0.2.el6.x86_64                   22/28
  Installing : redhat-lsb-graphics-4.0-7.0.2.el6.x86_64                   23/28
  Installing : redhat-lsb-compat-4.0-7.0.2.el6.x86_64                     24/28
  Installing : redhat-lsb-4.0-7.0.2.el6.x86_64                            25/28
  Installing : ocfs2-tools-1.8.6-2.el6.x86_64                             26/28
  Installing : e2fsprogs-devel-1.42.8-1.0.2.el6.x86_64                    27/28
  Installing : ocfs2-tools-devel-1.8.6-2.el6.x86_64                       28/28
  Verifying  : e2fsprogs-devel-1.42.8-1.0.2.el6.x86_64                     1/28
  Verifying  : redhat-lsb-printing-4.0-7.0.2.el6.x86_64                    2/28
  Verifying  : foomatic-4.0.4-5.el6_7.x86_64                               3/28
  Verifying  : redhat-lsb-core-4.0-7.0.2.el6.x86_64                        4/28
  Verifying  : openjpeg-libs-1.3-11.el6.x86_64                             5/28
  Verifying  : pax-3.4-10.1.el6.x86_64                                     6/28
  Verifying  : ghostscript-8.70-21.el6.x86_64                              7/28
  Verifying  : ghostscript-fonts-5.50-23.2.el6.noarch                      8/28
  Verifying  : 1:qt-x11-4.6.2-28.el6_5.x86_64                              9/28
  Verifying  : 1:cups-1.4.2-74.el6.x86_64                                 10/28
  Verifying  : foomatic-db-filesystem-4.0-7.20091126.el6.noarch           11/28
  Verifying  : poppler-data-0.4.0-1.el6.noarch                            12/28
  Verifying  : poppler-utils-0.12.4-10.el6.x86_64                         13/28
  Verifying  : ocfs2-tools-devel-1.8.6-2.el6.x86_64                       14/28
  Verifying  : foomatic-db-ppds-4.0-7.20091126.el6.noarch                 15/28
  Verifying  : perl-Test-Simple-0.92-141.el6_7.1.x86_64                   16/28
  Verifying  : urw-fonts-2.4-11.el6.noarch                                17/28
  Verifying  : redhat-lsb-graphics-4.0-7.0.2.el6.x86_64                   18/28
  Verifying  : 1:qt-4.6.2-28.el6_5.x86_64                                 19/28
  Verifying  : portreserve-0.0.4-11.el6.x86_64                            20/28
  Verifying  : 1:qt-sqlite-4.6.2-28.el6_5.x86_64                          21/28
  Verifying  : ocfs2-tools-1.8.6-2.el6.x86_64                             22/28
  Verifying  : perl-CGI-3.51-141.el6_7.1.x86_64                           23/28
  Verifying  : poppler-0.12.4-10.el6.x86_64                               24/28
  Verifying  : redhat-lsb-compat-4.0-7.0.2.el6.x86_64                     25/28
  Verifying  : 1:phonon-backend-gstreamer-4.6.2-28.el6_5.x86_64           26/28
  Verifying  : foomatic-db-4.0-7.20091126.el6.noarch                      27/28
  Verifying  : redhat-lsb-4.0-7.0.2.el6.x86_64                            28/28

Installed:
  ocfs2-tools.x86_64 0:1.8.6-2.el6    ocfs2-tools-devel.x86_64 0:1.8.6-2.el6

Dependency Installed:
  cups.x86_64 1:1.4.2-74.el6
  e2fsprogs-devel.x86_64 0:1.42.8-1.0.2.el6
  foomatic.x86_64 0:4.0.4-5.el6_7
  foomatic-db.noarch 0:4.0-7.20091126.el6
  foomatic-db-filesystem.noarch 0:4.0-7.20091126.el6
  foomatic-db-ppds.noarch 0:4.0-7.20091126.el6
  ghostscript.x86_64 0:8.70-21.el6
  ghostscript-fonts.noarch 0:5.50-23.2.el6
  openjpeg-libs.x86_64 0:1.3-11.el6
  pax.x86_64 0:3.4-10.1.el6
  perl-CGI.x86_64 0:3.51-141.el6_7.1
  perl-Test-Simple.x86_64 0:0.92-141.el6_7.1
  phonon-backend-gstreamer.x86_64 1:4.6.2-28.el6_5
  poppler.x86_64 0:0.12.4-10.el6
  poppler-data.noarch 0:0.4.0-1.el6
  poppler-utils.x86_64 0:0.12.4-10.el6
  portreserve.x86_64 0:0.0.4-11.el6
  qt.x86_64 1:4.6.2-28.el6_5
  qt-sqlite.x86_64 1:4.6.2-28.el6_5
  qt-x11.x86_64 1:4.6.2-28.el6_5
  redhat-lsb.x86_64 0:4.0-7.0.2.el6
  redhat-lsb-compat.x86_64 0:4.0-7.0.2.el6
  redhat-lsb-core.x86_64 0:4.0-7.0.2.el6
  redhat-lsb-graphics.x86_64 0:4.0-7.0.2.el6
  redhat-lsb-printing.x86_64 0:4.0-7.0.2.el6
  urw-fonts.noarch 0:2.4-11.el6

Complete!

OCFS2 패키지와 연관된 패키지를 함께 설치하기 위해서는 yum을 이용하는 것이 편리합니다.

C) 클러스터 및 노드 추가

클러스터 추가
o2cb add-cluster <클러스터명>
[root@rac1 ~]# o2cb add-cluster ocfs2


클러스터 노드 추가
o2cb add-node <클러스터명> <노드명> --ip <IP 주소>
[root@rac1 ~]# o2cb add-node ocfs2 rac1 --ip 10.0.5.101
[root@rac1 ~]# o2cb add-node ocfs2 rac2 --ip 10.0.5.102


클러스터 설정 파일 확인
cat /etc/ocfs2/cluster.conf
[root@rac1 ~]# cat /etc/ocfs2/cluster.conf
cluster:
        heartbeat_mode = local
        node_count = 2
        name = ocfs2

node:
        number = 0
        cluster = ocfs2
        ip_port = 7777
        ip_address = 10.0.5.101
        name = rac1

node:
        number = 1
        cluster = ocfs2
        ip_port = 7777
        ip_address = 10.0.5.102
        name = rac2


D) 클러스터 스택 설정 및 확인

클러스터 스택 설정
service o2cb configure
[root@rac1 ~]# service o2cb configure
Configuring the O2CB driver.

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

Load O2CB driver on boot (y/n) [n]: y
Cluster stack backing O2CB [o2cb]:
Cluster to start on boot (Enter "none" to clear) [ocfs2]:
Specify heartbeat dead threshold (>=7) [31]:
Specify network idle timeout in ms (>=5000) [30000]:
Specify network keepalive delay in ms (>=1000) [2000]:
Specify network reconnect delay in ms (>=2000) [2000]:
Writing O2CB configuration: OK
checking debugfs...
Loading filesystem "configfs": OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading stack plugin "o2cb": OK
Loading filesystem "ocfs2_dlmfs": OK
Creating directory '/dlm': OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
Setting cluster stack "o2cb": OK
Registering O2CB cluster "ocfs2": OK
Setting O2CB cluster timeouts : OK


클러스터 스택 상태 확인
service o2cb status
[root@rac1 ~]# service o2cb status
Driver for "configfs": Loaded
Filesystem "configfs": Mounted
Stack glue driver: Loaded
Stack plugin "o2cb": Loaded
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster "ocfs2": Online
  Heartbeat dead threshold: 31
  Network idle timeout: 30000
  Network keepalive delay: 2000
  Network reconnect delay: 2000
  Heartbeat mode: Local
Checking O2CB heartbeat: Not active
Debug file system at /sys/kernel/debug: mounted


E) 클러스터 활성화

클러스터 스택 및 클러스터 활성화
chkconfig o2cb on
chkconfig ocfs2 on
[root@rac1 ~]# chkconfig o2cb on

[root@rac1 ~]# chkconfig ocfs2 on


F) 리눅스 커널 변수 수정 및 적용

vi /etc/sysctl.conf 로 커널 변수 수정
kernel.panic = 30
kernel.panic_on_oops = 1
[root@rac1 ~]# cat /etc/sysctl.conf | grep panic
# oracle-rdbms-server-11gR2-preinstall setting for kernel.panic_on_oops is 1 per Orabug 19212317
kernel.panic_on_oops = 1
kernel.panic = 30


변경된 커널 변수 적용
sysctl -p
[root@rac1 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
kernel.panic = 30
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500


G) OCFS2 볼륨 생성 및 마운트

OCFS2 볼륨 생성
mkfs.ocfs2 -L <볼륨명> /dev/sdb2
[root@rac1 ~]# mkfs.ocfs2 -L fravol /dev/sdb2
mkfs.ocfs2 1.8.6
Cluster stack: classic o2cb
Label: fravol
Features: sparse extended-slotmap backup-super unwritten inline-data strict-journal-super xattr indexed-dirs refcount discontig-bg
Block size: 4096 (12 bits)
Cluster size: 4096 (12 bits)
Volume size: 5354655744 (1307289 clusters) (1307289 blocks)
Cluster groups: 41 (tail covers 17049 clusters, rest cover 32256 clusters)
Extent allocator size: 4194304 (1 groups)
Journal size: 67108864
Node slots: 4
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 2 block(s)
Formatting Journals: done
Growing extent allocator: done
Formatting slot map: done
Formatting quota files: done
Writing lost+found: done
mkfs.ocfs2 successful


OCFS2 볼륨 마운트 및 권한 설정
mkdir /FRA
mount /dev/sdb2 /FRA
chown -R oracle:dba /FRA
[root@rac1 ~]# mkdir /FRA

[root@rac1 ~]# mount /dev/sdb2 /FRA

[root@rac1 ~]# chown -R oracle:dba /FRA

[root@rac1 ~]# chmod -R 770 /FRA

[root@rac1 ~]# ls /FRA
lost+found


vi /etc/fstab 로 자동 마운트 설정
/dev/sdb2               /FRA                ocfs2     _netdev,defaults  0 0


vi /etc/rc.local 로 자동 권한 부여 설정
chown -R oracle:dba /FRA
chmod -R 770 /FRA


  • 레이블 없음