]> git.proxmox.com Git - ceph.git/blame - ceph/doc/rados/operations/operating.rst
update sources to v12.1.1
[ceph.git] / ceph / doc / rados / operations / operating.rst
CommitLineData
7c673cae
FG
1=====================
2 Operating a Cluster
3=====================
4
5.. index:: systemd; operating a cluster
6
7
8Running Ceph with systemd
9==========================
10
224ce89b
WB
11For all distributions that support systemd (CentOS 7, Fedora, Debian
12Jessie 8 and later, SUSE), ceph daemons are now managed using native
13systemd files instead of the legacy sysvinit scripts. For example::
7c673cae
FG
14
15 sudo systemctl start ceph.target # start all daemons
16 sudo systemctl status ceph-osd@12 # check status of osd.12
17
18To list the Ceph systemd units on a node, execute::
19
20 sudo systemctl status ceph\*.service ceph\*.target
21
22Starting all Daemons
23--------------------
24
25To start all daemons on a Ceph Node (irrespective of type), execute the
26following::
27
28 sudo systemctl start ceph.target
29
30
31Stopping all Daemons
32--------------------
33
34To stop all daemons on a Ceph Node (irrespective of type), execute the
35following::
36
37 sudo systemctl stop ceph\*.service ceph\*.target
38
39
40Starting all Daemons by Type
41----------------------------
42
43To start all daemons of a particular type on a Ceph Node, execute one of the
44following::
45
46 sudo systemctl start ceph-osd.target
47 sudo systemctl start ceph-mon.target
48 sudo systemctl start ceph-mds.target
49
50
51Stopping all Daemons by Type
52----------------------------
53
54To stop all daemons of a particular type on a Ceph Node, execute one of the
55following::
56
57 sudo systemctl stop ceph-mon\*.service ceph-mon.target
58 sudo systemctl stop ceph-osd\*.service ceph-osd.target
59 sudo systemctl stop ceph-mds\*.service ceph-mds.target
60
61
62Starting a Daemon
63-----------------
64
65To start a specific daemon instance on a Ceph Node, execute one of the
66following::
67
68 sudo systemctl start ceph-osd@{id}
69 sudo systemctl start ceph-mon@{hostname}
70 sudo systemctl start ceph-mds@{hostname}
71
72For example::
73
74 sudo systemctl start ceph-osd@1
75 sudo systemctl start ceph-mon@ceph-server
76 sudo systemctl start ceph-mds@ceph-server
77
78
79Stopping a Daemon
80-----------------
81
82To stop a specific daemon instance on a Ceph Node, execute one of the
83following::
84
85 sudo systemctl stop ceph-osd@{id}
86 sudo systemctl stop ceph-mon@{hostname}
87 sudo systemctl stop ceph-mds@{hostname}
88
89For example::
90
91 sudo systemctl stop ceph-osd@1
92 sudo systemctl stop ceph-mon@ceph-server
93 sudo systemctl stop ceph-mds@ceph-server
94
95
96.. index:: Ceph service; Upstart; operating a cluster
97
98
99
100Running Ceph with Upstart
101=========================
102
103When deploying Ceph with ``ceph-deploy`` on Ubuntu Trusty, you may start and
104stop Ceph daemons on a :term:`Ceph Node` using the event-based `Upstart`_.
105Upstart does not require you to define daemon instances in the Ceph
106configuration file.
107
108To list the Ceph Upstart jobs and instances on a node, execute::
109
110 sudo initctl list | grep ceph
111
112See `initctl`_ for additional details.
113
114
115Starting all Daemons
116--------------------
117
118To start all daemons on a Ceph Node (irrespective of type), execute the
119following::
120
121 sudo start ceph-all
122
123
124Stopping all Daemons
125--------------------
126
127To stop all daemons on a Ceph Node (irrespective of type), execute the
128following::
129
130 sudo stop ceph-all
131
132
133Starting all Daemons by Type
134----------------------------
135
136To start all daemons of a particular type on a Ceph Node, execute one of the
137following::
138
139 sudo start ceph-osd-all
140 sudo start ceph-mon-all
141 sudo start ceph-mds-all
142
143
144Stopping all Daemons by Type
145----------------------------
146
147To stop all daemons of a particular type on a Ceph Node, execute one of the
148following::
149
150 sudo stop ceph-osd-all
151 sudo stop ceph-mon-all
152 sudo stop ceph-mds-all
153
154
155Starting a Daemon
156-----------------
157
158To start a specific daemon instance on a Ceph Node, execute one of the
159following::
160
161 sudo start ceph-osd id={id}
162 sudo start ceph-mon id={hostname}
163 sudo start ceph-mds id={hostname}
164
165For example::
166
167 sudo start ceph-osd id=1
168 sudo start ceph-mon id=ceph-server
169 sudo start ceph-mds id=ceph-server
170
171
172Stopping a Daemon
173-----------------
174
175To stop a specific daemon instance on a Ceph Node, execute one of the
176following::
177
178 sudo stop ceph-osd id={id}
179 sudo stop ceph-mon id={hostname}
180 sudo stop ceph-mds id={hostname}
181
182For example::
183
184 sudo stop ceph-osd id=1
185 sudo start ceph-mon id=ceph-server
186 sudo start ceph-mds id=ceph-server
187
188
189.. index:: Ceph service; sysvinit; operating a cluster
190
191
192Running Ceph
193============
194
195Each time you to **start**, **restart**, and **stop** Ceph daemons (or your
196entire cluster) you must specify at least one option and one command. You may
197also specify a daemon type or a daemon instance. ::
198
199 {commandline} [options] [commands] [daemons]
200
201
202The ``ceph`` options include:
203
204+-----------------+----------+-------------------------------------------------+
205| Option | Shortcut | Description |
206+=================+==========+=================================================+
207| ``--verbose`` | ``-v`` | Use verbose logging. |
208+-----------------+----------+-------------------------------------------------+
209| ``--valgrind`` | ``N/A`` | (Dev and QA only) Use `Valgrind`_ debugging. |
210+-----------------+----------+-------------------------------------------------+
211| ``--allhosts`` | ``-a`` | Execute on all nodes in ``ceph.conf.`` |
212| | | Otherwise, it only executes on ``localhost``. |
213+-----------------+----------+-------------------------------------------------+
214| ``--restart`` | ``N/A`` | Automatically restart daemon if it core dumps. |
215+-----------------+----------+-------------------------------------------------+
216| ``--norestart`` | ``N/A`` | Don't restart a daemon if it core dumps. |
217+-----------------+----------+-------------------------------------------------+
218| ``--conf`` | ``-c`` | Use an alternate configuration file. |
219+-----------------+----------+-------------------------------------------------+
220
221The ``ceph`` commands include:
222
223+------------------+------------------------------------------------------------+
224| Command | Description |
225+==================+============================================================+
226| ``start`` | Start the daemon(s). |
227+------------------+------------------------------------------------------------+
228| ``stop`` | Stop the daemon(s). |
229+------------------+------------------------------------------------------------+
230| ``forcestop`` | Force the daemon(s) to stop. Same as ``kill -9`` |
231+------------------+------------------------------------------------------------+
232| ``killall`` | Kill all daemons of a particular type. |
233+------------------+------------------------------------------------------------+
234| ``cleanlogs`` | Cleans out the log directory. |
235+------------------+------------------------------------------------------------+
236| ``cleanalllogs`` | Cleans out **everything** in the log directory. |
237+------------------+------------------------------------------------------------+
238
239For subsystem operations, the ``ceph`` service can target specific daemon types
240by adding a particular daemon type for the ``[daemons]`` option. Daemon types
241include:
242
243- ``mon``
244- ``osd``
245- ``mds``
246
247
248
249.. _Valgrind: http://www.valgrind.org/
250.. _Upstart: http://upstart.ubuntu.com/index.html
251.. _initctl: http://manpages.ubuntu.com/manpages/raring/en/man8/initctl.8.html