① 安装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. Makefile技术和应用总结

    如何学习和运用Makefile 怎么写Makefile?不想讲太多如何如何做.Makefile这东西,公司让一两个人来负责就好了,否则一定是一锅粥.每次看到招聘广告里说,要求懂Makefile,懂Li ...

  2. [Leetcode][JAVA] Binary Tree Maximum Path Sum

    Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. ...

  3. Hibernate映射之OneToOne(第二篇)

    这是在项目中实际遇到的一个问题,纠结了很久.一开始参考mkyong的 ,两边都写OneToOne ,后来查看了一下项目经理在原来一些模块中的写法. 学习一下: 首先是E-R图:  一个货品可以进行多次 ...

  4. linux tcp协议定时器

    1 连接建立定时器:75秒 2 保活定时器:2小时又10分钟 3 重传定时器:根据RTT计算 4 2MSL定时器:最大报文段存活时间 5 持续定时器

  5. 从C#到Objective-C

    Objective-C 程序设计语言采用特定的语法,来定义类和方法.调用对象的方法.动态地扩展类,以及创建编程接口,来解决具体问题.Objective-C 作为 C 程序设计语言的超集,支持与 C 相 ...

  6. 用c#开发微信 (17) 微活动 3 投票活动 (文本投票)

    前面介绍了微活动<大转盘> 和 <刮刮卡>,这次介绍下微投票,微投票分二种,一种是文本投票, 一种是图片投票.   下面介绍文本投票的详细步骤: 1. 新建文本投票活动     ...

  7. RabbitMQ(四) -- Routing

    RabbitMQ(四) -- Routing `rabbitmq`可以通过路由选择订阅者来发布消息. Bindings 通过下面的函数绑定Exchange与消息队列: channel.queue_bi ...

  8. [JS8] 显示从(0,0)到(0,0)的坐标

    <html> <head> <title>JS Unleashed</title> </head> <body> <SCR ...

  9. jQuery Mobile + HTML5

    最近项目需要,需要构建一个适合手持设备访问的站点,作者从网上查阅了一些资料,本文就是基于此而来. 首先下载jQuery Mobile http://jquerymobile.com/,选择稳定版即可. ...

  10. 不要过早退出循环 while(1){no break}

    我们在尝试新的事物的时候,总是会遇到各种各样的困难,不同的人会在碰壁不同的次数之后退出.用程序员喜欢的话来说就是,我们都在for循环,区别在于你是什么情况下break的.有的人退出阈值高,这是能坚持的 ...