wiki:Xen_Lustre

Version 3 (modified by rock, 16 years ago) (diff)

--

Build Xen & Lustre enabled kernel

  • Our OS: Dbian etch
  • Our Method:先使用xen patch過的kernel 2.6.18,之後在使用debian Lustre團隊的 patch file 來patch,將這新的kernel安裝至系統

1.必要套件

  • Build kernel需要的:
    sudo aptitude install build-essential libncurses5-dev kernal-package
    
  • Xne需要的:
    $ sudo apt-get install iproute bridge-utils python-twisted gcc binutils make zlib1g-dev python-dev transfig bzip2 \
        screen ssh debootstrap libcurl3-dev libncurses5-dev x-dev libsdl1.2-dev bin86 bcc python-pam patch latex-make \
        qemu qemu-launcher qemuctl graphviz graphviz-dev lvm2 libvncserver-dev libjpeg62-dev libjpeg62 gettext python-xml \
        gawk tetex-extra tetex-base openssl libssl-dev mercurial
    
  • Lustre需要的:
    $ sudo aptitude install bzip2 debhelper dpatch libsnmp-dev module-assistant
    
    安裝 libxml
    $ sudo wget http://http.us.debian.org/debian/pool/main/libx/libxml2/libxml2_2.6.27.dfsg-2_i386.deb
    $ sudo dpkg -i libxml2_2.6.27.dfsg-2_i386.deb
    
    安裝 pyxml
    $ sudo wget PyXML-0.8.4.tar.gz
    $ sudo python setup.py build
    $ sudo python setup.py install
    


2.Patch和安裝kernel

  • 下載Xen patch過的2.6.18 kernel和 Xen tar ball
    $ cd /usr/src
    $ sudo wget http://bits.xensource.com/oss-xen/release/3.2.1/xen-3.2.1.tar.gz
    $ sudo tar zxvf xen-3.2.1.tar.gz
    $ sudo hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg
    
    下載Debian Lustre 的 deb 檔 (http://packages.debian.org/source/sid/lustre)
    $ wget http://debian.linux.org.tw/debian/pool/main/l/lustre/linux-patch-lustre_1.6.5-1_all.deb
    $ wget http://debian.linux.org.tw/debian/pool/main/l/lustre/lustre-source_1.6.5-1_all.deb
    $ dpkg -i linux-patch-lustre_1.6.5-1_all.deb lustre-source_1.6.5-1_all.deb
    
    使用Lustre的patch file 來 patch xen kernel
    $ cd linux-2.6.18-xen.hg
    $ sudo ln -s /usr/src/kernel-patches/lustre/series/2.6.18-vanilla.series /usr/src/linux-2.6.18-xen.hg/series
    $ sudo ln -s /usr/src/kernel-patches/lustre/patches/ /usr/src/linux-2.6.18-xen.hg/.
    $ sudo quilt -av push
    


3.Make Xen image

$ cd /usr/src/xen-3.2.1
$ sudo make world
(SCSI disk I/O must build-in)
$ sudo make install
$ sudo update-grub

$ cd /usr/src/linux-2.6.18-xen.hg

$ sudo reboot
(choose xen image to booting)


4.Make Lustre modules

$ cd /usr/src/linux-2.6.18-xen.hg
$ sudo make menuconfig (make config)
$ sudo make -j 5
$ sudo make install
$ sudo make modules_install
$ sudo update-grub
$ sudo reboot
(choose new kernel booting)
$ cd /usr/src
$ sudo tar jxvf lustre.tar.bz2
$ cd module/lustre
$ sudo ./configure -with--linux=/usr/src/linux-2.6.18-xen.hg
$ sudo make
$ sudo make install


5.Test Xen & Lustre

startup xen 
$ sudo xend start
$ sudo xm list

startup Lustre
$ sudo modprobe ldiskfs
$ sudo modprob lnet networks=tcp
$ sudo vim /etc/modules
lnet networks=tcp

$ sudo mkfs.lustre --fsname=testfs --mdt --mgs /dev/sdb1


Attachments (3)