Running Ceph as a service

Depending on your Linux working style, you can choose to manage your Ceph services either by sysvinit or by the Linux service command. Starting from Ceph Argonaut and Bobtail, you can mange Ceph daemons using the Linux service command:

service ceph [options] [command] [daemons]

The Ceph options include:

  • --verbose (-v): Used for verbose logging
  • --allhosts (-a): Executes on all nodes that are mentioned in ceph.conf, otherwise on localhost
  • --conf (-c): Uses and alternates configuration files

The Ceph commands include:

  • status: Shows the status of the daemon
  • start: Starts the daemon
  • stop: Stops the daemon
  • restart: Stops, and then starts the daemon
  • forcestop: Forces the daemon to stop; this is similar to kill -9

The Ceph daemons include:

  • mon
  • osd
  • mds
  • ceph-radosgw

Starting and stopping all daemons

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:

# service 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:

# service ceph -a stop

Starting and stopping a specific daemon

To start a specific daemon for your Ceph cluster, execute Ceph with the start command and daemon ID:

# service 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:

# service ceph status osd.0

To stop a specific daemon for your Ceph cluster, execute Ceph with the stop command and daemon ID:

# service ceph stop osd.0

The following is the screenshot showing the command outputs:

Starting and stopping a specific daemon
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.133.54