Chapter 8. Basic Red Hat Ceph Storage client setup
As a storage administrator, you have to set up client machines with basic configuration to interact with the storage cluster. Most client machines only need the ceph-common package and its dependencies installed. It will supply the basic ceph and rados commands, as well as other commands like mount.ceph and rbd.
8.1. Configuring file setup on client machines Copy linkLink copied to clipboard!
Client machines generally need a smaller configuration file than a full-fledged storage cluster member. You can generate a minimal configuration file which can give details to clients to reach the Ceph monitors.
Prerequisites
- A running Red Hat Ceph Storage cluster.
- Root access to the nodes.
Procedure
On the node where you want to set up the files, create a directory
cephin the/etcfolder:Example
mkdir /etc/ceph/
[root@host01 ~]# mkdir /etc/ceph/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Navigate to
/etc/cephdirectory:Example
cd /etc/ceph/
[root@host01 ~]# cd /etc/ceph/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Generate the configuration file in the
cephdirectory:Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The contents of this file should be installed in
/etc/ceph/ceph.confpath. You can use this configuration file to reach the Ceph monitors.
8.2. Setting-up keyring on client machines Copy linkLink copied to clipboard!
Most Ceph clusters are run with the authentication enabled, and the client needs the keys in order to communicate with cluster machines. You can generate the keyring which can give details to clients to reach the Ceph monitors.
Prerequisites
- A running Red Hat Ceph Storage cluster.
- Root access to the nodes.
Procedure
On the node where you want to set up the keyring, create a directory
cephin the/etcfolder:Example
mkdir /etc/ceph/
[root@host01 ~]# mkdir /etc/ceph/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Navigate to
/etc/cephdirectory in thecephdirectory:Example
cd /etc/ceph/
[root@host01 ~]# cd /etc/ceph/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Generate the keyring for the client:
Syntax
ceph auth get-or-create client.CLIENT_NAME -o /etc/ceph/NAME_OF_THE_FILE
ceph auth get-or-create client.CLIENT_NAME -o /etc/ceph/NAME_OF_THE_FILECopy to Clipboard Copied! Toggle word wrap Toggle overflow Example
ceph auth get-or-create client.fs -o /etc/ceph/ceph.keyring
[root@host01 ceph]# ceph auth get-or-create client.fs -o /etc/ceph/ceph.keyringCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the output in the
ceph.keyringfile:Example
[root@host01 ceph]# cat ceph.keyring [client.fs] key = AQAvoH5gkUCsExAATz3xCBLd4n6B6jRv+Z7CVQ==
[root@host01 ceph]# cat ceph.keyring [client.fs] key = AQAvoH5gkUCsExAATz3xCBLd4n6B6jRv+Z7CVQ==Copy to Clipboard Copied! Toggle word wrap Toggle overflow The resulting output should be put into a keyring file, for example
/etc/ceph/ceph.keyring.