batrick / ceph-linode

Launch Ceph using the Linode VPS provider
GNU General Public License v3.0
13 stars 10 forks source link

kernel cephfs in linode #6

Closed bengland2 closed 6 years ago

bengland2 commented 7 years ago

what's the best way to run kernel cephfs in linode? I'm running centos-7 distro and there is no kernel module ceph.ko or ceph.ko.xz in /lib/modules/uname -r/kernel/fs/ . When I try to mount using cephfs:

[root@li1741-92 ~]# mount -t ceph li1749-153:/cephfs /mnt/cephfs
failed to load ceph kernel module (1)
[root@li1741-92 ~]# find /lib/modules/`uname -r`/kernel -name 'ceph*'
find: ‘/lib/modules/4.9.36-x86_64-linode85/kernel’: No such file or directory
[root@li1741-92 ~]# uname -a
Linux li1741-92.members.linode.com 4.9.36-x86_64-linode85 #1 SMP Thu Jul 6 15:31:23 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@li1741-92 ~]# mkdir /mnt/ceph
[root@li1741-92 ~]# ceph-fuse /mnt/ceph
2017-10-09 22:21:26.392074 7fe409988040 -1 init, newargv = 0x55b07674f7a0 newargc=9
ceph-fuse[28473]: starting ceph client
ceph-fuse[28473]: starting fuse
[root@li1741-92 ~]# df /mnt/ceph
Filesystem     1K-blocks  Used Available Use% Mounted on
ceph-fuse       15593472     0  15593472   0% /mnt/ceph
batrick commented 7 years ago

failed to load ceph kernel module (1)

is a red herring.

I'm doing the same thing right now and used this appended to linode.yml:

+
+- hosts: clients
+  become: yes
+  tasks:
+    - name: mount kcephfs
+      shell: mount -t ceph $(grep 'mon host' /etc/ceph/ceph.conf | tr -d '[[:space:][:alpha:]=]'):/ /mnt -o secret=$(grep key /etc/ceph/ceph.client.admin.keyring | awk '{print $3}'),name=admin

Are you planning some test with the kernel client? Ping me on IRC.

batrick commented 7 years ago

I'm using this for group_vars/all:

ceph_origin: repository
ceph_repository: community
ceph_stable_release: luminous
copy_admin_key: true

Last part is critical because ceph-ansible doesn't setup a key for clients anymore ( >:( !!!)

batrick commented 7 years ago

Oh and one more thing, keep in mind that linode will have you use their upstream kernel by default. This is okay because you probably want all the latest CephFS kclient fixes that come with it. It's what I'm using now...

bengland2 commented 6 years ago

closing because this all works in centos 7.5