1:下载ocfs2软件包
http://oss.oracle.com/projects/ocfs2-tools/files/
http://oss.oracle.com/projects/ocfs2/files/
2:安装rpm软件包
3:调试ocfs2
基本操作如下:
$/etc/init.d/o2cb status
$/etc/init.d/o2cb load
$/etc/init.d/o2cb online ocfs2
$/etc/init.d/o2cb offline ocfs2
$/etc/init.d/o2cb unload
IXDBA.NET技术社区
$/etc/init.d/o2cb status
4:格式化磁盘分区为ocfs2
$ su
# mkfs.ocfs2 -b 4K -C 32K -N 4 -L "webdatafile" /dev/sdb5
5:挂载ocfs2文件系统
# mount -t ocfs2 -o datavolume,nointr /dev/sdb5 /webdata
6:可能出现的问题
# /etc/init.d/o2cb online ocfs2
Starting cluster ocfs2: Failed
Cluster ocfs2 created
o2cb_ctl: Configuration error discovered while populating cluster ocfs2. None of its nodes were considered local. A node is considered local when its node name in the configuration maches this machine's host name.
Stopping cluster ocfs2: OK
主机名问题,检查more /etc/ocfs2/cluster.conf以及/etc/hosts文件信息,修改相应的主机名即可,