Running Ceph with SYSVINIT

SYSVINIT is a traditional yet recommended method of managing Ceph daemons on Red-Hat-based systems as well as for some older Debian/Ubuntu-based distributions. The general syntax for managing Ceph daemons using sysvinit is /etc/init.d/ceph [options] [command] [daemons].

Starting and stopping all daemons

To start or stop all Ceph daemons, perform the following set of commands.

How to do it…

Let's see how to start and stop all Ceph daemons:

  1. 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
    
  2. To stop your Ceph cluster, execute Ceph using the stop command. This command will stop all Ceph services that you have deployed for all the hosts mentioned in the ceph.conf file. The -a option is to execute on all nodes:
    # /etc/init.d/ceph -a stop
    

Tip

If you are using the -a option for service management, make sure that your ceph.conf file has all your Ceph hosts defined there and that the current node can ssh to all those other nodes. If the -a option is not used, then the command will only be executed on localhost.

Starting and stopping all daemons by type

To start or stop all Ceph daemons by their types, perform the following set of commands.

How to do it…

Let's see how to start and stop daemons by type:

Starting daemons by type

  1. To start the Ceph monitor daemons on localhost, execute Ceph with the start command followed by the daemon type:
    # /etc/init.d/ceph start mon
    
  2. To start the Ceph monitor daemons on all the hosts, execute the same command with the -a option:
    # /etc/init.d/ceph -a start mon
    
  3. Similarly, you can start daemons of other types, that is, osd, mds, and ceph-radosgw:
    # /etc/init.d/ceph start osd
    # /etc/init.d/ceph start mds
    # /etc/init.d/ceph start ceph-radosgw
    

Stopping daemons by type

  1. To stop the Ceph monitor daemons on localhost, execute Ceph with the stop command followed by the daemon type:
    # /etc/init.d/ceph stop mon
    
  2. To stop the Ceph monitor daemons on all the hosts, execute the same command with the -a option:
    # /etc/init.d/ceph -a stop mon
    
  3. Similarly, you can stop daemons of other types, that is, osd, mds, and ceph-radosgw:
    # /etc/init.d/ceph stop osd
    # /etc/init.d/ceph stop mds
    # /etc/init.d/ceph stop ceph-radosgw
    

Starting and stopping a specific daemon

To start or stop a specific Ceph daemon, perform the following set of commands.

How to do it…

Let's see how to start and stop specific daemons.

Starting a specific daemon

To start a specific daemon on localhost, execute Ceph with the start command followed by {daemon_type}.{instance}, for example:

  1. Start the mon.0 daemon:
    # /etc/init.d/ceph start mon.ceph-node1
    
  2. Similarly, you can start other daemons and their instances:
    # /etc/init.d/ceph start osd.1
    # /etc/init.d/ceph -a start mon.ceph-node2
    # /etc/init.d/ceph start ceph-radosgw.gateway1
    

Stopping a specific daemon

To stop a specific Ceph daemon on localhost, execute Ceph with the stop command followed by {daemon_type}.{instance}, for example:

  1. Stop the mon.0 daemon:
    # /etc/init.d/ceph start mon.ceph-node1
    
  2. Similarly, you can stop other daemons and their instances:
    # /etc/init.d/ceph stop osd.1
    # /etc/init.d/ceph stop -a mds.ceph-node2
    # /etc/init.d/ceph stop ceph-radosgw.gateway1
    
..................Content has been hidden....................

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