此内容没有您所选择的语言版本。

Chapter 2. Process Management


Each time you want to start, restart, and stop Ceph daemons or the entire cluster, you must specify at least one option and one command. You can also specify a daemon type or a daemon instance:

{commandline} [options] [commands] [daemons]
Copy to Clipboard Toggle word wrap

The ceph options include:

Expand
OptionShortcutDescription

--verbose

-v

Use verbose logging.

--allhosts

-a

Execute on all nodes in the Ceph configuration. Otherwise, it only executes on localhost.

--restart

N/A

Automatically restart daemon if it core dumps.

--norestart

N/A

Don’t restart a daemon if it core dumps.

--conf

-c

Use an alternate configuration file.

The ceph commands include:

Expand
CommandDescription

start

Start the daemon(s).

stop

Stop the daemon(s).

forcestop

Force the daemon(s) to stop. Same as kill -9

killall

Kill all daemons of a particular type.

cleanlogs

Cleans out the log directory.

cleanalllogs

Cleans out everything in the log directory.

For subsystem operations, the ceph service can target specific daemon types by adding a particular daemon type for the [daemons] option. Daemon types include:

  • mon
  • osd

2.1. Running Ceph with System V Init

Using System V Init (sysvinit) is the common way to run Ceph with RHEL 7 for Red Hat Ceph Storage v1.3.

2.1.1. Starting All Daemons

To start your Ceph cluster, execute ceph with the start command. Use the following syntax:

sudo /etc/init.d/ceph [options] [start|restart] [daemonType|daemonID]
Copy to Clipboard Toggle word wrap

The following examples illustrates a typical use case:

sudo /etc/init.d/ceph -a start
Copy to Clipboard Toggle word wrap

Once you execute with -a (i.e., execute on all nodes), Ceph should begin operating.

2.1.2. Stopping All Daemons

To stop your Ceph cluster, execute ceph with the stop command. Use the following syntax:

sudo /etc/init.d/ceph [options] stop [daemonType|daemonID]
Copy to Clipboard Toggle word wrap

The following examples illustrates a typical use case:

sudo /etc/init.d/ceph -a stop
Copy to Clipboard Toggle word wrap

Once you execute with -a (i.e., execute on all nodes), Ceph should stop operating.

2.1.3. Starting All Daemons by Type

To start all Ceph daemons of a particular type on the local Ceph node, use the following syntax:

sudo /etc/init.d/ceph start {daemon-type}
sudo /etc/init.d/ceph start osd
Copy to Clipboard Toggle word wrap

To start all Ceph daemons of a particular type on another node, use the following syntax:

sudo /etc/init.d/ceph -a start {daemon-type}
sudo /etc/init.d/ceph -a start osd
Copy to Clipboard Toggle word wrap

2.1.4. Stopping All Daemons by Type

To stop all Ceph daemons of a particular type on the local Ceph node, use the following syntax:

sudo /etc/init.d/ceph stop {daemon-type}
sudo /etc/init.d/ceph stop osd
Copy to Clipboard Toggle word wrap

To stop all Ceph daemons of a particular type on another node, use the following syntax:

sudo /etc/init.d/ceph -a stop {daemon-type}
sudo /etc/init.d/ceph -a stop osd
Copy to Clipboard Toggle word wrap

2.1.5. Starting a Daemon by Instances

To start a Ceph daemon on the local Ceph node, use the following syntax:

sudo /etc/init.d/ceph start {daemon-type}.{instance}
sudo /etc/init.d/ceph start osd.0
Copy to Clipboard Toggle word wrap

To start a Ceph daemon on another node, use the following syntax:

sudo /etc/init.d/ceph -a start {daemon-type}.{instance}
sudo /etc/init.d/ceph -a start osd.0
Copy to Clipboard Toggle word wrap

2.1.6. Stopping a Daemon by Instances

To stop a Ceph daemon on the local Ceph node, use the following syntax:

sudo /etc/init.d/ceph stop {daemon-type}.{instance}
sudo /etc/init.d/ceph stop osd.0
Copy to Clipboard Toggle word wrap

To stop a Ceph daemon on another node, use the following syntax:

sudo /etc/init.d/ceph -a stop {daemon-type}.{instance}
sudo /etc/init.d/ceph -a stop osd.0
Copy to Clipboard Toggle word wrap

2.2. Running Ceph with Upstart

On Ubuntu 14.04 (Trusty), you can run Ceph using the event-based Upstart. Upstart does not require you to define daemon instances in the Ceph configuration file.

To list the Ceph Upstart jobs and instances on a node, execute:

sudo initctl list | grep ceph
Copy to Clipboard Toggle word wrap

See initctl for additional details.

2.2.1. Starting All Daemons

To start all daemons on a Ceph Node (irrespective of type), execute the following:

sudo start ceph-all
Copy to Clipboard Toggle word wrap

2.2.2. Stopping All Daemons

To stop all daemons on a Ceph Node (irrespective of type), execute the following:

sudo stop ceph-all
Copy to Clipboard Toggle word wrap

2.2.3. Starting All Daemons by Type

To start all daemons of a particular type on a Ceph Node, execute one of the following:

sudo start ceph-osd-all
sudo start ceph-mon-all
sudo start ceph-mds-all
Copy to Clipboard Toggle word wrap

2.2.4. Stopping All Daemons by Type

To stop all daemons of a particular type on a Ceph Node, execute one of the following:

sudo stop ceph-osd-all
sudo stop ceph-mon-all
sudo stop ceph-mds-all
Copy to Clipboard Toggle word wrap

2.2.5. Starting a Daemon by Instances

To start a specific daemon instance on a Ceph Node, execute one of the following:

sudo start ceph-osd id={id}
sudo start ceph-mon id={hostname}
sudo start ceph-mds id={hostname}
Copy to Clipboard Toggle word wrap

For example:

sudo start ceph-osd id=1
sudo start ceph-mon id=ceph-server
sudo start ceph-mds id=ceph-server
Copy to Clipboard Toggle word wrap

2.2.6. Stopping a Daemon by Instances

To stop a specific daemon instance on a Ceph Node, execute one of the following:

sudo stop ceph-osd id={id}
sudo stop ceph-mon id={hostname}
sudo stop ceph-mds id={hostname}
Copy to Clipboard Toggle word wrap

For example:

sudo stop ceph-osd id=1
sudo start ceph-mon id=ceph-server
sudo start ceph-mds id=ceph-server
Copy to Clipboard Toggle word wrap

2.3. Running Ceph as a Service

You may operate Ceph as a service.

2.3.1. Starting all Daemons

To start your Ceph cluster, execute ceph with the start command. Use the following syntax:

sudo service ceph [options] [start|restart] [daemonType|daemonID]
Copy to Clipboard Toggle word wrap

The following examples illustrates a typical use case:

sudo service ceph -a start
Copy to Clipboard Toggle word wrap

Once you execute with -a (i.e., execute on all nodes), Ceph should begin operating.

2.3.2. Stopping all Daemons

To stop your Ceph cluster, execute ceph with the stop command. Use the following syntax:

sudo service ceph [options] stop [daemonType|daemonID]
Copy to Clipboard Toggle word wrap

For example:

sudo service ceph -a stop
Copy to Clipboard Toggle word wrap

Once you execute with -a (i.e., execute on all nodes), Ceph should shut down.

2.3.3. Starting all Daemons by Type

To start all Ceph daemons of a particular type on the local Ceph node, use the following syntax:

sudo service ceph start {daemon-type}
sudo service ceph start osd
Copy to Clipboard Toggle word wrap

To start all Ceph daemons of a particular type on all nodes, use the following syntax:

sudo service ceph -a start {daemon-type}
sudo service ceph -a start osd
Copy to Clipboard Toggle word wrap

2.3.4. Stopping all Daemons by Type

To stop all Ceph daemons of a particular type on the local Ceph node, use the following syntax:

sudo service ceph stop {daemon-type}
sudo service ceph stop osd
Copy to Clipboard Toggle word wrap

To stop all Ceph daemons of a particular type on all nodes, use the following syntax:

sudo service ceph -a stop {daemon-type}
sudo service ceph -a stop osd
Copy to Clipboard Toggle word wrap

2.3.5. Starting a Daemon by Instances

To start a Ceph daemon on the local Ceph node, use the following syntax:

sudo service ceph start {daemon-type}.{instance}
sudo service ceph start osd.0
Copy to Clipboard Toggle word wrap

To start a Ceph daemon on another node, use the following syntax:

sudo service ceph -a start {daemon-type}.{instance}
sudo service ceph -a start osd.0
Copy to Clipboard Toggle word wrap

2.3.6. Stopping a Daemon by Instances

To stop a Ceph daemon on the local Ceph node, use the following syntax:

sudo service ceph stop {daemon-type}.{instance}
sudo service ceph stop osd.0
Copy to Clipboard Toggle word wrap

To stop a Ceph daemon on another node, use the following syntax:

sudo service ceph -a stop {daemon-type}.{instance}
sudo service ceph -a stop osd.0
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat