Enable the Dag repo

rpm -Uhv \

Enable the Epel repo

rpm -ivh`uname -i`/epel-release-`cut -d” ” /etc/redhat-release -f 3 |awk -F”.” ‘{print $1}’`-`cut -d” ” /etc/redhat-release -f 3 |awk -F”.” ‘{print $2}’`.noarch.rpm

Install the gcc and other tools

yum install -y make gcc gcc-c++ ncurses-devel.x86_64 automake autoconf boost-devel.x86_64 libedit-devel.x86_64 fuse-devel.x86_64 rpm-build.x86_64

Get the kernel source from

Get the Ceph-0.8 sources package



mkdir build_cluster

cd build_cluster

tar xf linux-

tar xf ceph-0.8.tar.gz

cp -r ceph-0.8/src/kernel linux-

Edit the linux- file about line 269

—-here —- add the following line ——

source “fs/ceph/Kconfig”


it should looks like


source “net/sunrpc/Kconfig”

source “fs/smbfs/Kconfig”

source “fs/ceph/Kconfig” #add for ceph

source “fs/cifs/Kconfig”

source “fs/ncpfs/Kconfig”

source “fs/coda/Kconfig”


Edit the linux- file and the following line to the end of it.

—-here —- add the following line ——

obj-$(CONFIG_CEPH_FS) &nbsp ; += ceph/


make menuconfig

we should find the ceph modules in File Systems-> Network File Systems-> Ceph distributed file system (EXPERIMENTAL)


we are compile a kernel for server, so there are some uneed modules, like sound, wireless, and others

the config we used here is the attachment

make rpm

we will get the new kernel



rpm -ivh /usr/src/redhat/RPMS/x86_64/kernel-

Next we need to generate the initrd for modules.

mkinitrd –without-dmraid /boot/initrd-

edit the /etc/grub.conf add the following lines

—-here —- add the following line ——


root (hd0,0)

kernel /vmlinuz- ro root=/dev/VolGroup00/LogVol00

initrd /initrd-


my /etc/grub.conf looks like

—-here —- Start ——-





title CentOS (2.6.25)

root (hd0,0)

kernel /vmlinuz-2.6.25 ro root=/dev/VolGroup00/LogVol00

initrd /initrd-2.6.25.img


root (hd0,0)

kernel /vmlinuz- ro root=/dev/VolGroup00/LogVol00

initrd /initrd-

—-here —- End ——–


uname -a

Linux cluster01 #3 SMP Tue Jun 2 17:59:22 CST 2009 x86_64 x86_64 x86_64 GNU/Linux

[root@cluster01 cluster]# modprobe ceph

[root@cluster01 cluster]# lsmod grep ceph

ceph &nbs p; 327920 0