用DRBD和OCFS2实现数据同步和共享(2)


Install from ELRepo:

# rpm -Uvh
# yum install  install yum-plugin-fastestmirror
# yum search drbd
--------------------------------------------------------------------------------
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.grandcloud.cn
 * elrepo: repos.lax-noc.com
 * extras: mirrors.grandcloud.cn
 * updates: mirrors.grandcloud.cn
================== Matched: drbd =====================
drbd83-utils.i686 : Management utilities for DRBD %{version}
drbd84-utils.i686 : Management utilities for DRBD
kmod-drbd83.i686 : drbd83 kernel module(s)
kmod-drbd84.i686 : drbd84 kernel module(s)
--------------------------------------------------------------------------------

Generally, you need to install two packages suitable to your linux kernel:
# yum install kmod-drbd83;
# yum install drbd83-utils;

────────────────────────────────────────────────────────────────────────────────
Install DRBD utils from ELRepo:
────────────────────────────────────────────────────────────────────────────────
As I use the UEK kernel in this case, there is already drbd module included, so
I only need to install the drbd83-utils package here. First I need to find the
current drbd module version:

# modinfo drbd;
--------------------------------------------------------------------------------
filename:       /lib/modules/2.6.39-200.29.2.el6uek.i686/kernel/drivers/block/drbd/drbd.ko
alias:          block-major-147-*
license:        GPL
version:        8.3.11
description:    drbd - Distributed Replicated Block Device v8.3.11
author:         Philipp Reisner , Lars Ellenberg
srcversion:     DA5A13F16DE6553FC7CE9B2
depends:        lru_cache
vermagic:       2.6.39-200.29.2.el6uek.i686 SMP mod_unload modversions 686
parm:           minor_count:Maximum number of drbd devices (1-256) (uint)
parm:           disable_sendpage:bool
parm:           allow_oos:DONT USE! (bool)
parm:           cn_idx:uint
parm:           proc_details:int
parm:           enable_faults:int
parm:           fault_rate:int
parm:           fault_count:int
parm:           fault_devs:int
parm:           usermode_helper:string
--------------------------------------------------------------------------------

As you can see, the current drbd kernel module version is 8.3.11, so I need to
find and install the corresponding drbd83-utils version package. The source code
offically are available on the oss.linbit.com site:

# wget ;
# cp drbd-8.3.11.tar.gz /root/rpmbuild/SOURCES/
# tar zxvf drbd-8.3.11.tar.gz
# cd drbd-8.3.11/;
# ./autogen.sh
# yum install flex;
# ./configure --enable-spec
# ./configure --with-km --enable-spec; #if you need kernel module;

Note: the kernel module of drbd source code can not compile in UEK kernel.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/629ebe60a358b37b031eb21782d36a2c.html