① 安装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. [转]正确使用SQLCipher来加密Android数据库 - 朝野布告

    参考文档:http://www.tuicool.com/articles/eYNFbuA Android本身自带有不加密的数据库SQLite,如果要保存密码之类的敏感数据在本地的话方法一是使用字段加密 ...

  2. 使用ODP.NET一次执行多句SQL语句

    在实际开发的时候有的时候希望一次执行多句SQL语句,又不想使用Transcation的话,可以直接将多句SQL语句拼接起来.例如: var sql = "Begin " + &qu ...

  3. [Xamarin] 關於發出Notification 的大小事 (转帖)

    關於Anroid 的使用者來說,Notification 是一個非常會看到且用到的功能 他可以提醒使用者甚麼東西需要待處理,像是郵件或是會議的提醒等.. 甚至有些APP ,直接使用Notificati ...

  4. 扯扯Java中Finalization的意义

    这是Stack Overflow上关于Finalizetion意义的两段讨论,这两个观点是互为补充的. 观点1: 垃圾回收器(The garbage collector)自动在后台运行(虽然它也可以被 ...

  5. HBase中MVCC的实现机制及应用情况

    MVCC(Multi-Version Concurrent Control),即多版本并发控制协议,广泛使用于数据库系统.本文将介绍HBase中对于MVCC的实现及应用情况. MVCC基本原理 在介绍 ...

  6. ava如何实现系统监控、系统信息收集、sigar开源API的学习(转)

    ava如何实现系统监控.系统信息收集.sigar开源API的学习(转) 转自:http://liningjustsoso.iteye.com/blog/1254584 首先给大家介绍一个开源工具Sig ...

  7. Nginx缓存、压缩配置

    1.缓存配置 只需在http的server模块里配置即可,如: location ~.*\.(jpg|png|gif)$ { expires 30d; } location ~.*\.(css|js) ...

  8. 关于python测试webservice接口的视频分享

    现在大公司非常流行用python做产品的测试框架,还有对于一些快速原型产品的开发也好,很好地支持OO编程,代码易读.Python的更新挺快的,尤其是第三方库. 对于测试人员,代码基础薄弱,用pytho ...

  9. 关于启明星系统(OA系统,预定系统,请假系统等)安全性的说明

    启明星系统推荐是安装在内网里,因此,系统采用了较为简单的身份验证. 事实上,在访问页面时,系统会判断当前cookie的uid是否大于0,如果是,则表示用户已经登录,否则表示未登录. public st ...

  10. LM-Sensors unable to load driver module

    Fix - sort of - for LM-Sensors unable to load driver module In short: In /etc/default/grub set GRUB_ ...