cat >/tmp/lustre-repo.conf <<\__EOF
[lustre-server]
name=lustre-server
baseurl=https://downloads.whamcloud.com/public/lustre/latest-release/el7/server
# exclude=*debuginfo*
gpgcheck=0
[lustre-client]
name=lustre-client
baseurl=https://downloads.whamcloud.com/public/lustre/latest-release/el7/client
# exclude=*debuginfo*
gpgcheck=0
[e2fsprogs-wc]
name=e2fsprogs-wc
baseurl=https://downloads.whamcloud.com/public/e2fsprogs/latest/el7
# exclude=*debuginfo*
gpgcheck=0
__EOF
mkdir -p /var/www/html/repo
cd /var/www/html/repo
reposync -c /tmp/lustre-repo.conf -n \
-r lustre-server \
-r lustre-client \
-r e2fsprogs-wc
cd /var/www/html/repo
for i in e2fsprogs-wc lustre-client lustre-server; do
(cd $i && createrepo .)
done
hn=`hostname --fqdn`
cat >/var/www/html/lustre.repo <<__EOF
[lustre-server]
name=lustre-server
baseurl=https://$hn/repo/lustre-server
enabled=0
gpgcheck=0
proxy=_none_
[lustre-client]
name=lustre-client
baseurl=https://$hn/repo/lustre-client
enabled=0
gpgcheck=0
[e2fsprogs-wc]
name=e2fsprogs-wc
baseurl=https://$hn/repo/e2fsprogs-wc
enabled=0
gpgcheck=0
__EOF
yum repolist all
yum --nogpgcheck --disablerepo=* --enablerepo=e2fsprogs-wc \
install e2fsprogs
yum --nogpgcheck --disablerepo=base,extras,updates \
--enablerepo=lustre-server install \
kernel \
kernel-devel \
kernel-headers \
kernel-tools \
kernel-tools-libs \
kernel-tools-libs-devel
reboot
yum --nogpgcheck --enablerepo=lustre-server install \
kmod-lustre \
kmod-lustre-osd-ldiskfs \
lustre-osd-ldiskfs-mount \
lustre \
lustre-resource-agents
modprobe -v lustre
modprobe -v ldiskfs
yum install \
kernel \
kernel-devel \
kernel-headers \
kernel-abi-whitelists \
kernel-tools \
kernel-tools-libs \
kernel-tools-libs-devel
reboot
yum --nogpgcheck --enablerepo=lustre-client install \
kmod-lustre-client \
lustre-client
modprobe -v lustre
配置说明
#格式化
mkfs.lustre --fsname=lustrefs --reformat --mgs --servicenode=mds1@tcp0 /dev/vdb
#挂载
mount -t lustre /dev/vdb /mnt/mgs
#格式化
mkfs.lustre --mdt --fsname=lustrefs --index=0 --mgsnode=mds1@tcp0 --servicenode=mds1@tcp0 --reformat /dev/vdb
#开启quota
tune2fs -O project /dev/vdb
#挂载目录
mount -t lustre /dev/vdc /mnt/mdt
#格式化
mkfs.lustre --fsname=lustrefs --ost --reformat --index=0 --servicenode=ost1@tcp0 --servicenode=ost2@tcp0 --mgsnode=mds1@tcp0 /dev/vdb
#开启quota
tune2fs -O project,quota /dev/vdb
mount -t lustre /dev/vdb /mnt/ost1
lctl conf_param lustrefs.quota.ost=ugp;
lctl conf_param lustrefs.quota.mdt=ugp;