Posted
Filed under Computer/HPC
Lustre는 병렬 파일시스템으로 많이 각광을 받고 있는 파일 시스템이다.
내 홈페이지에 올렸던글을 내 홈페이지에서는 찾기가 힘들다는 평을 많이 받아 Lustre설치 방법과
테스트 방법을 간단히 올려본다.
아마 아래 방법대로 따라면 하면 뭔가 되긴 될것이다. 그외 많은 정보가 있다....
지금은 내가 알고 있는 버전으로는 1.6.5이상이 있는것으로 알고 있다.
찾기 어려워 하시는 분들을위해 잘 되었던 글을 하나 내 홈페이지에서 블로그로 옮겨본다.
필요하신분은 힌트가 되기를 바라며...
   
설치 OS: SuSE Ent. 9 & SuSE Ent. 10
kernel : 2.6.x
System : 설치 테스트 장비는 두대
VMWare W/S 5.x (CPU : AMD Turio 64)
조립 PC: AMD Athlon 64 (dual core)


lustre 용으로 패치된 kernel source와 lustre 파일을 다운 받는다.

kernel : kernel-source-2.6.16-27_0.6_lustre.1.4.9.1.x86_64.rpm
lustre : lustre-source-1.4.9.1-2.6.16_27_0.6_lustre.1.4.9.1smp.x86_64.rpm

이 두 파일을 lustre 사이트에서 다운받는다.
그리고 설치한다.

rpm -Uhv kernel-source-2.6.16-27_0.6_lustre.1.4.9.1.x86_64.rpm
rpm -Uhv lustre-source-1.4.9.1-2.6.16_27_0.6_lustre.1.4.9.1smp.x86_64.rpm

kernel compile:
cd /usr/src/
ln -s linux-2.6.16-27-0.6_lustre.1.4.9.1 linux
cd linux
vi Makefile
-----------------------------------------------------------------
EXTRAVERSION = -27-0.6_lustre.1.4.9.1custorm
to
EXTRAVERSION = -27-0.6_lustre.1.4.9.1c1
------------------------------------------------------------------
make mrproper
make menuconfig -------> system에 맞도록 환경 설정하여 컴파일
( ext3는 환경설정되어 있는대로 설정한다. 가능하면 환경설정은 되어 있는것을 유지하되 꼭 안써도되는 몇몇개만 삭제하여준다. )

make
make modules_install
make install

vi /boot/grub/menu.lst <------------- 정확하게 lustre로 부팅가능하게 되어 있는지 확인한다.

시스템 재가동으로 lustre kernel로 올린다.

lustre 컴파일하기 1) lustre를 다른 디렉토리에 설치하기

cd /usr/src/lustre-1.4.9.1/
./configure --prefix=/usr/local/lustre --enable-mpitests --enable-quota
( --enable-mpitests 옵션을 넣으면 error가 난다. 이 옵션은 아직 어떻게 해야 해결할수 있는지 찾지 못했다. )

make
make check
make install
cd /lib/modules/`uname -r`
depmod -a <------- 이것을 하지 않으면 lustre 모듈을 올릴때 에러가 난다. 꼭 해줘야한다.

lustre를 위한 환결설정
----------------------------------------------------------
export LUSTRE=/usr/local/lustre
export PATH=${PATH}:${LUSTRE}/bin:${LUSTRE}/sbin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LUSTRE}/lib
export MANPATH=${MANPATH}:${LUSTRE}/man
-----------------------------------------------------------
이 환경을 로딩한다.

cd /usr/lib
이곳에서 관련 library를 링크를 걸어준다. 아래처럼
lrwxrwxrwx 1 root root 33 Apr 1 20:51 liblustre.a -> /usr/local/lustre/lib/liblustre.a
lrwxrwxrwx 1 root root 34 Apr 1 20:51 liblustre.so -> /usr/local/lustre/lib/liblustre.so
lrwxrwxrwx 1 root root 36 Apr 1 20:51 liblustreapi.a -> /usr/local/lustre/lib/liblustreapi.a
lrwxrwxrwx 1 root root 33 Apr 1 20:51 libptlctl.a -> /usr/local/lustre/lib/libptlctl.a
lrwxrwxrwx 1 root root 32 Apr 1 20:51 libsysio.a -> /usr/local/lustre/lib/libsysio.a
lrwxrwxrwx 1 root root 28 Apr 1 20:52 lustre -> /usr/local/lustre/lib/lustre

cd /etc/init.d/
vi lustre
------------------------------------------------------------
: ${LUSTRE_CONFIG_XML:=/etc/lustre/config.xml}
: ${LCONF:=/usr/sbin/lconf}
: ${LCTL:=/usr/sbin/lctl}

# Be sure the proper directories are in PATH.
export PATH="/sbin:$PATH"

start() {
if [ -x "/usr/sbin/clustat" -a "${SERVICE}" = "lustre" ] ; then
if [ ! -f "/etc/lustre/start-despite-clumanager" ] ; then
cat >&2 <
to

: ${LUSTRE_CONFIG_XML:=/etc/lustre/config.xml}
: ${LCONF:=/usr/local/lustre/sbin/lconf}
: ${LCTL:=/usr/local/lustre/sbin/lctl}

# Be sure the proper directories are in PATH.
export PATH="/usr/local/lustre/sbin:$PATH"

start() {
if [ -x "/usr/local/lustre/sbin/clustat" -a "${SERVICE}" = "lustre" ] ; then
if [ ! -f "/etc/lustre/start-despite-clumanager" ] ; then
cat >&2 < --------------------------------------------------------------------------------------------------
mkdir /etc/lustre

cd /usr/local/lustre/share/lustre/example
NAME=local sh local.sh <-------------- local.xml 환경설정 생성

ln -s /usr/local/lustre/share/lustre/example/local.xml <------------ /etc/init.d/lustre 가 사용하는 환경이므로 링크를 걸어줌.

lconf --write-conf local.xml <------lustre config system에 적용
lconf -v local.xml <---------lustre start

/etc/init.d/lustre stop <--------- lustre stop
/etc/init.d/lustre start <---------- lustre mount


lustre 컴파일하기 2) lustre를 /usr 에 설치(default 위치)
make & make check & make install
cd /lib/modules/`uname -r`
depmod -a
cd /usr/share/lustre/example
NAME=local sh local.sh
lconf --write-conf local.xml
lconf -v local.xml

mkdir /etc/lustre
cd /etc/lustre
ln -s /usr/share/lustre/example/local.xml
/etc/init.d/lustre stop
/etc/init.d/lustre start

이렇게하면 잘된다.
df -k
/mnt/lustre에 약 400MB정도가 마운트된다.

local.sh 또는 기타 sample용 shell을 수정해서 돌리면 잘된다.
/etc/init.d/lustre는 xml파일을 올리고 내릴때만 쓰면된다. 즉, system 부팅할때 사용하는것이다.


cep
2007-04-01 21:27:41
2008/11/03 18:33 2008/11/03 18:33
[로그인][오픈아이디란?]