記一次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/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM