Skip to content

Instantly share code, notes, and snippets.

@hizkifw
Created February 9, 2023 15:44
Show Gist options
  • Save hizkifw/e3b2a1902c24028de5ad06d4d9d2cb7b to your computer and use it in GitHub Desktop.
Save hizkifw/e3b2a1902c24028de5ad06d4d9d2cb7b to your computer and use it in GitHub Desktop.

How to mount cephfs

  1. Create authorization

    root@cephhost:~# ceph fs authorize cephfs client.clientname /some/path rw
    [client.clientname]
            key = ...............
    

    Save it in the machine where you wanna mount, at /etc/ceph/ceph.client.clientname.keyring

  2. Create config

    root@cephhost:~# ceph config generate-minimal-conf
    # minimal ceph.conf for 8bf4ab72-ffb9-4c27-a505-2ed128a17542
    [global]
            fsid = 8bf4ab72-ffb9-4c27-a505-2ed128a17542
            mon_host = [v2:192.168.1.200:3300/0,v1:192.168.1.200:6789/0]
    

    Save it in the machine where you wanna mount, at /etc/ceph/ceph.conf

  3. Install ceph-common

    root@mounter:~# sudo apt install ceph-common
    
  4. Edit /etc/fstab

    clientname@.cephfs=/some/path      /mnt/somewhere    ceph    defaults 0 0
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment