As a Ceph storage administrator, it will be quite useful for you to manage your enterprise Ceph cluster effectively. In this chapter, we will cover the following topics:
As soon as you have your first Ceph cluster set up, you will need to manage it. As a Ceph storage administrator, one should know about Ceph services and how to use them. On Red Hat-based distributions, Ceph daemons can be managed in two ways, as a traditional sysvinit
or as a service. Now, let's learn more about these methods of service management.
sysvinit is a traditional, yet still recommended, method of managing Ceph daemons on RedHat-based systems as well as some older Debian/Ubuntu-based distributions. The general syntax to manage Ceph daemons using sysvinit is as follows:
/etc/init.d/ceph [options] [command] [daemons]
The Ceph options include:
The Ceph commands include:
The Ceph daemons include:
During your cluster administration, you might require to manage Ceph services by their types. In this section, we will learn how to start daemons by their types.
To start Ceph monitor daemons on localhost, execute Ceph with the start
command:
# /etc/init.d/ceph start mon
To start all of the Ceph monitor daemons on local as well as remote hosts, execute Ceph with the start
command and the -a
option:
# /etc/init.d/ceph -a start mon
The -a
option will perform the requested operation on all the nodes mentioned in the ceph.conf
file. Have a look at the following screenshot:
Similarly, you can start daemons of other types, such as mon and mds:
# /etc/init.d/ceph start osd # /etc/init.d/ceph start mds
In this section, we will learn about stopping Ceph daemons by their types.
To stop Ceph monitor daemons on localhost, execute Ceph with the stop
command:
# /etc/init.d/ceph stop mon
To stop Ceph monitor daemons on all hosts, execute Ceph with the stop
command and the -a
option:
# /etc/init.d/ceph -a stop mon
The -a
option will perform the requested operation on all the nodes mentioned in the ceph.conf
file. The following screenshot shows these commands in action:
Similarly, you can stop daemons of other types, such as mon and mds:
# /etc/init.d/ceph stop osd # /etc/init.d/ceph stop mds
To start your Ceph cluster, execute Ceph with the start
command. This command will start all Ceph services that you have deployed for all the hosts mentioned in the ceph.conf
file:
# /etc/init.d/ceph -a start
To stop your Ceph cluster, execute Ceph with the stop
command. This command will stop all Ceph services that you have deployed for all the hosts mentioned in the ceph.conf
file:
# /etc/init.d/ceph -a stop
To start a specific daemon for your Ceph cluster, execute Ceph with the start
command and daemon ID:
# /etc/init.d/ceph start osd.0
To check the status of a specific daemon for your Ceph cluster, execute Ceph with the status
command and daemon ID:
# /etc/init.d/ceph status osd.0
To stop a specific daemon for your Ceph cluster, execute Ceph with the stop
command and daemon ID:
# /etc/init.d/ceph stop osd.0
This screenshot shows the output of the preceding commands:
Similarly, you can manage specific daemons for the monitor and mds of your Ceph cluster.
3.147.79.84