Accessing CephFS via kernel driver

Native support for Ceph has been added in Linux kernel 2.6.34 and the later versions. In this recipe, we will demonstrate how to access CephFS via the Linux kernel driver on ceph-client1.

How to do it…

  1. Check your client's Linux kernel version:
    # uname -r
    
  2. Create a mount point directory:
    # mkdir /mnt/cephfs
    
  3. Get the keys for the clieht.cephfs user, which we created in the last section. Execute the following command from the Ceph monitor node to get the user keys:
    # ceph auth get-key client.cephfs
    
  4. Mount CephFS using the native Linux mount call with the following syntax:

    Syntax: mount -t ceph <Monitor_IP>:<Monitor_port>:/ <mount_point_name> -o name=admin,secret=<admin_user_key>

    # mount -t ceph ceph-node1:6789:/ /mnt/cephfs ...

Get Ceph Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.