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
相關文章
相關標籤/搜索