起因

生產有兩臺伺服器,準備用來跑工作流,執行的資源的是放在ceph儲存叢集中,第一步掛載ceph

執行命令:mount -t ceph xxx:xxx -o name=admin,secret=AQXXX

  1. mount -t ceph xxx:xxx -o name=admin,secret=AQXXX
  2. 異常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國內源(阿里源,清華源都試過)

  1. [Ceph]
  2. name=Ceph packages for $basearch
  3. baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/$basearch
  4. enabled=1
  5. gpgcheck=0
  6. type=rpm-md
  7. gpgkey=https://mirrors.163.com/ceph/keys/release.asc
  8. priority=1
  9. [Ceph-noarch]
  10. name=Ceph noarch packages
  11. baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/noarch
  12. enabled=1
  13. gpgcheck=0
  14. type=rpm-md
  15. gpgkey=https://mirrors.163.com/ceph/keys/release.asc
  16. priority=1
  17. [ceph-source]
  18. name=Ceph source packages
  19. baseurl=http://mirrors.163.com/ceph/rpm-jewel/el7/SRPMS
  20. enabled=1
  21. gpgcheck=0
  22. type=rpm-md
  23. gpgkey=https://mirrors.163.com/ceph/keys/release.asc
  24. priority=1

yum install ceph-fuse

  1. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  2. Requires: libstdc++.so.6(CXXABI_1.3.7)(64bit)
  3. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  4. Requires: libboost_thread-mt.so.1.53.0()(64bit)
  5. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  6. Requires: libstdc++.so.6(CXXABI_1.3.5)(64bit)
  7. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  8. Requires: libstdc++.so.6(GLIBCXX_3.4.19)(64bit)
  9. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  10. Requires: libboost_system-mt.so.1.53.0()(64bit)
  11. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  12. Requires: libc.so.6(GLIBC_2.16)(64bit)
  13. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  14. Requires: libboost_iostreams-mt.so.1.53.0()(64bit)
  15. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  16. Requires: libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
  17. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  18. Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
  19. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  20. Requires: libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
  21. 錯誤:Package: 2:ceph-fuse-10.2.11-0.el7.x86_64 (Ceph)
  22. 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/