当前位置: 首页 > news >正文

cs6.8-oracle挂载ceph

https://ceph-users.ceph.narkive.com/EgcYJhbG/hammer-0-94-1-still-getting-feature-set-mismatch-for-cephfs-mount-requests

https://blog.51cto.com/michaelkang/1675822 

 

Client挂载方式有两种:内核kernal方式和fuse方式。(内核挂载方式需要2.6.34及其以后的版本才支持)

使用fuse方式挂载(注意:此方式读写效率很低)

centos6.8要成功挂载cephfs
1需要升级内核
2需要在ceph节点执行ceph osd crush tunables hammer
3然后用mount挂载

 

设置好源

[root@cu-dbs-161 yum.repos.d]# cat ceph.repo
[ceph]
name=ceph
baseurl=http://download.ceph.com/rpm-hammer/el6/x86_64/
gpgcheck=0

[ceph-noarch]
name=cephnoarch
baseurl=http://download.ceph.com/rpm-hammer/el6/noarch/
gpgcheck=0
[root@cu-dbs-161 yum.repos.d]# cat 163.repo
[ceph]
name=Ceph noarch packages
baseurl=http://mirrors.163.com/ceph/rpm-hammer/el6/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://mirrors.163.com/ceph/keys/release.asc

 

安装软件

yum install ceph-fuse

 

升级内核
[root@cu-dbs-161 ceph]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@cu-dbs-161 ceph]#
[root@cu-dbs-161 ceph]# rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm


[root@cu-dbs-161 ceph]# yum --enablerepo=elrepo-kernel -y install kernel-lt

[root@cu-dbs-161 ceph]# vi /boot/grub/grub.conf
将内核修改为4.0的,其实就是将defaults=0就可以了
[root@cu-dbs-161 ceph]# reboot

 

[root@cu-dbs-151 ~]# modprobe ceph
[root@cu-dbs-151 ~]# lsmod |grep ceph
ceph 175251 0
libceph 161546 1 ceph
libcrc32c 1388 1 libceph
fscache 57792 1 ceph


在ceph节点上执行下面这个命令,客户端就可以挂载了
root@cu-pve04:/etc/ceph# ceph osd crush tunables hammer
adjusted tunables profile to hammer


==============================================
ceph osd crush tunables optimal

ceph osd crush show-tunables
ceph osd crush tunables legacy|argonaut|bobtail|firefly|hammer|jewel|optimal|default set crush tunables values to <profile>
ceph osd crush get-tunable straw_calc_version

May 13 17:52:24 cu-dbs-161 kernel: libceph: mon0 192.168.7.4:6789 feature set mismatch, my 107b84a842aca < server's 40107b84a842aca, missing 400000000000000
May 13 17:52:24 cu-dbs-161 kernel: libceph: mon0 192.168.7.4:6789 missing required protocol features
May 13 17:57:07 cu-dbs-161 kernel: libceph: no secret set (for auth_x protocol)
May 13 17:57:07 cu-dbs-161 kernel: libceph: error -22 on auth protocol 2 init
May 13 17:57:07 cu-dbs-161 kernel: libceph: client2428503 fsid 6e731e21-ac3a-493b-84bf-95f54481449c
May 13 17:58:07 cu-dbs-161 kernel: libceph: client2428569 fsid 6e731e21-ac3a-493b-84bf-95f54481449c
May 13 17:58:07 cu-dbs-161 kernel: libceph: mon0 192.168.7.4:6789 session established

==============================================

 

[root@cu-dbs-161 ceph]# mount -t ceph 192.168.7.4:6789:/ /ceph -o name=admin,secretfile=admin.keyring
[root@cu-dbs-161 ceph]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 83G 3.8G 75G 5% /
tmpfs 7.9G 72K 7.9G 1% /dev/shm
/dev/sda1 190M 74M 102M 42% /boot
192.168.7.4:6789:/ 53T 693G 52T 2% /ceph
[root@cu-dbs-161 ceph]# cd /ceph/
[root@cu-dbs-161 ceph]# ls
dump fileserver template
[root@cu-dbs-161 fileserver]# lsmod |grep ceph
ceph 174958 1
libceph 161546 1 ceph
libcrc32c 1388 1 libceph
fscache 57792 1 ceph

添加到开机启动项
vi /etc/fstab
192.168.7.4:6789,192.168.7.5:6789,192.168.7.6:6789:/ /ceph ceph name=admin,secretfile=/etc/ceph/admin.keyring 0 0

 

 


[root@cu-dbs-151 ceph]# cat admin.keyring
AQBR8NRcZL6tLhAAnuB+OPbBdI+t3G5B1beLHA==

这是个bug,不能用secretfile参数,或者直接在命令行上跟密钥。或者禁用ceph的认证

https://bugzilla.redhat.com/show_bug.cgi?id=1030402


[root@cu-dbs-151 ceph]# mount -t ceph 192.168.7.4:6789:/ /ceph -o name=admin,secretfile=admin.keyring
mount: wrong fs type, bad option, bad superblock on 192.168.7.4:6789:/,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so


[root@cu-dbs-151 ceph]# dmesg |tail
EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Adding 16777212k swap on /dev/sda2. Priority:-1 extents:1 across:16777212k FS
audit: type=1305 audit(1561542914.822:3): audit_pid=3210 old=0 auid=4294967295 ses=4294967295 res=1
FS-Cache: Loaded
Key type ceph registered
libceph: loaded (mon/osd proto 15/24)
FS-Cache: Netfs 'ceph' registered for caching
ceph: loaded (mds proto 32)
libceph: bad option at 'secretfile=admin.keyring'
libceph: bad option at 'secretfile=admin.keyring'


[root@cu-dbs-151 ceph]# mount -t ceph 192.168.7.4:6789:/ /ceph -o name=admin,secret=AQBR8NRcZL6tLhAAnuB+OPbBdI+t3G5B1beLHA==
[root@cu-dbs-151 ceph]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 83G 3.6G 75G 5% /
tmpfs 16G 72K 16G 1% /dev/shm
/dev/sda1 190M 74M 103M 42% /boot
192.168.7.4:6789:/ 53T 945G 52T 2% /ceph

 

转载于:https://www.cnblogs.com/createyuan/p/10858198.html

相关文章:

  • centos7二进制安装mysql8.0.16
  • PHP应用如何对接微信公众号JSAPI支付
  • Leetcode 11 - Container With Most Water
  • Oracle 12c:ORA-28040
  • 002-QC的使用
  • JavaScript 函数式编程技巧 - 反柯里化
  • 线程池没你想的那么简单
  • 第九周总结
  • 聊聊Dubbo(九):核心源码-服务端启动流程2
  • Nginx和Apache
  • 重学ES6 Set 数据结构(2)
  • webpack treeshking的三个要点
  • 安装固态硬盘,小米笔记本13.3
  • 利用requests库访问360主页20次
  • Linux入门学习
  • php的引用
  • @jsonView过滤属性
  • DOM的那些事
  • ES6 学习笔记(一)let,const和解构赋值
  • Java 23种设计模式 之单例模式 7种实现方式
  • Linux各目录及每个目录的详细介绍
  • Linux链接文件
  • Mysql5.6主从复制
  • PAT A1120
  • Python爬虫--- 1.3 BS4库的解析器
  • 力扣(LeetCode)22
  • 聊聊sentinel的DegradeSlot
  • 名企6年Java程序员的工作总结,写给在迷茫中的你!
  • 前端每日实战:61# 视频演示如何用纯 CSS 创作一只咖啡壶
  • 前端相关框架总和
  • 手写双向链表LinkedList的几个常用功能
  • 说说动画卡顿的解决方案
  • 算法-图和图算法
  • 一份游戏开发学习路线
  • Android开发者必备:推荐一款助力开发的开源APP
  • MPAndroidChart 教程:Y轴 YAxis
  • 浅谈sql中的in与not in,exists与not exists的区别
  • 组复制官方翻译九、Group Replication Technical Details
  • #pragma pack(1)
  • #我与Java虚拟机的故事#连载13:有这本书就够了
  • $GOPATH/go.mod exists but should not goland
  • (iPhone/iPad开发)在UIWebView中自定义菜单栏
  • (阿里巴巴 dubbo,有数据库,可执行 )dubbo zookeeper spring demo
  • (原創) 如何使用ISO C++讀寫BMP圖檔? (C/C++) (Image Processing)
  • .class文件转换.java_从一个class文件深入理解Java字节码结构
  • .NET开源项目介绍及资源推荐:数据持久层
  • /usr/local/nginx/logs/nginx.pid failed (2: No such file or directory)
  • [ linux ] linux 命令英文全称及解释
  • [1] 平面(Plane)图形的生成算法
  • [2013][note]通过石墨烯调谐用于开关、传感的动态可重构Fano超——
  • [Bugku]密码???[writeup]
  • [BZOJ1178][Apio2009]CONVENTION会议中心
  • [C/C++] C/C++中数字与字符串之间的转换
  • [DM复习]Apriori算法-国会投票记录关联规则挖掘(上)
  • [echarts] y轴不显示0