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
.
Check your client's Linux kernel version:
# uname -r
Create a mount point directory:
# mkdir /mnt/cephfs
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
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 -o name=cephfs,secret=AQAGSF5VMIDWHhAAox9s/oHg/6FPzf4xRQV73Q==
To mount CephFS more securely, avoiding the admin key being visible in the command history, store the admin keyring as plain text in a separate file and...