Ceph操做——操做集群

RUNNING CEPH WITH UPSTART

当在Debian / Ubuntu的发行版上用 ceph-deploy 部署Ceph的墨鱼之外,你可能会开始和中止Ceph的守护进程在Ceph的节点采用基于事件的Upstart。Upstart不须要您定义守护进程实例,在CEPH配置文件中。html

Ceph的Upstart要列出工做和实例的节点上,执行如下命令:node

sudo initctl list | grep ceph

额外细节,见 initctl 部分.ubuntu

STARTING ALL DAEMONS——启动全部的守护进程

要启动一个Ceph的节点上全部的守护程序(不论类型),请执行如下命令:spa

sudo start ceph-all

 

中止全部守护进程

一个Ceph的节点(不论类型)要中止全部守护进程,执行如下命令:调试

 

sudo stop ceph-all

STARTING ALL DAEMONS BY TYPE——按类型启动全部的守护进程

要启动特定类型的Ceph的节点上全部的守护进程,请执行下列操做之一:rest

sudo start ceph-osd-all
sudo start ceph-mon-all
sudo start ceph-mds-all

STOPPING ALL DAEMONS BY TYPE——按类型中止全部的守护进程

要中止特定类型的Ceph的节点上的全部守护进程,请执行下列操做之一:日志

sudo stop ceph-osd-all
sudo stop ceph-mon-all
sudo stop ceph-mds-all

STARTING A DAEMON——启动守护进程

要启动特定的守护进程实例Ceph的节点上,执行下列操做之一:server

sudo start ceph-osd id={id}
sudo start ceph-mon id={hostname}
sudo start ceph-mds id={hostname}

例如:htm

sudo start ceph-osd id=1
sudo start ceph-mon id=ceph-server
sudo start ceph-mds id=ceph-server

STOPPING A DAEMON——中止守护程序

要中止一个特定的守护进程实例Ceph的节点上,执行下列操做之一:进程

sudo stop ceph-osd id={id}
sudo stop ceph-mon id={hostname}
sudo stop ceph-mds id={hostname}

例如:

sudo stop ceph-osd id=1
sudo start ceph-mon id=ceph-server
sudo start ceph-mds id=ceph-server

RUNNING CEPH——运行CEPH

每次您启动,从新启动,并 中止 Ceph的守护进程(或整个集群),你必须至少指定一个选项,一个命令。你也能够指定一个的守护类型或一个守护进程实例。

{commandline} [options] [commands] [daemons]

The ceph options include:

Option Shortcut Description
--verbose -v 使用详细的日志记录
--valgrind N/A (Dev and QA only) 使用Valgrind的调试 
--allhosts -a 用ceph.conf上执行全部节点,不然它只本地执行
--restart N/A 若是核心转储,自动启动deamon
--norestart N/A 若是核心转储,不要从新启动守护进程
--conf -c 使用备用配置文件

The ceph commands include:

Command Description
start 启动守护进程
stop 中止守护进程
forcestop 强制中止全部守护进程,用-9杀死全部
killall 杀手全部特定类型的守护进程
cleanlogs 清除日志记录.
cleanalllogs 清除日志记录中的一切.

Ceph子系统操做,能够针对特定的守护类型,经过添加[守护]选项中的某个特定的服务类型。守护程序类型包括:

  • mon
  • osd
  • mds

RUNNING CEPH WITH SYSVINIT

在红帽,Fedora和CentOS上使用传统的sysvinit是运行Ceph推荐的方式,您也能够使用Debian / Ubuntu的较老的版本。

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]

下面的例子说明了一个典型的用例:

sudo /etc/init.d/ceph -a start

一旦你执行的 -a(即全部节点上执行),Ceph的应该开始工做。

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]

一旦你执行的-a(即全部节点上执行),Ceph的应中止运行。

sudo /etc/init.d/ceph -a stop

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

STARTING ALL DAEMONS BY TYPE——启动全部守护类型

要启动对当前的Ceph节点特定类型的全部Ceph的守护进程,请使用如下语法:

sudo /etc/init.d/ceph start {daemon-type}
sudo /etc/init.d/ceph start osd

要启动全部Ceph的守护程序在另外一个节点上的一种特殊类型,请使用如下语法:

sudo /etc/init.d/ceph -a start {daemon-type}
sudo /etc/init.d/ceph -a start osd

STOPPING ALL DAEMONS BY TYPE——中止全部的守护程序类型

要中止全部对当前的Ceph节点特定类型的Ceph的守护进程,请使用如下语法:

sudo /etc/init.d/ceph stop {daemon-type}
sudo /etc/init.d/ceph stop osd

要中止全部CEPH特定类型的另外一个节点上的守护程序,请使用如下语法:

sudo /etc/init.d/ceph -a stop {daemon-type}
sudo /etc/init.d/ceph -a stop osd

STARTING A DAEMON——启动守护进程

要开始在本地Ceph的节点Ceph的守护进程,请使用如下语法:

sudo /etc/init.d/ceph start {daemon-type}.{instance}
sudo /etc/init.d/ceph start osd.0

要开始在另外一个节点上Ceph的守护程序,请使用如下语法:

sudo /etc/init.d/ceph -a start {daemon-type}.{instance}
sudo /etc/init.d/ceph -a start osd.0

STOPPING A DAEMON——中止一个守护进程

要中止在本地Ceph的节点Ceph的守护进程,请使用如下语法:

sudo /etc/init.d/ceph stop {daemon-type}.{instance}
sudo /etc/init.d/ceph stop osd.0

要中止在另外一个节点上Ceph的守护程序,请使用如下语法:

sudo /etc/init.d/ceph -a stop {daemon-type}.{instance}
sudo /etc/init.d/ceph -a stop osd.0

RUNNING CEPH AS A SERVICE——以一个服务程序运行CEPH

当你用mkcephfsb部署 Argonaut or Bobtail .

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]

The following examples illustrates a typical use case:

sudo service ceph -a start

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

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]

For example:

sudo service ceph -a stop

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

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

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

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

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

STARTING A DAEMON

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

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

STOPPING A DAEMON

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

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
相关文章
相关标签/搜索