• 검색 결과가 없습니다.

O2CB 드라이버 설정

name = rac2 cluster = ocfs2

cluster:

node_count = 2 name = ocfs2

[root@rac2 etc]#

root 사용자로 로그인하여 아래와 같이 실행

[root@rac1 ~]# /etc/init.d/o2cb unload Stopping O2CB cluster ocfs2: OK Unmounting ocfs2_dlmfs filesystem: OK Unloading module "ocfs2_dlmfs": OK Unmounting configfs filesystem: OK Unloading module "configfs": OK

[root@rac1 ~]# /etc/init.d/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 to start on boot (Enter "none" to clear) [ocfs2]:

Specify heartbeat dead threshold (>=7) [7]: 61 Writing O2CB configuration: OK

Loading module "configfs": OK

Mounting configfs filesystem at /config: OK Loading module "ocfs2_nodemanager": OK Loading module "ocfs2_dlm": OK

Loading module "ocfs2_dlmfs": OK

Mounting ocfs2_dlmfs filesystem at /dlm: OK Starting O2CB cluster ocfs2: OK

[root@rac1 ~]#

rac1 설정 성공 함

--- [root@rac2 ~]# /etc/init.d/o2cb unload 아무것도 안 나옴

[root@rac2 ~]# /etc/init.d/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 to start on boot (Enter "none" to clear) [ocfs2]:

Specify heartbeat dead threshold (>=7) [7]: 61 Writing O2CB configuration: OK

Loading module "configfs": OK Creating directory '/config': OK

Mounting configfs filesystem at /config: OK Loading module "ocfs2_nodemanager": OK Loading module "ocfs2_dlm": OK

Loading module "ocfs2_dlmfs": OK Creating directory '/dlm': OK

Mounting ocfs2_dlmfs filesystem at /dlm: OK Starting O2CB cluster ocfs2: OK

[root@rac2 ~]#

rac2 설정 성공

참고: 파일 시스템의 포맷. 파일 시스템의 포맷, 마운팅을 수행하기 전에, OC2B가 양쪽 node에서 온라인 상태인지 확인합니다.

O2CB heartbeat는 파일 시스템이 mount 되기 전까지 활성화되지 않습니다.

[root@rac1 ~]# /etc/init.d/o2cb status

Module "configfs": Loaded Filesystem "configfs": Mounted Module "ocfs2_nodemanager": Loaded Module "ocfs2_dlm": Loaded

Module "ocfs2_dlmfs": Loaded Filesystem "ocfs2_dlmfs": Mounted

Checking O2CB cluster ocfs2: Online --> 온라인 상태 확인 Checking O2CB heartbeat: Not active

[root@rac1 ~]#

[root@rac2 ~]# /etc/init.d/o2cb status

Module "configfs": Loaded Filesystem "configfs": Mounted Module "ocfs2_nodemanager": Loaded Module "ocfs2_dlm": Loaded

Module "ocfs2_dlmfs": Loaded Filesystem "ocfs2_dlmfs": Mounted

Checking O2CB cluster ocfs2: Online --> 온라인 상태 확인 Checking O2CB heartbeat: Not active

[root@rac2 ~]#

파일 시스템 포맷 작업은 두 node 중 하나에서만 수행합니다.

root 사용자로 rac1에 로그인하여 아래와 같이 실행합니다.

[root@rac2 ~]# ocfs2console

OCFS2 Console: Tasks, Format을 선택합니다.

Format:

Available devices: /dev/sdb1 Volume label: oracle

Cluster size: Auto Number of node slots: 4 Block size: Auto

OCFS2 Console: CTRL-Q를 눌러 종료합니다.

파일 시스템의 마운트. 파일 시스템을 마운트하기 위해, *양쪽 node에서 아래와 같이 명령을 실행합니다.

[root@rac1 ~]# mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /ocfs

[root@rac2 ~]# mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /ocfs

부팅 시에 파일 시스템이 mount 되도록, 양쪽 노드의 /etc/fstab에 아래 라인을 추가해 줍니다.

[root@rac1 ~]# vi /etc/fstab

# This file is edited by fstab-sync - see 'man fstab-sync' for details

LABEL=/ / ext3 defaults 1 1 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 LABEL=/u01 /u01 ext3 defaults 1 2 LABEL=SWAP-sda2 swap swap defaults 0 0

# Beginning of the block added by the VMware software

.host:/ /mnt/hgfs vmhgfs defaults,ttl=5 0 0

# End of the block added by the VMware software

/dev/hdc /media/cdrecorder auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

/dev/fd0 /media/floppy auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

/dev/sdb1 /ocfs ocfs2 _netdev,datavolume,nointr 0 0 -->> 추가 해줌

[root@rac2 ~]# vi /etc/fstab

# This file is edited by fstab-sync - see 'man fstab-sync' for details

LABEL=/ / ext3 defaults 1 1 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 LABEL=/u01 /u01 ext3 defaults 1 2 LABEL=SWAP-sda2 swap swap defaults 0 0

# Beginning of the block added by the VMware software

.host:/ /mnt/hgfs vmhgfs defaults,ttl=5 0 0

# End of the block added by the VMware software

/dev/hdc /media/cdrecorder auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

/dev/fd0 /media/floppy auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

/dev/sdb1 /ocfs ocfs2 _netdev,datavolume,nointr 0 0 ---> 추가 해줌

Oracle Clusterware 디렉토리 생성. OCFS2 파일 시스템에 OCR, Voting Disk가 위치할 디렉토리를 생성.

rac1에서 아래와 같이 작업

[root@rac1 ~]# mkdir /ocfs/clusterware [root@rac1 ~]# chown -R oracle:dba /ocfs

이것으로 OCFS2의 셋업 과정을 완료하였습니다.

*양쪽 node의 공유 클러스터 파일 시스템에서 파일 읽기/쓰기를 수행할 수 있는지 확인 함.

관련 문서