Preparation Enable the Dag repo
Preparation
Enable the Dag repo
rpm -Uhv \
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Enable the Epel repo
rpm -ivh http://download.fedora.redhat.com//pub/epel/5/`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 kernel.org
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.1.tar.bz2
Get the Ceph-0.8 sources package
from: http://ceph.newdream.net/download/
http://ceph.newdream.net/download/ceph-0.8.tar.gz
Proceed
mkdir build_cluster
cd build_cluster
tar xf linux-2.6.29.1.tar.bz2
tar xf ceph-0.8.tar.gz
cp -r ceph-0.8/src/kernel linux-2.6.29.1/fs/ceph
Edit the linux-2.6.29.1/fs/Kconfig file about line 269
—-here —- add the following line ——
source “fs/ceph/Kconfig”
—————————————————
it should looks like
(ignore….)
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”
(ignore…..)
Edit the linux-2.6.29.1/fs/Makefile file and the following line to the end of it.
—-here —- add the following line ——
obj-$(CONFIG_CEPH_FS)   ; += ceph/
—————————————————
make menuconfig
we should find the ceph modules in File Systems-> Network File Systems-> Ceph distributed file system (EXPERIMENTAL)
https://clearspace:8443/clearspace/servlet/JiveServlet/download/1217-1-1138/Picture%2036.png
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
/usr/src/redhat/RPMS/x86_64/kernel-2.6.29.1vceph-3.x86_64.rpm
/usr/src/redhat/SRPMS/kernel-2.6.29.1vceph-3.src.rpm
rpm -ivh /usr/src/redhat/RPMS/x86_64/kernel-2.6.29.1vceph-3.x86_64.rpm
Next we need to generate the initrd for modules.
mkinitrd –without-dmraid /boot/initrd-2.6.29.1vceph 2.6.29.1vceph
edit the /etc/grub.conf add the following lines
—-here —- add the following line ——
title 2.6.29.1-Vcluster
root (hd0,0)
kernel /vmlinuz-2.6.29.1vceph ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.29.1vceph
—————————————————
my /etc/grub.conf looks like
—-here —- Start ——-
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.25)
root (hd0,0)
kernel /vmlinuz-2.6.25 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.25.img
title 2.6.29.1-Vcluster
root (hd0,0)
kernel /vmlinuz-2.6.29.1vceph ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.29.1vceph
—-here —- End ——–
reboot
uname -a
Linux cluster01 2.6.29.1vceph #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