ceph-客戶端

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

 

Client掛載方式有兩種:內核kernal方式和fuse方式。(內核掛載方式須要2.6.34及其之後的版本才支持)session

使用fuse方式掛載(注意:此方式讀寫效率很低)ui

centos6.8要成功掛載cephfs
1須要升級內核
2須要在ceph節點執行ceph osd crush tunables hammer
3而後用mount掛載url

 

設置好源server

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

[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.ascrequests

 

安裝軟件it

yum install ceph-fuseio

 

升級內核
[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


在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/fstab192.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

相關文章
相關標籤/搜索