Rolling Update Lustre Server/Client

Jetsada Malaisirirat
3 min readFeb 25, 2019

--

Rolling update Lustre

— — — — — — — — — — — — — —
Environment Server : role : resource
iml : iml
pair mds
mds1 : mgs : mgt
mds2 : mds : mdt
pair oss
oss1 : oss : ost1
oss2 : oss : ost2
— — — — — — — — — — — — — —

การเตรียม repository
ก่อนการอัพเดท ทุกเครื่องใน Lustre ให้อัพเดท repository ของ lustre ให้ชี้ไปยัง Lustre เวอร์ชั่นใหม่ก่อน
หากติดตั้งผ่าน IML ไฟล์ repostory จะอยู่ในชื่อ /etc/yum.repos.d/Intel-Lustre-Agent.repo
[lustre]
name=Lustre Server
baseurl=https://downloads.hpdd.intel.com/public/lustre/lustre-2.10.6/el7/server/
enabled=1
gpgcheck=0

[lustre-client]
name=Lustre Client
baseurl=https://downloads.hpdd.intel.com/public/lustre/lustre-2.10.6/el7/client/
enabled=1
gpgcheck=0
— — — — — — — — — — — — — — — — — -
ขั้นตอนการอัพเดท
1. ที่ IML ให้ย้าย resource จากเครื่อง mds1 และ oss1 ให้ fail over ไปยังเครื่องที่คู่กัน
2. ที่เครื่อง mds1, oss1 สั่งอัพเดทแพ็กเกจ Lustre เวอร์ชั่นใหม่แทนเวอร์ชั่นเดิม
# yum clean all
# yum install lustre kmod-lustre lustre-all-dkms lustre-osd-ldiskfs-mount lustre-osd-zfs-mount kmod-lustre-osd-ldiskfs
3. ที่เครื่อง mds1, oss1 ให้ reboot เครื่องเพื่อเปลี่ยนเป็น lustre kernel เวอร์ชั่นใหม่ที่ติดตั้ง
4. ที่ IML ให้ failover resource กลับไปยัง mds1 และ oss1
5. ที่ IML ย้าย resource จาก mds2 และ oss2 ไปยังเครื่องที่คู่กัน
6. ทำการอัพเดทแพ็กเกจ Lustre ตามขั้นตอน 2, 3
7. ที่ IML ให้ failover resource กลับไปยัง mds2 และ oss2

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
การติดตั้ง Lustre-client
การติดตั้ง lustre-client มี 3 ทางเลือกในการอัพเดท คือ
1. ติดตั้ง lustre-client ปกติ
2. ติดตั้ง lustre-client และ lustre-client-dkms
3. recompile lustre-client กับ kernel ที่ต้องการ

วิธีแรก จะติดตั้ง lustre-client ปกติแต่การติดต้้งนั้นจะต้อง update kernel เป็นเวอร์ชั่นใหม่ด้วย
# yum install lustre-client

วิธีที่สอง หากต้องการติดตั้ง lustre client โดยใช้ kernel เดิมที่ใช้งานอยู่ จะติดตั้ง dkms (Dynamic kernel module support) เพิ่มเติม
เมื่อติดตั้ง lustre-client-dkms จะทำการ compile lustre-client module บน kernel ปัจจุบัน โดยติดตั้งไว้ที่ /usr/lib/modules/<currentkernel>
# yum install lustre-client lustre-client-dkms

วิธีที่สาม
ในกรณีที่มีเครื่อง client หลายเครื่อง และมีสภาพแวดล้อมเดียวกัน เลข kernel เดียวกัน การ compile lustre-client ใหม่บน kernel ของ Client น่าจะเป็นทางเลือกที่ดี เนื่องจากถ้าใช้วิธีที่สอง ทุกเครื่องจะเสียเวลา compile lustre-client module ถ้า compile ให้ได้ package มาก่อน แล้วค่อยติดตั้ง package น่าจะดีกว่า
Test compile on CentOS 7.4 kernel 3.10.0–693.el7.x86_64

Rebuild lustre-client
https://wiki.whamcloud.com/display/PUB/Rebuilding+the+Lustre-client+rpms+for+a+new+kernel

dependency package for compile
kernel-devel
rpm-build
make
kernel-debuginfo-common-x86_64-<client_kernel_version>
libtool
libselinux-devel

1. ดาวน์โหลด SRPM จาก https://downloads.whamcloud.com/public/lustre/lustre-2.10.6/el7/client/SRPMS/lustre-2.10.6-1.src.rpm

2. สั่ง rebuild lustre-client จาก SRPM
# rpmbuild — rebuild — without=server lustre-2.10.6–1.src.rpm

RPMS are build in /root/rpmbuild/RPMS/x86_64
kmod-lustre-2.10.6–1.el7.centos.x86_64.rpm
kmod-lustre-osd-ldiskfs-2.10.6–1.el7.centos.x86_64.rpm
kmod-lustre-tests-2.10.6–1.el7.centos.x86_64.rpm
lustre-2.10.6–1.el7.centos.x86_64.rpm
lustre-debuginfo-2.10.6–1.el7.centos.x86_64.rpm
lustre-iokit-2.10.6–1.el7.centos.x86_64.rpm
lustre-osd-ldiskfs-mount-2.10.6–1.el7.centos.x86_64.rpm
lustre-resource-agents-2.10.6–1.el7.centos.x86_64.rpm
lustre-tests-2.10.6–1.el7.centos.x86_64.rpm
* ในการติดตั้งจะเจอ dependency ว่าต้องการ kernel >= kernel 3.10.0–957 ให้เพิ่ม option — nodeps ในการติดตั้ง
เนื่องจากคอนฟิกในไฟล์ kmp-lustre.preamble ใน /root/rpmbuild/SOURCE/
[root@sql SOURCES]# cat kmp-lustre.preamble
Obsoletes: %{name}-modules < %{version}
Requires: kernel < 3.10.0–958, kernel >= 3.10.0–957
Conflicts: kernel-lustre

ให้แก้ บรรทัด Require เป็น kernel >= เลข kernel ปัจจุบัน
Requires: kernel < 3.10.0–958, kernel >= 3.10.0–693

และสั่งคอมไพล์ โดยไปที่ /root/rpmbuild/SPEC และสั่ง compile ใหม่
# cd /root/rpmbuild/SPEC
# rpmbuild -ba — without=server lustre.spec
เมื่อนำ rpm ไปติดตั้งจะไม่ติด dependency kernel
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
3. ในการติดตั้ง lustre-client จะใช้ 4 package นี้ในการติดตั้งในเครื่อง Client
kmod-lustre-2.10.6–1.el7.centos.x86_64.rpm
kmod-lustre-osd-ldiskfs-2.10.6–1.el7.centos.x86_64.rpm
lustre-2.10.6–1.el7.centos.x86_64.rpm
lustre-osd-ldiskfs-mount-2.10.6–1.el7.centos.x86_64.rpm

# rpm -Uvh — nodeps kmod-lustre-2.10.6–1.el7.centos.x86_64.rpm kmod-lustre-osd-ldiskfs-2.10.6–1.el7.centos.x86_64.rpm lustre-2.10.6–1.el7.centos.x86_64.rpm lustre-osd-ldiskfs-mount-2.10.6–1.el7.centos.x86_64.rpm

แต่ package ต้องการ e2fsprogs ติดตั้งด้วย โดย Download ที่
https://downloads.whamcloud.com/public/e2fsprogs/1.44.5.wc1/el7/RPMS/x86_64/
โดย Download package ต่อไปนี้ และติดตั้งพร้อม lustre-client
e2fsprogs e2fsprogs-libs libcom_err libss

--

--

No responses yet