① 安装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. 解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题

    解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题 本文的实践来源是参照了两个帖子完成的: http://dis ...

  2. (light OJ 1005) Rooks dp

    http://www.lightoj.com/volume_showproblem.php?problem=1005        PDF (English) Statistics Forum Tim ...

  3. 基于VC的声音文件操作(二)

    (二)VC的声音操作 操作声音文件,也就是将WAVE文件打开获取其中的声音数据,根据所需要的声音数据处理算法,进行相应的数学运算,然后将结果重新存储与WAVE格式的文件中去:可以使用CFILE类来实现 ...

  4. sql命令查看,清楚mysql bin日志

    查看二进制日志文件 mysql> SHOW BINLOG EVENTS \G; mysql> SHOW MASTER LOGS; 清除二进制日志文件 mysql> PURGE { M ...

  5. Shiro-多Realm验证

    1.多Realm验证 存在这样一种场景,同一个密码可能在MqSQL中存储,也可能在Oracle中存储,有可能MqSQL中使用的是MD5加密算法,而Oracle使用SHA1加密算法.这就需要有多个Rea ...

  6. Dynamic CRM 2013学习笔记(三)快速创建实体 EntityCreater

    一.实体简介 实体用于在 Microsoft Dynamics CRM 中建立业务数据模型和管理业务数据.例如,可以使用客户.市场活动和事件(案例)等实体跟踪和支持销售.市场营销和服务活动.实体具有一 ...

  7. A memory leak issue with WPF Command Binding

    Background In our application, we have a screen which hosts several tabs. In each tab, it contains a ...

  8. Android开发学习总结(六)—— APK反编译

    学习和开发Android应用有一段时间了,今天写一篇博客总结一下Android的apk文件反编译.我们知道,Android应用开发完成之后,我们最终都会将应用打包成一个apk文件,然后让用户通过手机或 ...

  9. 【译】用Fragment创建动态的界面布局(附Android示例代码)

    原文链接:Building a Dynamic UI with Fragments 为了在Android上创建一个动态和多视图的用户界面,你需要封装UI控件和模块化Activity的行为,以便于你能够 ...

  10. SQL关于日期的查询

    SQL查询某天的记录: datediff(day,[Datetime],'2012-08-03')=0 把Datetime换为你的相应字段: SQL查询今天的记录: datediff(day,[Dat ...