配置OCFS2
将在OCFS2文件系统中存放OCR和Voting Disk。
确认已安装OCFS2的RPM包。
删除/etc/ocfs2/cluster.conf文件,否则会在之后报如下错误:
o2cb_ctl: Unable to access cluster service while creating node
在其中一个节点上,以root用户在图形界面运行
选择Cluster->Configure Nodes,名称要和主机名一样,所有节点都要配置。
添加完node,然后Cluster->Propagate Configuration,传输配置文件到所有节点。
配置O2CB
格式化文件系统,只需在一个节点上运行
选择Tasks->Format,按默认值即可,所选择的磁盘不需要事先分区。
挂载到文件系统(以下需要在每个节点上运行)
vi /etc/fstab
配置ASM
配置ASM有两种方法,与裸设备绑定或使用ASMLIB,Oracle建议用ASMLIB。
下载地址:
http://www.oracle.com/technetwork/server-storage/linux/downloads/index-088143.html
安装相关RPM包
为oracleasm配置用户和组,并随系统启动(所有节点)
创建ASM磁盘,只要一个节点上执行
在其他节点上
将在OCFS2文件系统中存放OCR和Voting Disk。
确认已安装OCFS2的RPM包。
点击(此处)折叠或打开
-
rpm -qa | grep ocfs2
-
-
ocfs2-2.6.9-89.0.0.0.1.ELlargesmp-1.2.9-1.el4
-
ocfs2-tools-1.2.7-1.el4
-
ocfs2console-1.2.7-1.el4
-
ocfs2-2.6.9-89.0.0.0.1.ELxenU-1.2.9-1.el4
-
ocfs2-2.6.9-89.0.0.0.1.ELsmp-1.2.9-1.el4
- ocfs2-2.6.9-89.0.0.0.1.EL-1.2.9-1.el4
o2cb_ctl: Unable to access cluster service while creating node
在其中一个节点上,以root用户在图形界面运行
点击(此处)折叠或打开
- ocfs2console
添加完node,然后Cluster->Propagate Configuration,传输配置文件到所有节点。
配置O2CB
点击(此处)折叠或打开
-
/etc/init.d/o2cb unload
- /etc/init.d/o2cb configure
- #选择默认启动Y
-
- #查看o2cb状态
- /etc/init.d/o2cb status
点击(此处)折叠或打开
- ocfs2console
挂载到文件系统(以下需要在每个节点上运行)
vi /etc/fstab
点击(此处)折叠或打开
- /dev/sdc /ocfs ocfs2 _netdev,datavolume,nointr 0 0
点击(此处)折叠或打开
-
mkdir /ocfs
-
mount -a
- mkdir /ocfs/clusterware #第二个以后的节点就无需运行了,下一条也是
- chown -R oracle:dba /ocfs
配置ASM
配置ASM有两种方法,与裸设备绑定或使用ASMLIB,Oracle建议用ASMLIB。
下载地址:
http://www.oracle.com/technetwork/server-storage/linux/downloads/index-088143.html
安装相关RPM包
点击(此处)折叠或打开
-
rpm -qa | grep oracleasm
-
-
oracleasm-2.6.9-89.0.0.0.1.EL-2.0.5-1.el4
-
oracleasmlib-2.0.4-1.el4
-
oracleasm-2.6.9-89.0.0.0.1.ELsmp-2.0.5-1.el4
-
oracleasm-support-2.1.3-1.el4
-
oracleasm-2.6.9-89.0.0.0.1.ELlargesmp-2.0.5-1.el4
- oracleasm-2.6.9-89.0.0.0.1.ELxenU-2.0.5-1.el4
点击(此处)折叠或打开
-
/etc/init.d/oracleasm configure
-
-
Default user to own the driver interface []: oracle
-
Default group to own the driver interface []: dba
-
Start Oracle ASM library driver on boot (y/n) [n]: y
-
Scan for Oracle ASM disks on boot (y/n) [y]: y
-
Writing Oracle ASM library driver configuration: done
-
Initializing the Oracle ASMLib driver: [ OK ]
- Scanning the system for Oracle ASMLib disks: [ OK ]
点击(此处)折叠或打开
-
[root@node1 ~]# /etc/init.d/oracleasm createdisk DATADG1 /dev/sdd1
-
Marking disk "DATADG1" as an ASM disk: [ OK ]
-
[root@node1 ~]# /etc/init.d/oracleasm createdisk DATADG2 /dev/sde1
-
Marking disk "DATADG2" as an ASM disk: [ OK ]
-
[root@node1 ~]# /etc/init.d/oracleasm createdisk DATADG3 /dev/sdf1
- Marking disk "DATADG3" as an ASM disk: [ OK ]
点击(此处)折叠或打开
- [root@node2 ~]# /etc/init.d/oracleasm scandisks
-
Scanning the system for Oracle ASMLib disks: [ OK ]
-
-
[root@node2 ~]# /etc/init.d/oracleasm listdisks
-
DATADG1
-
DATADG2
- DATADG3
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22621861/viewspace-1314518/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22621861/viewspace-1314518/