headermask image

header image

OCFS2 Installation

OCFS2 (Oracle Cluster File System 2)是由Oracle开发的通用集群文件系统,是一个以GPLv2许可发布的开放源代码项目。由于OCFS2是Cluster-aware的,所以很自然的可以作为RAC的存储的选择之一(其他的选择还有裸设备和ASM)。但是必须指出的是,Oracle home和datafile(还有redo log,archive log,control file,以及Clusterware的OCR和Voting Disks)不能放在同一个OCFS2 volume上。
最近尝试了一下将Oracle Clusterware 11gR1的OCR和VD放在OCFS2上,这里记录一下OCFS2的安装过程。
首先是确定所使用的Linux的发行版本(distribution),内核版本(version)和风格(flavor),处理器架构:
# cat /etc/redhat-release
Enterprise Linux Enterprise Linux AS release 4 (October Update 5)
# uname -r
2.6.9-67.0.4.0.2.ELsmp
# uname -p
i686
可以看到这里我使用的是Oracle Enterprise Linux 4u5(可以认为是等同于Red Hat Enterprise Linux 4u5),内核版本是2.6.9-67.0.4.0.2,内核风格是smp,处理器架构是i686(也就是x86)。
接下来按照上面的信息去下载相应的OCFS2和OCFS2 Tools(包括ocfs2-tools和ocfs2console)的RPM包。
# wget -c http://oss.oracle.com/projects/ocfs2/dist/files/RedHat/RHEL4/i386/1.2.9-1/2.6.9-67.0.4.EL/ocfs2-2.6.9-67.0.4.ELsmp-1.2.9-1.el4.i686.rpm
# wget -c http://oss.oracle.com/projects/ocfs2-tools/dist/files/RedHat/RHEL4/i386/1.2.7-1/ocfs2-tools-1.2.7-1.el4.i386.rpm
# wget -c http://oss.oracle.com/projects/ocfs2-tools/dist/files/RedHat/RHEL4/i386/1.2.7-1/ocfs2console-1.2.7-1.el4.i386.rpm
删除掉现有的老版本的OCFS2相关RPM包:
# rpm -qa | grep ocfs | xargs rpm -e
依次安装刚刚下载的3个RPM:
# [...]

Mysterious storage

Veritas Storage Foundation for Oracle RAC
OCFS2
Open-iSCSI
A discussion on OCFS, OCFS2, ASM, RAW

DO BACKUP your OCR before making a change to RAC

Learnt this lesson during recent testing.
In 10gR2, we can use:
ocrconfig -export <filename> [-s online]
to export OCR contents to a file.
And use:
ocrconfig -import <filename>
to import OCR contents from a file.

9iR2 Real Application Clusters Glossary

Cache Coherency
The synchronization of data in multiple caches so that reading a memory location through any cache will return the most recent data written to that location through any other cache. Sometimes called cache consistency.
Cache Fusion
A diskless cache coherency mechanism in Real Application Clusters that provides copies of blocks directly from a holding instance’s memory [...]