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;
作者:李航
个人简介: 多年的底层开发经验,在高性能nginx开发和分布式缓存redis cluster有着丰富的经验,目前从事分布式存储Ceph工作。先后在58 同城、汽车之家、优酷土豆集团工作。目前供职于滴滴基础平台运维部-技术专家岗位,主要负责分布式Ceph系统。个人主要关注的技术领域:高 性能Nginx开发、分布式缓存、分布式存储。
如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!
赞2
添加新评论0 条评论