① 安装ocfs-tools-1.8

如果是使用RedHat Enterprise Linux 6.4,也可以安装ocfs-tools-1.8的,只是要插入Oracle Linux Server release 6.4的光盘
   yum instll ocfs2-tools   
   会产生以下文件及目录

一、/etc/init.d/o2cb 服务脚本
         二、/etc/ocfs2/ 配置文件路径
         三、/sbin/o2cb

② 使用/etc/init.d/o2cb configure 配置
    /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 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
Loading filesystem "configfs": OK
Mounting configfs filesystem at /sys/kernel/config: OK
Loading stack plugin "o2cb": OK
Loading filesystem "ocfs2_dlmfs": OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
Setting cluster stack "o2cb": OK
Checking O2CB cluster configuration : Failed

最后一个出错,原因在于第五步没有配置

③ fdisk /dev/sdl 分区

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): p

Disk /dev/sdl: 20.5 GB, 20468203520 bytes
64 heads, 32 sectors/track, 19520 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x84f019f9

Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19520, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-19520, default 19520):
Using default value 19520

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

④ 格式化分区,这一步一定要先于第五步执行

mkfs.ocfs2 -b 4k -C 32k -N 2 -L oracle /dev/sdl1

mkfs.ocfs2 1.8.0
Cluster stack: classic o2cb
Overwriting existing ocfs2 partition.
WARNING: Cluster check disabled.
Proceed (y/N): y
Label: oracle
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: 32768 (15 bits)
Volume size: 20468170752 (624639 clusters) (4997112 blocks)
Cluster groups: 20 (tail covers 11775 clusters, rest cover 32256 clusters)
Extent allocator size: 12582912 (3 groups)
Journal size: 127926272
Node slots: 2
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 3 block(s)
Formatting Journals:

⑤ 配置Cluster,主要就是通过命令的方式配置/etc/ocfs2/cluster.conf

o2cb add-cluster ocfs2
   o2cb add-node --ip 192.168.202.10 ocfs2 node1
   o2cb add-node --ip 192.168.202.11 ocfs2 node2
   o2cb add-heartbet ocfs2 /dev/sdl1(做这一步的前提是该设备已经格式化为ocfs2文件系统)
   o2cb register-cluster ocfs2
   (如果不注册的话,始终无法挂载)
   另外还有其他的一些命令:
   o2cb list-cluster ocfs2
   o2cb cluster-status ocfs2
          如果是offline,则表明没做add-heartbet和register-cluster动作

⑥ 添加ocfs2文件系统挂载点   
   mkdir /u01/OCFS_DATA
   修改 /etc/fstab ,增加条目
   /dev/sdl1  /u01/OCFS_DATA ocfs2 _netdev,datavolume,nointr  0  0

mount /dev/sdl1 --立即生效

⑦ 在其他节点,重复①②⑤⑥,③④步骤无需再做,

如果未发现磁盘,可以使用partprobe探测

在Oracle Linux Server release 6.4下配置ocfs2文件系统的更多相关文章

  1. ORACLE Install (10g r2) FOR Red Hat Enterprise Linux Server release 5.5 (64 bit) (转)

    OS Info----------# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 5.5 (Tikanga)# cat ...

  2. zzw原创_Red Hat Enterprise Linux Server release 6.5 安装mysql5.5.28版本

    1.查看系统版本 [root@ip12189 ~]#  more /etc/issueRed Hat Enterprise Linux Server release 6.5 (Santiago)Ker ...

  3. Oracle Linux Server 7安装VMwareTools问题

    OracleLinuxServer7安装VMwareTools问题#./vmware-install.pl时报错:#-bash: ./vmware-instal.pl:/usr/bin/perl:ba ...

  4. redhat Enterprise Linux Server release 7.2(Maipo) 安装redis-stat

    项目需要在rh7.2安装redis-stat,各种编译不过.通过一步步跟踪编译错误日志发现时缺少各种开发库. 需要安装的库列表如下: zlib-devel openssl-devel readline ...

  5. Linux Server release 7.3 更换阿里网络yum源

    查看当前系统下的yum源 [root@localhost ~]# rpm -qa |grep yum yum-3.4.3-150.el7.noarch yum-utils-1.1.31-40.el7. ...

  6. 安装GCC for Red Hat Enterprise Linux Server release 6(64位)

    http://www.cnblogs.com/emanlee/archive/2012/08/11/2633895.html

  7. [Linux]非外网环境下配置lnmp心得

    1.安装gcc编译器 基本所有编译安装包都需要gcc编译器,而且编译安装gcc也需要一个编译器,这是一个悖论.所以,这里只能寻求rpm包安装.但是rpm包需要匹配特定的操作系统内核,所以没有一个通用的 ...

  8. oracle 企业管理器及无线网环境下配置方法

    注意: oracle em 的访问地址在 D:\oracle\product\11.2.0\dbhome_1\install 下的文件里. 如果在windows 安装oracle,并且在本地访问,or ...

  9. Linux ->> Ubuntu 14.04 LTE下配置SSH免密码登录

    首先用apt-get命令安装SSH jerry@ubuntu:~$ sudo apt-get install ssh [sudo] password for jerry: Reading packag ...

随机推荐

  1. (算是dp吧) 小茗的魔法阵 (fzu 2225)

    http://acm.fzu.edu.cn/problem.php?pid=2225   Problem Description 在打败了易基•普罗布朗.诺姆•普罗布朗之后,小茗同学开始挑战哈德•普罗 ...

  2. 元数据集 DatabaseMetaData ResultSetMetaData

  3. git 使用笔记

    git操作: git checkout 分支名称 // 切换分支git branch -a // 查看分支信息和当前分支 git pull // 将服务器所有代码下载到本地git merge orig ...

  4. Neo4j 2.0 M4 发布

    Neo4j 发布了 2.0 的第四个里程碑版本,该版本要求 Java 7 的支持.详细的改进记录请看发行通知. Neo是一个网络——面向网络的数据库——也就是说,它是一个嵌入式的.基于磁盘的.具备完全 ...

  5. 撰写合格的REST API

    原文 : http://mp.weixin.qq.com/s?__biz=MzA3NDM0ODQwMw==&mid=208060670&idx=1&sn=ce67b889698 ...

  6. IIS7 配置

    1.配置应用程序池->高级设置 (1) .net Framework版本 :V4.0 (2)启用32位应用程序 :True (3)特定时间: 上班之前,下班之后 2.网站配置->高级设置 ...

  7. Ubuntu上安装ns2-2.34

    Ubuntu上安装ns2-2.34 步骤1 下载ns-allinone-2.34 $ tar zxf ns-allinone-2.34.tar.gz 步骤2 sudo apt-get install ...

  8. C# 6.0那些事

    这两天期中考试没时间去看Connect();直播,挺可惜的,考完后补看了Connect(); 把C#6.0的新东西总结一下. 自动属性初始化 (Initializers for auto-proper ...

  9. MVC 添加 httpHandlers 支持 .aspx 页面访问

    <?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET ...

  10. javaweb回顾第五篇浅谈会话

    1:什么是会话 通俗来说就是客户和服务器的一次私密谈话,客户发送请求以后服务器能够识别请求是来自同一个客户,他们是1对1的关系. 了解会话以后我们就要去考虑如何去实现这些问题下面一一进行解析 2:会话 ...