Hi my name is Stephen McElroy, and in this guide I will be showing how to create a new user, set permissions, set quotas, mount the share, and make them persistent on the client.
On the Ceph admin nodeLets create a basic user and give it capabilities to read the
/ and the
/test_folder in CephFS.
Once we are done adding capabilities, we will use ceph auth import to update -or- create our user entry. I personally like this way of updating the capabilities for a user for two reasons. First, it allows me to backup clients CAPS, most importantly, It allows me to not accidentally override their CAPS with ceph auth caps command.
If you don’t already have CephFS mounted somewhere to be able to create directories, lets mount the root directory now. Then create a subdirectory names test_folder.
Note - If you want to set user quotas on directory, use ceph-fuse when mounting. So far its the only way I’ve been able to get quotas to work.
Lets set a quota on test_folder.
Lets mount up the test folder to ensure quotas worked.
Next, install packages for ceph-fuse
Copy over your client key you made on the admin node, and ceph.conf, to “/etc/ceph/“
Then we will make two directories that will be use for mounting CephFS.
Personally I like to keep the mount directory and Ceph directory name the same.
Make this a persistent mount by adding entries in “/etc/fstab”. Change the information as needed.
mount -a and
df -h to ensure everything mounted correctly.
There you have it, you should now have a fully working CephFS share. I hope this helps out peeps and makes like a little easier. If this even helped out one admin, then it was well worth it. If you have any questions, or need to hire a Ceph Engineer, free to contact me at firstname.lastname@example.org!