[RHEL 4U4] [最小] 安装Lustre 1.6

本例采用RPM安装
安装Source前提是安装有gcc,参见 gcc安装。
本文参考 Lustre文件系统配置
注意: 必须安装source rpm,否则在lmc配置时会提示找不到模块 libcfs

#安装Lustre启动需要得内核patch
rpm -ivh kernel-lustre-smp-2.6.9-42.EL_lustre.1.5.95.i686.rpm
kernel-lustre-source-2.6.9-42.EL_lustre.1.5.95.i686.rpm

#更改/etc/grub.conf
#注视掉原内核引导信息,以Lustre内核引导启动。
title Red Hat Enterprise Linux AS (2.6.9-42.0.2.EL_lustre.1.4.7.1smp)
        root (hd0,0)
        kernel boot/vmlinuz-2.6.9-42.0.2.EL_lustre.1.4.7.1smp ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.9-42.0.2.EL_lustre.1.4.7.1smp.img
#title Red Hat Enterprise Linux AS (2.6.9-42.EL)
#       root (hd0,0)
#       kernel /boot/vmlinuz-2.6.9-42.EL ro root=LABEL=/1 rhgb quiet
#       initrd /boot/initrd-2.6.9-42.EL.img


#重新启动系统,uname –r查看是否使用Lustre内核启动。
#安装Lustre文件系统

rpm -ivh lustre-1.5.95-2.6.9_42.EL_lustre.1.5.95smp.i686.rpm
rpm -ivh lustre-modules-1.5.95-2.6.9_42.EL_lustre.1.5.95smp.i686.rpm

rpm -ivh tcl-8.4.7-2.i386.rpm
rpm -ivh expect-5.42.1-1.i386.rpm

rpm -ivh lustre-source-1.5.95-2.6.9_42.EL_lustre.1.5.95smp.i686.rpm
rpm -ivh lustre-debuginfo-1.5.95-2.6.9_42.EL_lustre.1.5.95smp.i686.rpm


修改 /etc/modprobe.conf,添加以下内容

# Networking options, see /sys/module/lnet/parameters
  options lnet networks=tcp
# alias lustre llite -- remove this line from existing modprobe.conf
# (the llite module has been renamed to lustre)
# end Lustre modules


安装完毕。


Lustre 1.6 采用新的配置方式MountConf
Lustre 1.6 通过mkfs.lustre 和mount 完成配置,不再使用lconf, lmc, xml

#注意以下配置的MGS,OST,Client是基于同一主机的
#需要预先准备分区 /dev/sdb1, /dev/sbd2

#配置MDT/MGS

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

mkdir -p /mnt/test/mdt
mount -t lustre /dev/sdb1 /mnt/test/mdt

cat /proc/fs/lustre/devices
如果正确可以看到显示信息:

[root@client ~]# cat /proc/fs/lustre/devices
  0 UP mgs MGS MGS 5
  1 UP mgc MGC172.20.11.238@tcp acfea366-ced8-76d0-8cd3-510ddb2a030a 5
  2 UP mdt MDS MDS_uuid 3
  3 UP lov testfs-mdtlov testfs-mdtlov_UUID 4
  4 UP mds testfs-MDT0000 testfs-MDT0000_UUID 3



#配置 OST
#注意这里需要指定--device-size参数(MGT和OST在同一台主机上,其他情况未测试)
mkfs.lustre --fsname=testfs --ost --mgsnode=lc2@tcp0 /dev/sdb2
#这里的参数 --fsname  与mdt相同,如果同一主机需要指定--device-size,并且mount时要使用-o loop
                        --mgsnode=<MGS主机名>@tcp

mkdir -p /mnt/test/ost0
mount -t lustre  /dev/sdb2 /mnt/test/ost0

#配置Client
mkdir -p /mnt/client
mount -t lustre lc2@tcp0:/testfs /mnt/client

#Client测试
cd /mnt/client
mkdir a
ls -l /mnt/client

#看到以下输出
[root@client client]# ls -l /mnt/client
total 4
drwxr-xr-x  2 root root 4096 Nov 18 06:14 a


#查看分区
df

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       1515856   1393608     45244  97% /
/dev/sda1               101086     16072     79795  17% /boot
none                    127516         0    127516   0% /dev/shm
//172.20.11.201/Linux
                      81923432  14427968  67495464  18% /mnt/smb
/dev/sdb1               281064     16676    248328   7% /mnt/test/mdt
/dev/loop0              301172     16784    268324   6% /mnt/test/ost0
172.20.11.238@tcp:/testfs
                        301172     16784    268260   6% /mnt/client
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值