root / man / gnt-cluster.sgml @ 1abbbbe2
History | View | Annotate | Download (13.4 kB)
1 |
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ |
---|---|
2 |
|
3 |
<!-- Fill in your name for FIRSTNAME and SURNAME. --> |
4 |
<!-- Please adjust the date whenever revising the manpage. --> |
5 |
<!ENTITY dhdate "<date>December 12, 2007</date>"> |
6 |
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are |
7 |
allowed: see man(7), man(1). --> |
8 |
<!ENTITY dhsection "<manvolnum>8</manvolnum>"> |
9 |
<!ENTITY dhucpackage "<refentrytitle>gnt-cluster</refentrytitle>"> |
10 |
<!ENTITY dhpackage "gnt-cluster"> |
11 |
|
12 |
<!ENTITY debian "<productname>Debian</productname>"> |
13 |
<!ENTITY gnu "<acronym>GNU</acronym>"> |
14 |
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> |
15 |
<!ENTITY footer SYSTEM "footer.sgml"> |
16 |
]> |
17 |
|
18 |
<refentry> |
19 |
<refentryinfo> |
20 |
<copyright> |
21 |
<year>2006</year> |
22 |
<year>2007</year> |
23 |
<holder>Google Inc.</holder> |
24 |
</copyright> |
25 |
&dhdate; |
26 |
</refentryinfo> |
27 |
<refmeta> |
28 |
&dhucpackage; |
29 |
|
30 |
&dhsection; |
31 |
<refmiscinfo>ganeti 1.2</refmiscinfo> |
32 |
</refmeta> |
33 |
<refnamediv> |
34 |
<refname>&dhpackage;</refname> |
35 |
|
36 |
<refpurpose>ganeti administration, cluster-wide</refpurpose> |
37 |
</refnamediv> |
38 |
<refsynopsisdiv> |
39 |
<cmdsynopsis> |
40 |
<command>&dhpackage; </command> |
41 |
|
42 |
<arg choice="req">command</arg> |
43 |
<arg>arguments...</arg> |
44 |
</cmdsynopsis> |
45 |
</refsynopsisdiv> |
46 |
<refsect1> |
47 |
<title>DESCRIPTION</title> |
48 |
|
49 |
<para> |
50 |
The <command>&dhpackage;</command> is used for cluster-wide |
51 |
administration in the ganeti system. |
52 |
</para> |
53 |
|
54 |
</refsect1> |
55 |
<refsect1> |
56 |
<title>COMMANDS</title> |
57 |
|
58 |
<refsect2> |
59 |
<title>ADD-TAGS</title> |
60 |
|
61 |
<cmdsynopsis> |
62 |
<command>add-tags</command> |
63 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
64 |
<arg choice="req" |
65 |
rep="repeat"><replaceable>tag</replaceable></arg> |
66 |
</cmdsynopsis> |
67 |
|
68 |
<para> |
69 |
Add tags to the cluster. If any of the tags contains invalid |
70 |
characters, the entire operation will abort. |
71 |
</para> |
72 |
|
73 |
<para> |
74 |
If the <option>--from</option> option is given, the list of |
75 |
tags will be extended with the contents of that file (each |
76 |
line becomes a tag). In this case, there is not need to pass |
77 |
tags on the command line (if you do, both sources will be |
78 |
used). A file name of - will be interpreted as stdin. |
79 |
</para> |
80 |
</refsect2> |
81 |
|
82 |
<refsect2> |
83 |
<title>COMMAND</title> |
84 |
|
85 |
<cmdsynopsis> |
86 |
<command>command</command> |
87 |
<arg>-n <replaceable>node</replaceable></arg> |
88 |
<arg choice="req"><replaceable>command</replaceable></arg> |
89 |
</cmdsynopsis> |
90 |
|
91 |
<para> |
92 |
Executes a command on all nodes. If the option |
93 |
<option>-n</option> is not given, the command will be executed |
94 |
on all nodes, otherwise it will be executed only on the |
95 |
node(s) specified. Use the option multiple times for running |
96 |
it on multiple nodes, like: |
97 |
|
98 |
<screen> |
99 |
# gnt-cluster command -n node1.example.com -n node2.example.com date |
100 |
</screen> |
101 |
|
102 |
</para> |
103 |
|
104 |
<para> |
105 |
The command is constructed by concatenating all other command |
106 |
line arguments. For example, to list the contents of the |
107 |
<filename class="directory">/etc</filename> directory on all |
108 |
nodes, run: |
109 |
|
110 |
<screen> |
111 |
# gnt-cluster command ls -l /etc |
112 |
</screen> |
113 |
|
114 |
and the command which will be executed will be |
115 |
<computeroutput>"ls -l /etc"</computeroutput> |
116 |
</para> |
117 |
</refsect2> |
118 |
|
119 |
<refsect2> |
120 |
<title>COPYFILE</title> |
121 |
|
122 |
<cmdsynopsis> |
123 |
<command>copyfile</command> |
124 |
<arg>-n <replaceable>node</replaceable></arg> |
125 |
<arg choice="req"><replaceable>file</replaceable></arg> |
126 |
</cmdsynopsis> |
127 |
|
128 |
<para> |
129 |
Copies a file to all or to some nodes. The argument specifies |
130 |
the source file (on the current system), the |
131 |
<option>-n</option> argument specifies the target node, or |
132 |
nodes if the option is given multiple times. If |
133 |
<option>-n</option> is not given at all, the file will be |
134 |
copied to all nodes. |
135 |
|
136 |
Example: |
137 |
<screen> |
138 |
# gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test |
139 |
</screen> |
140 |
|
141 |
This will copy the file <filename>/tmp/test</filename> from |
142 |
the current node to the two named nodes. |
143 |
</para> |
144 |
</refsect2> |
145 |
|
146 |
<refsect2> |
147 |
<title>DESTROY</title> |
148 |
|
149 |
<cmdsynopsis> |
150 |
<command>destroy</command> |
151 |
<arg choice="req">--yes-do-it</arg> |
152 |
</cmdsynopsis> |
153 |
|
154 |
<para> |
155 |
Remove all configuration files related to the cluster, so that |
156 |
a <command>gnt-cluster init</command> can be done again |
157 |
afterwards. |
158 |
</para> |
159 |
|
160 |
<para> |
161 |
Since this is a dangerous command, you are required to pass |
162 |
the argument <replaceable>--yes-do-it.</replaceable> |
163 |
</para> |
164 |
</refsect2> |
165 |
|
166 |
<refsect2> |
167 |
<title>GETMASTER</title> |
168 |
|
169 |
<cmdsynopsis> |
170 |
<command>getmaster</command> |
171 |
</cmdsynopsis> |
172 |
|
173 |
<para> |
174 |
Displays the current master node. |
175 |
</para> |
176 |
</refsect2> |
177 |
|
178 |
<refsect2> |
179 |
<title>INFO</title> |
180 |
|
181 |
<cmdsynopsis> |
182 |
<command>info</command> |
183 |
</cmdsynopsis> |
184 |
|
185 |
<para> |
186 |
Shows runtime cluster information: cluster name, architecture |
187 |
(32 or 64 bit), master node, node list and instance list. |
188 |
</para> |
189 |
</refsect2> |
190 |
|
191 |
<refsect2> |
192 |
<title>INIT</title> |
193 |
|
194 |
<cmdsynopsis> |
195 |
<command>init</command> |
196 |
<arg>-s <replaceable>secondary_ip</replaceable></arg> |
197 |
<arg>-b <replaceable>bridge</replaceable></arg> |
198 |
<arg>-t <replaceable>hypervisor-type</replaceable></arg> |
199 |
<arg>-g <replaceable>vg-name</replaceable></arg> |
200 |
<arg>--master-netdev <replaceable>vg-name</replaceable></arg> |
201 |
<arg>-m <replaceable>mac-prefix</replaceable></arg> |
202 |
<arg choice="req"><replaceable>clustername</replaceable></arg> |
203 |
</cmdsynopsis> |
204 |
|
205 |
<para> |
206 |
This commands is only run once initially on the first node of |
207 |
the cluster. It will initialize the cluster configuration and |
208 |
setup ssh-keys and more. |
209 |
</para> |
210 |
|
211 |
<para> |
212 |
Note that the <replaceable>clustername</replaceable> is not |
213 |
any random name. It has to be resolvable to an IP address |
214 |
using DNS, and it is best if you give the fully-qualified |
215 |
domain name. Also it is advisable to reserve a per-cluster |
216 |
unique name, and not try to reuse one of the nodes' names. |
217 |
</para> |
218 |
|
219 |
<para> |
220 |
The cluster can run in two modes: single-home or |
221 |
dual-homed. In the first case, all traffic (both public |
222 |
traffic, inter-node traffic and data replication traffic) goes |
223 |
over the same interface. In the dual-homed case, the data |
224 |
replication traffic goes over the second network. The |
225 |
<option>-s</option> option here marks the cluster as |
226 |
dual-homed and its parameter represents this node's address on |
227 |
the second network. If you initialise the cluster with |
228 |
<option>-s</option>, all nodes added must have a secondary IP |
229 |
as well. |
230 |
</para> |
231 |
|
232 |
<para> |
233 |
Note that for Ganeti it doesn't matter if the secondary |
234 |
network is actually a separate physical network, or is done |
235 |
using tunneling, etc. For performance reasons, it's |
236 |
recommended to use a separate network, of course. |
237 |
</para> |
238 |
|
239 |
<para> |
240 |
The <option>-b</option> option specifies the default bridge |
241 |
for instances. |
242 |
</para> |
243 |
|
244 |
<para> |
245 |
The <option>-t</option> allows to set the hypervisor type of |
246 |
the cluster. Available hypervisor types are: xen-3.0, fake and |
247 |
xen-hvm3.1. The default is the xen-3.0 hypervisor. |
248 |
Note that if you init the cluster with hypervisor-type |
249 |
xen-hvm3.1 you also need to provide the cluster VNC password |
250 |
file <filename>/etc/ganeti/vnc-cluster-password</filename> and |
251 |
the HVM boot ISO image |
252 |
<filename>/srv/ganeti/iso/hvm-install.iso</filename> because |
253 |
instances created by the experimental HVM support require them. |
254 |
</para> |
255 |
|
256 |
<para> |
257 |
The <option>-g</option> option will let you specify a volume group |
258 |
different than xenvg for ganeti to use when creating instance disks. |
259 |
This volume group must have the same name on all nodes. |
260 |
</para> |
261 |
|
262 |
<para> |
263 |
The <option>--master-netdev</option> option is useful for specifying a |
264 |
different interface on which the master will activate its IP address. |
265 |
It's important that all nodes have this interface because you'll need |
266 |
it for a master failover. |
267 |
</para> |
268 |
|
269 |
<para> |
270 |
The <option>-m</option> option will let you specify a three byte prefix |
271 |
under which the virtual MAC addresses of your instances will be |
272 |
generated. The prefix must be specified in the format XX:XX:XX and the |
273 |
default is aa:00:00. |
274 |
</para> |
275 |
|
276 |
</refsect2> |
277 |
|
278 |
<refsect2> |
279 |
<title>LIST-TAGS</title> |
280 |
|
281 |
<cmdsynopsis> |
282 |
<command>list-tags</command> |
283 |
</cmdsynopsis> |
284 |
|
285 |
<para>List the tags of the cluster.</para> |
286 |
</refsect2> |
287 |
|
288 |
<refsect2> |
289 |
<title>MASTERFAILOVER</title> |
290 |
|
291 |
<cmdsynopsis> |
292 |
<command>masterfailover</command> |
293 |
</cmdsynopsis> |
294 |
|
295 |
<para> |
296 |
Failover the master role to the current node. |
297 |
</para> |
298 |
</refsect2> |
299 |
|
300 |
<refsect2> |
301 |
<title>REMOVE-TAGS</title> |
302 |
|
303 |
<cmdsynopsis> |
304 |
<command>remove-tags</command> |
305 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
306 |
<arg choice="req" |
307 |
rep="repeat"><replaceable>tag</replaceable></arg> |
308 |
</cmdsynopsis> |
309 |
|
310 |
<para> |
311 |
Remove tags from the cluster. If any of the tags are not |
312 |
existing on the cluster, the entire operation will abort. |
313 |
</para> |
314 |
|
315 |
<para> |
316 |
If the <option>--from</option> option is given, the list of |
317 |
tags will be extended with the contents of that file (each |
318 |
line becomes a tag). In this case, there is not need to pass |
319 |
tags on the command line (if you do, both sources will be |
320 |
used). A file name of - will be interpreted as stdin. |
321 |
</para> |
322 |
</refsect2> |
323 |
|
324 |
<refsect2> |
325 |
<title>RENAME</title> |
326 |
|
327 |
<cmdsynopsis> |
328 |
<command>rename</command> |
329 |
<arg>-f</arg> |
330 |
<arg choice="req"><replaceable>name</replaceable></arg> |
331 |
</cmdsynopsis> |
332 |
|
333 |
<para> |
334 |
Renames the cluster and in the process updates the master IP |
335 |
address to the one the new name resolves to. At least one of |
336 |
either the name or the IP address must be different, otherwise |
337 |
the operation will be aborted. |
338 |
</para> |
339 |
|
340 |
<para> |
341 |
Note that since this command can be dangerous (especially when |
342 |
run over SSH), the command will require confirmation unless |
343 |
run with the <option>-f</option> option. |
344 |
</para> |
345 |
</refsect2> |
346 |
|
347 |
<refsect2> |
348 |
<title>SEARCH-TAGS</title> |
349 |
|
350 |
<cmdsynopsis> |
351 |
<command>search-tags</command> |
352 |
<arg choice="req"><replaceable>pattern</replaceable></arg> |
353 |
</cmdsynopsis> |
354 |
|
355 |
<para> |
356 |
Searches the tags on all objects in the cluster (the cluster |
357 |
itself, the nodes and the instances) for a given pattern. The |
358 |
pattern is interpreted as a regular expression and a search |
359 |
will be done on it (i.e. the given pattern is not anchored to |
360 |
the beggining of the string; if you want that, prefix the |
361 |
pattern with <literal>^</literal>). |
362 |
</para> |
363 |
|
364 |
<para> |
365 |
If no tags are matching the pattern, the exit code of the |
366 |
command will be one. If there is at least one match, the exit |
367 |
code will be zero. Each match is listed on one line, the |
368 |
object and the tag separated by a space. The cluster will be |
369 |
listed as <filename>/cluster</filename>, a node will be listed |
370 |
as |
371 |
<filename>/nodes/<replaceable>name</replaceable></filename>, |
372 |
and an instance as |
373 |
<filename>/instances/<replaceable>name</replaceable></filename>. |
374 |
Example: |
375 |
</para> |
376 |
<screen> |
377 |
# gnt-cluster search time |
378 |
/cluster ctime:2007-09-01 |
379 |
/nodes/node1.example.com mtime:2007-10-04 |
380 |
</screen> |
381 |
</refsect2> |
382 |
|
383 |
<refsect2> |
384 |
<title>VERIFY</title> |
385 |
|
386 |
<cmdsynopsis> |
387 |
<command>verify</command> |
388 |
</cmdsynopsis> |
389 |
|
390 |
<para> |
391 |
Verify correctness of cluster configuration. This is safe with |
392 |
respect to running instances, and incurs no downtime of the |
393 |
instances. |
394 |
</para> |
395 |
</refsect2> |
396 |
|
397 |
<refsect2> |
398 |
<title>VERIFY-DISKS</title> |
399 |
|
400 |
<cmdsynopsis> |
401 |
<command>verify-disks</command> |
402 |
</cmdsynopsis> |
403 |
|
404 |
<para> |
405 |
The command checks which instances have degraded DRBD disks |
406 |
and activates the disks of those instances. |
407 |
</para> |
408 |
|
409 |
<para> |
410 |
This command is run from the <command>ganeti-watcher</command> |
411 |
tool, which also has a different, complementary algorithm for |
412 |
doing this check. Together, these two should ensure that DRBD |
413 |
disks are kept consistent. |
414 |
</para> |
415 |
</refsect2> |
416 |
|
417 |
<refsect2> |
418 |
<title>VERSION</title> |
419 |
|
420 |
<cmdsynopsis> |
421 |
<command>version</command> |
422 |
</cmdsynopsis> |
423 |
|
424 |
<para> |
425 |
Show the cluster version. |
426 |
</para> |
427 |
</refsect2> |
428 |
|
429 |
</refsect1> |
430 |
|
431 |
&footer; |
432 |
|
433 |
</refentry> |
434 |
|
435 |
<!-- Keep this comment at the end of the file |
436 |
Local variables: |
437 |
mode: sgml |
438 |
sgml-omittag:t |
439 |
sgml-shorttag:t |
440 |
sgml-minimize-attributes:nil |
441 |
sgml-always-quote-attributes:t |
442 |
sgml-indent-step:2 |
443 |
sgml-indent-data:t |
444 |
sgml-parent-document:nil |
445 |
sgml-default-dtd-file:nil |
446 |
sgml-exposed-tags:nil |
447 |
sgml-local-catalogs:nil |
448 |
sgml-local-ecat-files:nil |
449 |
End: |
450 |
--> |