記一次centos掛載ceph儲存的坑
起因
生產有兩臺伺服器,準備用來跑工作流,執行的資源的是放在ceph儲存叢集中,第一步掛載ceph
執行命令:mount -t ceph xxx:xxx -o name=admin,secret=AQXXX
mount -t ceph xxx:xxx -o name=admin,secret=AQXXX
異常mount: unknown filesystem type 'ceph'
意思是不認識的filesystem,因垂絲汀
原因定位和嘗試解決
第一反應就是核心版本太低
查閱資料,傳送門:https://docs.ceph.com/en/latest/start/os-recommendations/
看樣子沒有centos6(奇怪),作業系統核心版本要求linux-3.10.0,centos6.9預設核心版本2.6,不支援
嘗試解決第一次,採用ceph-fuse方式掛載
安裝ceph-fuse
配置ceph國內源(阿里源,清華源都試過)
[Ceph] name=Ceph packages for $basearch baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/$basearch enabled=1 gpgcheck=0 type=rpm-md gpgkey=https://mirrors.163.com/ceph/keys/release.asc priority=1 [Ceph-noarch] name=Ceph noarch packages baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/noarch enabled=1 gpgcheck=0 type=rpm-md gpgkey=https://mirrors.163.com/ceph/keys/release.asc priority=1 [ceph-source] name=Ceph source packages baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/SRPMS enabled=1 gpgcheck=0 type=rpm-md gpgkey=https://mirrors.163.com/ceph/keys/release.asc priority=1
yum install ceph-fuse
錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libstdc++.so.6(CXXABI_1.3.7)(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libboost_thread-mt.so.1.53.0()(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libboost_system-mt.so.1.53.0()(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libc.so.6(GLIBC_2.16)(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libboost_iostreams-mt.so.1.53.0()(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit) 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph) Requires: libfuse.so.2(FUSE_2.9)(64bit)
不能自動下載,天真如我,我居然去下載編譯GCC高版本,one hour later 再次安裝後又發現缺少很多低版本的依賴,ceph-fuse安裝失敗
嘗試解決第二次,升級核心
升級centos核心我都是去https://elrepo.org 上找,之前 CentOS7 Docker容器無法ping通宿主機ip問題解決記錄 裡面我就是從這裡撈的核心升級包, 於是開啟https://elrepo.org/linux/kernel/el6/x86_64/RPMS/,但是發現只有一個 elrepo-release-6-12.el6.elrepo.noarch.rpm
核心升級也是各種依賴找不到,資源下載不了,查了一下,centos6於2020年11月30日停止服務了,yum源能找到的基本都關了,ceph的網站也更新了,應當也是不建議centos6了,核心升級失敗
PS:找了DC的小夥伴直接升級核心和作業系統版本也都以失敗告終
第三次大殺招,重灌系統
資料和服務備份資料盤,重灌系統,安裝centos7.5,別人推薦版本,centos7服務到期2024年,還能折騰幾年,貌似centos8 2021年底就停止維護了,以後不會再有免費的REDHAT用了,到時如果有需要直接換Ubuntu
裝完直接掛載成功,異常絲滑
參考連結
https://www.jianshu.com/p/cedbdf0b6bca
https://blog.csdn.net/llggheshang/article/details/107425047
https://docs.ceph.com/en/latest/start/os-recommendations/