安装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