close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_core.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
Integrate Xen and Lustre on CentOS 5.1
1. 簡介
- 目標 :
編譯具有 lustre 與 Xen 功能的 CentOS 5.1 核心。
- 方法 :
CentOS 5.1 在安裝時, 便會提示是否要直接安裝具有虛擬化功能的核心, 我們可以藉由這個核心開機, 然後再新增 lustre 的相關 kernel 模組即可達到目的.
這個方式較先前要編譯兩次的方式來得簡單也快速許多, 以下是詳細的步驟.
2. 編譯步驟
2.1 使用 yum 安裝所需要的套件 :
2.2 下載所需要的檔案 :
- 2.2.1 lustre-1.6.5
Lustre 自從被 Sun 公司所併購之後,目前最新的套件必須先至 Sun 的網站免費註冊之後才可下載,前往下載。以 lustre-1.6.5 為例,檔案名稱為 lustre-1.6.5.tar.gz。
[root@lustre_xen ~] tar -zxvf lustre-1.6.5.tar.gz
- 2.2.2 linux-2.6.18-53.1.14.el5.tar.bz2
Lustre 自從被 Sun 公司所併購之後,目前最新的套件必須先至 Sun 的網站免費註冊之後才可下載,前往下載。以 lustre-1.6.5 為例,檔案名稱為 linux-2.6.18-53.1.14.el5.tar.bz2
[root@lustre_xen ~] tar -jxvf linux-2.6.18-53.1.14.el5.tar.bz2 -C /usr/src/
- 2.2.3 quilt
[root@lustre_xen ~] wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/5/i386/quilt-0.46-1.el5.i386.rpm
[root@lustre_xen ~] rpm -ivh quilt-0.46-1.el5.i386.rpm
2.3 編譯 lustre 所提供的 kernel
- 2.3.1 說明
接著就可以開始編譯剛剛解壓縮到 /usr/src 的核心檔案,此完整的核心檔案是由 lustre 的官方網站所提供,重要的是它不但具有 xen 相關的程式檔案,
同時也提供了可編譯出具有 xen + lustre 功能模組的設定檔(config/kernel-2.6.18-i686-xen.config),只要將此核心檔案編譯成模組影像檔
(initrd, vmlinuz),然後在開機時讀入此模組,
便可以成為一個具有 lustre + xen 功能的核心了.
- 2.3.2 patch linux-2.6.18-53.1.14
首先,由於 linux-2.6.18-53.1.14 是一個尚未 patch 過 lustre 的核心(Sun網站在下載此檔的地方有附註),因此在編譯之前,我們必須先 patch 這個核心
[root@luxen ~]# cd /usr/src/linux-2.6.18-53.1.14/
[root@luxen linux-2.6.18-53.1.14]# ln -s /root/lustre-1.6.5/lustre/kernel_patches/patches/ .
[root@luxen linux-2.6.18-53.1.14]# ln -s /root/lustre-1.6.5/lustre/kernel_patches/series/2.6-rhel5.series series
- 2.3.3 編譯與安裝
成功 patch 之後,開始進行編譯並且安裝核心模組
[root@luxen linux-2.6.18-53.1.14]# make && make install && make moduels_install
[root@luxen linux-2.6.18-53.1.14]# mkinitrd /boot/initrd-2.6.18-prep.img 2.6.18-prep
- 2.3.4 更改開機檔
修改 /boot/grub/menu.lst 如下
[root@luxen linux-2.6.18-53.1.14]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-prep)
root (hd0,0)
kernel /xen.gz-2.6.18-53.el5
module /vmlinuz-2.6.18-prep ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-prep.img
title CentOS (2.6.18-53.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-53.el5
module /vmlinuz-2.6.18-53.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-53.el5xen.img
- 2.3.5 重新開機
啟動讀入具有 lustre 功能的模組
[root@luxen linux-2.6.18-53.1.14]# reboot
Download in other formats: