A) 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을 이용하는 것이 편리합니다.
B) 클러스터 및 노드 추가
클러스터 추가
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
C) 클러스터 스택 설정 및 확인
클러스터 스택 설정
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
D) 클러스터 활성화
클러스터 스택 및 클러스터 활성화
chkconfig o2cb on chkconfig ocfs2 on
[root@rac1 ~]# chkconfig o2cb on [root@rac1 ~]# chkconfig ocfs2 on
E) 리눅스 커널 변수 수정 및 적용
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
F) 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
{}
1 개의 댓글
윤병훈
설정 참조 : https://docs.oracle.com/en/operating-systems/oracle-linux/6/adminsg/ol_instcfg_ocfs2.html