root / man / gnt-node.sgml @ c190e817
History | View | Annotate | Download (34.6 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>June 08, 2010</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-node</refentrytitle>"> |
10 |
<!ENTITY dhpackage "gnt-node"> |
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 |
<year>2008</year> |
24 |
<year>2009</year> |
25 |
<holder>Google Inc.</holder> |
26 |
</copyright> |
27 |
&dhdate; |
28 |
</refentryinfo> |
29 |
<refmeta> |
30 |
&dhucpackage; |
31 |
|
32 |
&dhsection; |
33 |
<refmiscinfo>Ganeti 2.2</refmiscinfo> |
34 |
</refmeta> |
35 |
<refnamediv> |
36 |
<refname>&dhpackage;</refname> |
37 |
|
38 |
<refpurpose>Node administration</refpurpose> |
39 |
</refnamediv> |
40 |
<refsynopsisdiv> |
41 |
<cmdsynopsis> |
42 |
<command>&dhpackage; </command> |
43 |
|
44 |
<arg choice="req">command</arg> |
45 |
<arg>arguments...</arg> |
46 |
</cmdsynopsis> |
47 |
</refsynopsisdiv> |
48 |
<refsect1> |
49 |
<title>DESCRIPTION</title> |
50 |
|
51 |
<para> |
52 |
The <command>&dhpackage;</command> is used for managing the |
53 |
(physical) nodes in the Ganeti system. |
54 |
</para> |
55 |
|
56 |
</refsect1> |
57 |
<refsect1> |
58 |
<title>COMMANDS</title> |
59 |
|
60 |
<refsect2> |
61 |
<title>ADD</title> |
62 |
|
63 |
<cmdsynopsis> |
64 |
<command>add</command> |
65 |
<arg>--readd</arg> |
66 |
<arg>-s <replaceable>secondary_ip</replaceable></arg> |
67 |
<arg>-g <replaceable>nodegroup</replaceable></arg> |
68 |
<arg choice="req"><replaceable>nodename</replaceable></arg> |
69 |
</cmdsynopsis> |
70 |
|
71 |
<para> |
72 |
Adds the given node to the cluster. |
73 |
</para> |
74 |
|
75 |
<para> |
76 |
This command is used to join a new node to the cluster. You |
77 |
will have to provide the password for root of the node to be |
78 |
able to add the node in the cluster. The command needs to be |
79 |
run on the Ganeti master. |
80 |
</para> |
81 |
|
82 |
<para> |
83 |
Note that the command is potentially destructive, as it will |
84 |
forcibly join the specified host the cluster, not paying |
85 |
attention to its current status (it could be already in a |
86 |
cluster, etc.) |
87 |
</para> |
88 |
|
89 |
<para> |
90 |
The <option>-s</option> is used in dual-home clusters and |
91 |
specifies the new node's IP in the secondary network. See the |
92 |
discussion in <citerefentry> |
93 |
<refentrytitle>gnt-cluster</refentrytitle> |
94 |
<manvolnum>8</manvolnum> </citerefentry> for more |
95 |
information. |
96 |
</para> |
97 |
|
98 |
<para> |
99 |
In case you're readding a node after hardware failure, you can |
100 |
use the <option>--readd</option> parameter. In this case, you |
101 |
don't need to pass the secondary IP again, it will reused from |
102 |
the cluster. Also, the <literal>drained</literal> and |
103 |
<literal>offline</literal> flags of the node will be cleared |
104 |
before re-adding it. |
105 |
</para> |
106 |
|
107 |
<para> |
108 |
The <option>-g</option> is used to add the new node into a specific |
109 |
node group, specified by uuid or name. If only one node group exists |
110 |
you can skip this option, otherwise it's mandatory. |
111 |
</para> |
112 |
|
113 |
<para> |
114 |
Example: |
115 |
<screen> |
116 |
# gnt-node add node5.example.com |
117 |
# gnt-node add -s 192.0.2.5 node5.example.com |
118 |
# gnt-node add -g group2 -s 192.0.2.9 node9.group2.example.com |
119 |
</screen> |
120 |
</para> |
121 |
</refsect2> |
122 |
|
123 |
<refsect2> |
124 |
<title>ADD-TAGS</title> |
125 |
|
126 |
<cmdsynopsis> |
127 |
<command>add-tags</command> |
128 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
129 |
<arg choice="req"><replaceable>nodename</replaceable></arg> |
130 |
<arg choice="req" |
131 |
rep="repeat"><replaceable>tag</replaceable></arg> |
132 |
</cmdsynopsis> |
133 |
|
134 |
<para> |
135 |
Add tags to the given node. If any of the tags contains |
136 |
invalid characters, the entire operation will abort. |
137 |
</para> |
138 |
|
139 |
<para> |
140 |
If the <option>--from</option> option is given, the list of |
141 |
tags will be extended with the contents of that file (each |
142 |
line becomes a tag). In this case, there is not need to pass |
143 |
tags on the command line (if you do, both sources will be |
144 |
used). A file name of - will be interpreted as stdin. |
145 |
</para> |
146 |
</refsect2> |
147 |
|
148 |
<refsect2> |
149 |
<title>EVACUATE</title> |
150 |
|
151 |
<cmdsynopsis> |
152 |
<command>evacuate</command> |
153 |
<arg>-f</arg> |
154 |
<arg>--early-release</arg> |
155 |
<group> |
156 |
<arg>--iallocator <replaceable>NAME</replaceable></arg> |
157 |
<arg>--new-secondary <replaceable>destination_node</replaceable></arg> |
158 |
</group> |
159 |
<arg choice="req" rep="repeat"><replaceable>node</replaceable></arg> |
160 |
</cmdsynopsis> |
161 |
|
162 |
<para> |
163 |
This command will move all secondary instances away from the |
164 |
given node(s). It works only for instances having a drbd disk |
165 |
template. |
166 |
</para> |
167 |
|
168 |
<para> |
169 |
The new location for the instances can be specified in two ways: |
170 |
<itemizedlist> |
171 |
<listitem> |
172 |
<simpara>as a single node for all instances, via the |
173 |
<option>--new-secondary</option> option</simpara> |
174 |
</listitem> |
175 |
<listitem> |
176 |
<simpara>or via the <option>--iallocator</option> option, |
177 |
giving a script name as parameter, so each instance will |
178 |
be in turn placed on the (per the script) optimal |
179 |
node</simpara> |
180 |
</listitem> |
181 |
</itemizedlist> |
182 |
</para> |
183 |
|
184 |
<para> |
185 |
The <option>--early-release</option> changes the code so that |
186 |
the old storage on node being evacuated is removed early |
187 |
(before the resync is completed) and the internal Ganeti locks |
188 |
are also released for both the current secondary and the new |
189 |
secondary, thus allowing more parallelism in the cluster |
190 |
operation. This should be used only when recovering from a |
191 |
disk failure on the current secondary (thus the old storage is |
192 |
already broken) or when the storage on the primary node is |
193 |
known to be fine (thus we won't need the old storage for |
194 |
potential recovery). |
195 |
</para> |
196 |
|
197 |
<para> |
198 |
Example: |
199 |
<screen> |
200 |
# gnt-node evacuate -I dumb node3.example.com |
201 |
</screen> |
202 |
</para> |
203 |
</refsect2> |
204 |
|
205 |
<refsect2> |
206 |
<title>FAILOVER</title> |
207 |
|
208 |
<cmdsynopsis> |
209 |
<command>failover</command> |
210 |
<arg>-f</arg> |
211 |
<arg>--ignore-consistency</arg> |
212 |
<arg choice="req"><replaceable>node</replaceable></arg> |
213 |
</cmdsynopsis> |
214 |
|
215 |
<para> |
216 |
This command will fail over all instances having the given |
217 |
node as primary to their secondary nodes. This works only for |
218 |
instances having a drbd disk template. |
219 |
</para> |
220 |
|
221 |
<para> |
222 |
Normally the failover will check the consistency of the disks |
223 |
before failing over the instance. If you are trying to migrate |
224 |
instances off a dead node, this will fail. Use the |
225 |
<option>--ignore-consistency</option> option for this purpose. |
226 |
</para> |
227 |
|
228 |
<para> |
229 |
Example: |
230 |
<screen> |
231 |
# gnt-node failover node1.example.com |
232 |
</screen> |
233 |
</para> |
234 |
</refsect2> |
235 |
|
236 |
<refsect2> |
237 |
<title>INFO</title> |
238 |
|
239 |
<cmdsynopsis> |
240 |
<command>info</command> |
241 |
<arg rep="repeat"><replaceable>node</replaceable></arg> |
242 |
</cmdsynopsis> |
243 |
|
244 |
<para> |
245 |
Show detailed information about the nodes in the cluster. If you |
246 |
don't give any arguments, all nodes will be shows, otherwise the |
247 |
output will be restricted to the given names. |
248 |
</para> |
249 |
</refsect2> |
250 |
|
251 |
<refsect2> |
252 |
<title>LIST</title> |
253 |
|
254 |
<cmdsynopsis> |
255 |
<command>list</command> |
256 |
<arg>--sync</arg> |
257 |
<sbr> |
258 |
<arg>--no-headers</arg> |
259 |
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg> |
260 |
<sbr> |
261 |
<arg>--units=<replaceable>UNITS</replaceable></arg> |
262 |
<arg>-o <replaceable>[+]FIELD,...</replaceable></arg> |
263 |
<sbr> |
264 |
<arg>--roman</arg> |
265 |
<sbr> |
266 |
<arg rep="repeat">node</arg> |
267 |
</cmdsynopsis> |
268 |
|
269 |
<para> |
270 |
Lists the nodes in the cluster. |
271 |
</para> |
272 |
|
273 |
<para> |
274 |
The <option>--no-headers</option> option will skip the initial |
275 |
header line. The <option>--separator</option> option takes an |
276 |
argument which denotes what will be used between the output |
277 |
fields. Both these options are to help scripting. |
278 |
</para> |
279 |
|
280 |
<para> |
281 |
The units used to display the numeric values in the output |
282 |
varies, depending on the options given. By default, the values |
283 |
will be formatted in the most appropriate unit. If the |
284 |
<option>--separator</option> option is given, then the values |
285 |
are shown in mebibytes to allow parsing by scripts. In both |
286 |
cases, the <option>--units</option> option can be used to |
287 |
enforce a given output unit. |
288 |
</para> |
289 |
|
290 |
<para> |
291 |
By default, the query of nodes will be done in parallel with |
292 |
any running jobs. This might give inconsistent results for the |
293 |
free disk/memory. The <option>--sync</option> can be used to |
294 |
grab locks for all the nodes and ensure consistent view of the |
295 |
cluster (but this might stall the query for a long time). |
296 |
</para> |
297 |
|
298 |
<para> |
299 |
Passing the <option>--roman</option> option gnt-node list will try to |
300 |
output some of its fields in a latin-friendly way. This is not the |
301 |
default for backwards compatibility. |
302 |
</para> |
303 |
|
304 |
<para> |
305 |
The <option>-o</option> option takes a comma-separated list of |
306 |
output fields. The available fields and their meaning are: |
307 |
<variablelist> |
308 |
<varlistentry> |
309 |
<term>name</term> |
310 |
<listitem> |
311 |
<simpara>the node name</simpara> |
312 |
</listitem> |
313 |
</varlistentry> |
314 |
<varlistentry> |
315 |
<term>pinst_cnt</term> |
316 |
<listitem> |
317 |
<simpara>the number of instances having this node as |
318 |
primary</simpara> |
319 |
</listitem> |
320 |
</varlistentry> |
321 |
<varlistentry> |
322 |
<term>pinst_list</term> |
323 |
<listitem> |
324 |
<simpara>the list of instances having this node as |
325 |
primary, comma separated</simpara> |
326 |
</listitem> |
327 |
</varlistentry> |
328 |
<varlistentry> |
329 |
<term>sinst_cnt</term> |
330 |
<listitem> |
331 |
<simpara>the number of instances having this node as a |
332 |
secondary node</simpara> |
333 |
</listitem> |
334 |
</varlistentry> |
335 |
<varlistentry> |
336 |
<term>sinst_list</term> |
337 |
<listitem> |
338 |
<simpara>the list of instances having this node as a |
339 |
secondary node, comma separated</simpara> |
340 |
</listitem> |
341 |
</varlistentry> |
342 |
<varlistentry> |
343 |
<term>pip</term> |
344 |
<listitem> |
345 |
<simpara>the primary ip of this node (used for cluster |
346 |
communication)</simpara> |
347 |
</listitem> |
348 |
</varlistentry> |
349 |
<varlistentry> |
350 |
<term>sip</term> |
351 |
<listitem> |
352 |
<simpara> |
353 |
the secondary ip of this node (used for data |
354 |
replication in dual-ip clusters, see <citerefentry> |
355 |
<refentrytitle>gnt-cluster</refentrytitle> |
356 |
<manvolnum>8</manvolnum> |
357 |
</citerefentry> |
358 |
</simpara> |
359 |
</listitem> |
360 |
</varlistentry> |
361 |
<varlistentry> |
362 |
<term>dtotal</term> |
363 |
<listitem> |
364 |
<simpara>total disk space in the volume group used for |
365 |
instance disk allocations</simpara> |
366 |
</listitem> |
367 |
</varlistentry> |
368 |
<varlistentry> |
369 |
<term>dfree</term> |
370 |
<listitem> |
371 |
<simpara>available disk space in the volume group</simpara> |
372 |
</listitem> |
373 |
</varlistentry> |
374 |
<varlistentry> |
375 |
<term>mtotal</term> |
376 |
<listitem> |
377 |
<simpara>total memory on the physical node</simpara> |
378 |
</listitem> |
379 |
</varlistentry> |
380 |
<varlistentry> |
381 |
<term>mnode</term> |
382 |
<listitem> |
383 |
<simpara>the memory used by the node itself</simpara> |
384 |
</listitem> |
385 |
</varlistentry> |
386 |
<varlistentry> |
387 |
<term>mfree</term> |
388 |
<listitem> |
389 |
<simpara>memory available for instance |
390 |
allocations</simpara> |
391 |
</listitem> |
392 |
</varlistentry> |
393 |
<varlistentry> |
394 |
<term>bootid</term> |
395 |
<listitem> |
396 |
<simpara>the node bootid value; this is a linux specific |
397 |
feature that assigns a new UUID to the node at each boot |
398 |
and can be use to detect node reboots (by tracking |
399 |
changes in this value)</simpara> |
400 |
</listitem> |
401 |
</varlistentry> |
402 |
<varlistentry> |
403 |
<term>tags</term> |
404 |
<listitem> |
405 |
<simpara>comma-separated list of the node's |
406 |
tags</simpara> |
407 |
</listitem> |
408 |
</varlistentry> |
409 |
<varlistentry> |
410 |
<term>serial_no</term> |
411 |
<listitem> |
412 |
<simpara>the so called 'serial number' of the node; |
413 |
this is a numeric field that is incremented each time |
414 |
the node is modified, and it can be used to detect |
415 |
modifications</simpara> |
416 |
</listitem> |
417 |
</varlistentry> |
418 |
<varlistentry> |
419 |
<term>ctime</term> |
420 |
<listitem> |
421 |
<para> |
422 |
the creation time of the node; note that this field |
423 |
contains spaces and as such it's harder to parse |
424 |
</para> |
425 |
<para> |
426 |
if this attribute is not present (e.g. when upgrading |
427 |
from older versions), then "N/A" will be shown instead |
428 |
</para> |
429 |
</listitem> |
430 |
</varlistentry> |
431 |
<varlistentry> |
432 |
<term>mtime</term> |
433 |
<listitem> |
434 |
<para> |
435 |
the last modification time of the node; note that this |
436 |
field contains spaces and as such it's harder to parse |
437 |
</para> |
438 |
<para> |
439 |
if this attribute is not present (e.g. when upgrading |
440 |
from older versions), then "N/A" will be shown instead |
441 |
</para> |
442 |
</listitem> |
443 |
</varlistentry> |
444 |
<varlistentry> |
445 |
<term>uuid</term> |
446 |
<listitem> |
447 |
<simpara>Show the UUID of the node (generated |
448 |
automatically by Ganeti)</simpara> |
449 |
</listitem> |
450 |
</varlistentry> |
451 |
|
452 |
<varlistentry> |
453 |
<term>ctotal</term> |
454 |
<listitem> |
455 |
<simpara>the toal number of logical processors</simpara> |
456 |
</listitem> |
457 |
</varlistentry> |
458 |
<varlistentry> |
459 |
<term>cnodes</term> |
460 |
<listitem> |
461 |
<simpara>the number of NUMA domains on the node, if the |
462 |
hypervisor can export this information</simpara> |
463 |
</listitem> |
464 |
</varlistentry> |
465 |
<varlistentry> |
466 |
<term>csockets</term> |
467 |
<listitem> |
468 |
<simpara>the number of physical CPU sockets, if the |
469 |
hypervisor can export this information</simpara> |
470 |
</listitem> |
471 |
</varlistentry> |
472 |
<varlistentry> |
473 |
<term>master_candidate</term> |
474 |
<listitem> |
475 |
<simpara>whether the node is a master candidate or not</simpara> |
476 |
</listitem> |
477 |
</varlistentry> |
478 |
<varlistentry> |
479 |
<term>drained</term> |
480 |
<listitem> |
481 |
<simpara>whether the node is drained or not; the cluster |
482 |
still communicates with drained nodes but excludes them |
483 |
from allocation operations</simpara> |
484 |
</listitem> |
485 |
</varlistentry> |
486 |
<varlistentry> |
487 |
<term>offline</term> |
488 |
<listitem> |
489 |
<simpara>whether the node is offline or not; if offline, |
490 |
the cluster does not communicate with offline nodes; |
491 |
useful for nodes that are not reachable in order to |
492 |
avoid delays</simpara> |
493 |
</listitem> |
494 |
</varlistentry> |
495 |
<varlistentry> |
496 |
<term>role</term> |
497 |
<listitem> |
498 |
<para> |
499 |
A condensed version of the node flags; this field will |
500 |
output a one-character field, with the following |
501 |
possible values: |
502 |
<itemizedlist> |
503 |
<listitem> |
504 |
<simpara><emphasis>M</emphasis> for the master |
505 |
node</simpara> |
506 |
</listitem> |
507 |
<listitem> |
508 |
<simpara><emphasis>C</emphasis> for a master |
509 |
candidate</simpara> |
510 |
</listitem> |
511 |
<listitem> |
512 |
<simpara><emphasis>R</emphasis> for a regular |
513 |
node</simpara> |
514 |
</listitem> |
515 |
<listitem> |
516 |
<simpara><emphasis>D</emphasis> for a drained |
517 |
node</simpara> |
518 |
</listitem> |
519 |
<listitem> |
520 |
<simpara><emphasis>O</emphasis> for an offline |
521 |
node</simpara> |
522 |
</listitem> |
523 |
</itemizedlist> |
524 |
</para> |
525 |
</listitem> |
526 |
</varlistentry> |
527 |
<varlistentry> |
528 |
<term>master_capable</term> |
529 |
<listitem> |
530 |
<para>whether the node can become a master candidate</para> |
531 |
</listitem> |
532 |
</varlistentry> |
533 |
<varlistentry> |
534 |
<term>vm_capable</term> |
535 |
<listitem> |
536 |
<para>whether the node can host instances</para> |
537 |
</listitem> |
538 |
</varlistentry> |
539 |
</variablelist> |
540 |
</para> |
541 |
|
542 |
<para> |
543 |
If the value of the option starts with the character |
544 |
<constant>+</constant>, the new fields will be added to the |
545 |
default list. This allows to quickly see the default list plus |
546 |
a few other fields, instead of retyping the entire list of |
547 |
fields. |
548 |
</para> |
549 |
|
550 |
<para> |
551 |
Note that some of this fields are known from the configuration |
552 |
of the cluster (e.g. <simplelist type="inline"> |
553 |
<member>name</member> <member>pinst</member> |
554 |
<member>sinst</member> <member>pip</member> |
555 |
<member>sip</member> </simplelist> and thus the master does |
556 |
not need to contact the node for this data (making the listing |
557 |
fast if only fields from this set are selected), whereas the |
558 |
other fields are "live" fields and we need to make a query to |
559 |
the cluster nodes. |
560 |
</para> |
561 |
|
562 |
<para> |
563 |
Depending on the virtualization type and implementation |
564 |
details, the mtotal, mnode and mfree may have slighly varying |
565 |
meanings. For example, some solutions share the node memory |
566 |
with the pool of memory used for instances |
567 |
(<acronym>KVM</acronym>), whereas others have separate memory |
568 |
for the node and for the instances (Xen). |
569 |
</para> |
570 |
|
571 |
<para> |
572 |
If no node names are given, then all nodes are |
573 |
queried. Otherwise, only the given nodes will be listed. |
574 |
</para> |
575 |
</refsect2> |
576 |
|
577 |
<refsect2> |
578 |
<title>LIST-TAGS</title> |
579 |
|
580 |
<cmdsynopsis> |
581 |
<command>list-tags</command> |
582 |
<arg choice="req"><replaceable>nodename</replaceable></arg> |
583 |
</cmdsynopsis> |
584 |
|
585 |
<para>List the tags of the given node.</para> |
586 |
</refsect2> |
587 |
|
588 |
<refsect2> |
589 |
<title>MIGRATE</title> |
590 |
<cmdsynopsis> |
591 |
<command>migrate</command> |
592 |
<arg>-f</arg> |
593 |
<arg>--non-live</arg> |
594 |
<arg>--migration-mode=live|non-live</arg> |
595 |
<arg choice="req"><replaceable>node</replaceable></arg> |
596 |
</cmdsynopsis> |
597 |
|
598 |
<para> |
599 |
This command will migrate all instances having the given |
600 |
node as primary to their secondary nodes. This works only for |
601 |
instances having a drbd disk template. |
602 |
</para> |
603 |
|
604 |
<para> |
605 |
As for the <command>gnt-instance migrate</command> command, |
606 |
the options <option>--no-live</option> |
607 |
and <option>--migration-mode</option> can be given to |
608 |
influence the migration type. |
609 |
</para> |
610 |
|
611 |
<para> |
612 |
Example: |
613 |
<screen> |
614 |
# gnt-node migrate node1.example.com |
615 |
</screen> |
616 |
</para> |
617 |
|
618 |
</refsect2> |
619 |
|
620 |
<refsect2> |
621 |
<title>MODIFY</title> |
622 |
<cmdsynopsis> |
623 |
<command>modify</command> |
624 |
<arg>-f</arg> |
625 |
<arg>--submit</arg> |
626 |
<arg>--master-candidate=<option>yes|no</option></arg> |
627 |
<arg>--drained=<option>yes|no</option></arg> |
628 |
<arg>--offline=<option>yes|no</option></arg> |
629 |
<arg>--auto-promote</arg> |
630 |
<arg choice="req"><replaceable>node</replaceable></arg> |
631 |
</cmdsynopsis> |
632 |
|
633 |
<para> |
634 |
This command changes the role of the node. Each options takes |
635 |
either a literal <literal>yes</literal> or |
636 |
<literal>no</literal>, and only one option should be given as |
637 |
<literal>yes</literal>. The meaning of the roles are described |
638 |
in the manpage <citerefentry> |
639 |
<refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum> |
640 |
</citerefentry>. |
641 |
</para> |
642 |
|
643 |
<para> |
644 |
In case a node is demoted from the master candidate role, the |
645 |
operation will be refused unless you pass |
646 |
the <option>--auto-promote</option> option. This option will |
647 |
cause the operation to lock all cluster nodes (thus it will |
648 |
not be able to run in parallel with most other jobs), but it |
649 |
allows automated maintenance of the cluster candidate pool. If |
650 |
locking all cluster node is too expensive, another option is |
651 |
to promote manually another node to master candidate before |
652 |
demoting the current one. |
653 |
</para> |
654 |
|
655 |
<para> |
656 |
Example (setting a node offline, which will demote it from |
657 |
master candidate role if is in that role): |
658 |
<screen> |
659 |
# gnt-node modify --offline=yes node1.example.com |
660 |
</screen> |
661 |
</para> |
662 |
|
663 |
<para>Example (setting the node back to online and master candidate): |
664 |
<screen> |
665 |
# gnt-node modify --offline=no --master-candidate=yes node1.example.com |
666 |
</screen> |
667 |
</para> |
668 |
|
669 |
</refsect2> |
670 |
|
671 |
<refsect2> |
672 |
<title>REMOVE</title> |
673 |
|
674 |
<cmdsynopsis> |
675 |
<command>remove</command> |
676 |
<arg choice="req"><replaceable>nodename</replaceable></arg> |
677 |
</cmdsynopsis> |
678 |
|
679 |
<para> |
680 |
Removes a node from the cluster. Instances must be removed or |
681 |
migrated to another cluster before. |
682 |
</para> |
683 |
|
684 |
<para> |
685 |
Example: |
686 |
<screen> |
687 |
# gnt-node remove node5.example.com |
688 |
</screen> |
689 |
</para> |
690 |
</refsect2> |
691 |
|
692 |
<refsect2> |
693 |
<title>REMOVE-TAGS</title> |
694 |
<cmdsynopsis> |
695 |
<command>remove-tags</command> |
696 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
697 |
<arg choice="req"><replaceable>nodename</replaceable></arg> |
698 |
<arg choice="req" |
699 |
rep="repeat"><replaceable>tag</replaceable></arg> |
700 |
</cmdsynopsis> |
701 |
|
702 |
<para> |
703 |
Remove tags from the given node. If any of the tags are not |
704 |
existing on the node, the entire operation will abort. |
705 |
</para> |
706 |
|
707 |
<para> |
708 |
If the <option>--from</option> option is given, the list of |
709 |
tags will be extended with the contents of that file (each |
710 |
line becomes a tag). In this case, there is not need to pass |
711 |
tags on the command line (if you do, both sources will be |
712 |
used). A file name of - will be interpreted as stdin. |
713 |
</para> |
714 |
</refsect2> |
715 |
|
716 |
<refsect2> |
717 |
<title>VOLUMES</title> |
718 |
|
719 |
<cmdsynopsis> |
720 |
<command>volumes</command> |
721 |
<arg>--no-headers</arg> |
722 |
<arg>--human-readable</arg> |
723 |
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg> |
724 |
<arg>--output=<replaceable>FIELDS</replaceable></arg> |
725 |
<sbr> |
726 |
<arg rep="repeat"><replaceable>node</replaceable></arg> |
727 |
</cmdsynopsis> |
728 |
|
729 |
<para> |
730 |
Lists all logical volumes and their physical disks from the node(s) |
731 |
provided. |
732 |
</para> |
733 |
|
734 |
<para> |
735 |
The <option>--no-headers</option> option will skip the initial |
736 |
header line. The <option>--separator</option> option takes an |
737 |
argument which denotes what will be used between the output |
738 |
fields. Both these options are to help scripting. |
739 |
</para> |
740 |
|
741 |
<para> |
742 |
The units used to display the numeric values in the output |
743 |
varies, depending on the options given. By default, the values |
744 |
will be formatted in the most appropriate unit. If the |
745 |
<option>--separator</option> option is given, then the values |
746 |
are shown in mebibytes to allow parsing by scripts. In both |
747 |
cases, the <option>--units</option> option can be used to |
748 |
enforce a given output unit. |
749 |
</para> |
750 |
|
751 |
<para> |
752 |
The <option>-o</option> option takes a comma-separated list of |
753 |
output fields. The available fields and their meaning are: |
754 |
<variablelist> |
755 |
<varlistentry> |
756 |
<term>node</term> |
757 |
<listitem> |
758 |
<simpara>the node name on which the volume exists</simpara> |
759 |
</listitem> |
760 |
</varlistentry> |
761 |
<varlistentry> |
762 |
<term>phys</term> |
763 |
<listitem> |
764 |
<simpara>the physical drive (on which the LVM physical |
765 |
volume lives)</simpara> |
766 |
</listitem> |
767 |
</varlistentry> |
768 |
<varlistentry> |
769 |
<term>vg</term> |
770 |
<listitem> |
771 |
<simpara>the volume group name</simpara> |
772 |
</listitem> |
773 |
</varlistentry> |
774 |
<varlistentry> |
775 |
<term>name</term> |
776 |
<listitem> |
777 |
<simpara>the logical volume name</simpara> |
778 |
</listitem> |
779 |
</varlistentry> |
780 |
<varlistentry> |
781 |
<term>size</term> |
782 |
<listitem> |
783 |
<simpara>the logical volume size</simpara> |
784 |
</listitem> |
785 |
</varlistentry> |
786 |
<varlistentry> |
787 |
<term>instance</term> |
788 |
<listitem> |
789 |
<simpara>The name of the instance to which this volume |
790 |
belongs, or (in case it's an orphan volume) the |
791 |
character <quote>-</quote></simpara> |
792 |
</listitem> |
793 |
</varlistentry> |
794 |
</variablelist> |
795 |
</para> |
796 |
|
797 |
<para> |
798 |
Example: |
799 |
<screen> |
800 |
# gnt-node volumes node5.example.com |
801 |
Node PhysDev VG Name Size Instance |
802 |
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128 instance1.example.com |
803 |
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256 instance1.example.com |
804 |
</screen> |
805 |
</para> |
806 |
</refsect2> |
807 |
|
808 |
<refsect2> |
809 |
<title>LIST-STORAGE</title> |
810 |
|
811 |
<cmdsynopsis> |
812 |
<command>list-storage</command> |
813 |
<arg>--no-headers</arg> |
814 |
<arg>--human-readable</arg> |
815 |
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg> |
816 |
<arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg> |
817 |
<arg>--output=<replaceable>FIELDS</replaceable></arg> |
818 |
<sbr> |
819 |
<arg rep="repeat"><replaceable>node</replaceable></arg> |
820 |
</cmdsynopsis> |
821 |
|
822 |
<para> |
823 |
Lists the available storage units and their details for the |
824 |
given node(s). |
825 |
</para> |
826 |
|
827 |
<para> |
828 |
The <option>--no-headers</option> option will skip the initial header |
829 |
line. The <option>--separator</option> option takes an argument which |
830 |
denotes what will be used between the output fields. Both these options |
831 |
are to help scripting. |
832 |
</para> |
833 |
|
834 |
<para> |
835 |
The units used to display the numeric values in the output varies, |
836 |
depending on the options given. By default, the values will be |
837 |
formatted in the most appropriate unit. If the |
838 |
<option>--separator</option> option is given, then the values are shown |
839 |
in mebibytes to allow parsing by scripts. In both cases, the |
840 |
<option>--units</option> option can be used to enforce a given output |
841 |
unit. |
842 |
</para> |
843 |
|
844 |
<para> |
845 |
The <option>--storage-type</option> option can be used to choose a |
846 |
storage unit type. Possible choices are <literal>lvm-pv</literal>, |
847 |
<literal>lvm-vg</literal> or <literal>file</literal>. |
848 |
</para> |
849 |
|
850 |
<para> |
851 |
The <option>-o</option> option takes a comma-separated list of |
852 |
output fields. The available fields and their meaning are: |
853 |
<variablelist> |
854 |
<varlistentry> |
855 |
<term>node</term> |
856 |
<listitem> |
857 |
<simpara>the node name on which the volume exists</simpara> |
858 |
</listitem> |
859 |
</varlistentry> |
860 |
<varlistentry> |
861 |
<term>type</term> |
862 |
<listitem> |
863 |
<simpara>the type of the storage unit (currently just |
864 |
what is passed in via |
865 |
<option>--storage-type</option>)</simpara> |
866 |
</listitem> |
867 |
</varlistentry> |
868 |
<varlistentry> |
869 |
<term>name</term> |
870 |
<listitem> |
871 |
<simpara>the path/identifier of the storage unit</simpara> |
872 |
</listitem> |
873 |
</varlistentry> |
874 |
<varlistentry> |
875 |
<term>size</term> |
876 |
<listitem> |
877 |
<simpara> |
878 |
total size of the unit; for the file type see a note below |
879 |
</simpara> |
880 |
</listitem> |
881 |
</varlistentry> |
882 |
<varlistentry> |
883 |
<term>used</term> |
884 |
<listitem> |
885 |
<simpara> |
886 |
used space in the unit; for the file type see a note below |
887 |
</simpara> |
888 |
</listitem> |
889 |
</varlistentry> |
890 |
<varlistentry> |
891 |
<term>free</term> |
892 |
<listitem> |
893 |
<simpara> |
894 |
available disk space |
895 |
</simpara> |
896 |
</listitem> |
897 |
</varlistentry> |
898 |
<varlistentry> |
899 |
<term>allocatable</term> |
900 |
<listitem> |
901 |
<simpara> |
902 |
whether we the unit is available for allocation |
903 |
(only <literal>lvm-pv</literal> can change this |
904 |
setting, the other types always report true) |
905 |
</simpara> |
906 |
</listitem> |
907 |
</varlistentry> |
908 |
</variablelist> |
909 |
</para> |
910 |
|
911 |
<para> |
912 |
Note that for the <quote>file</quote> type, the total disk |
913 |
space might not equal to the sum of used and free, due to the |
914 |
method Ganeti uses to compute each of them. The total and free |
915 |
values are computed as the total and free space values for the |
916 |
filesystem to which the directory belongs, but the used space |
917 |
is computed from the used space under that directory |
918 |
<emphasis>only</emphasis>, which might not be necessarily the |
919 |
root of the filesystem, and as such there could be files |
920 |
outside the file storage directory using disk space and |
921 |
causing a mismatch in the values. |
922 |
</para> |
923 |
|
924 |
<para> |
925 |
Example: |
926 |
<screen> |
927 |
node1# gnt-node list-storage node2 |
928 |
Node Type Name Size Used Free Allocatable |
929 |
node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y |
930 |
node2 lvm-pv /dev/sdb1 698.6G 0M 698.6G Y |
931 |
</screen> |
932 |
</para> |
933 |
</refsect2> |
934 |
|
935 |
<refsect2> |
936 |
<title>MODIFY-STORAGE</title> |
937 |
|
938 |
<cmdsynopsis> |
939 |
<command>modify-storage</command> |
940 |
<arg><option>--allocatable=yes|no</option></arg> |
941 |
<sbr> |
942 |
<arg choice="req"><replaceable>node</replaceable></arg> |
943 |
<arg choice="req"><replaceable>storage-type</replaceable></arg> |
944 |
<arg choice="req"><replaceable>volume-name</replaceable></arg> |
945 |
</cmdsynopsis> |
946 |
|
947 |
<para> |
948 |
Modifies storage volumes on a node. Only LVM physical volumes |
949 |
can be modified at the moment. They have a storage type |
950 |
of <quote>lvm-pv</quote>. |
951 |
</para> |
952 |
|
953 |
<para> |
954 |
Example: |
955 |
<screen> |
956 |
# gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1 |
957 |
</screen> |
958 |
</para> |
959 |
</refsect2> |
960 |
|
961 |
<refsect2> |
962 |
<title>REPAIR-STORAGE</title> |
963 |
|
964 |
<cmdsynopsis> |
965 |
<command>repair-storage</command> |
966 |
<arg>--ignore-consistency</arg> |
967 |
<arg choice="req"><replaceable>node</replaceable></arg> |
968 |
<arg choice="req"><replaceable>storage-type</replaceable></arg> |
969 |
<arg choice="req"><replaceable>volume-name</replaceable></arg> |
970 |
</cmdsynopsis> |
971 |
|
972 |
<para> |
973 |
Repairs a storage volume on a node. Only LVM volume groups can |
974 |
be repaired at this time. They have the storage type |
975 |
<quote>lvm-vg</quote>. |
976 |
</para> |
977 |
|
978 |
<para> |
979 |
On LVM volume groups, <command>repair-storage</command> runs |
980 |
<quote>vgreduce --removemissing</quote>. |
981 |
</para> |
982 |
|
983 |
<caution> |
984 |
<para> |
985 |
Running this command can lead to data loss. Use it with care. |
986 |
</para> |
987 |
</caution> |
988 |
|
989 |
<para> |
990 |
The <option>--ignore-consistency</option> option will ignore |
991 |
any inconsistent disks (on the nodes paired with this |
992 |
one). Use of this option is most likely to lead to data-loss. |
993 |
</para> |
994 |
|
995 |
<para> |
996 |
Example: |
997 |
<screen> |
998 |
# gnt-node repair-storage node5.example.com lvm-vg xenvg |
999 |
</screen> |
1000 |
</para> |
1001 |
</refsect2> |
1002 |
|
1003 |
<refsect2> |
1004 |
<title>POWERCYCLE</title> |
1005 |
|
1006 |
<cmdsynopsis> |
1007 |
<command>powercycle</command> |
1008 |
<arg><option>--yes</option></arg> |
1009 |
<arg><option>--force</option></arg> |
1010 |
<arg choice="req"><replaceable>node</replaceable></arg> |
1011 |
</cmdsynopsis> |
1012 |
|
1013 |
<para> |
1014 |
This commands (tries to) forcefully reboot a node. It is a |
1015 |
command that can be used if the node environemnt is broken, |
1016 |
such that the admin can no longer login over ssh, but the |
1017 |
Ganeti node daemon is still working. |
1018 |
</para> |
1019 |
|
1020 |
<para> |
1021 |
Note that this command is not guaranteed to work; it depends |
1022 |
on the hypervisor how effective is the reboot attempt. For |
1023 |
Linux, this command require that the kernel option |
1024 |
<literal>CONFIG_MAGIC_SYSRQ</literal> is enabled. |
1025 |
</para> |
1026 |
|
1027 |
<para> |
1028 |
The <option>--yes</option> option can be used to skip |
1029 |
confirmation, while the <option>--force</option> option is |
1030 |
needed if the target node is the master node. |
1031 |
</para> |
1032 |
|
1033 |
</refsect1> |
1034 |
|
1035 |
&footer; |
1036 |
|
1037 |
</refentry> |
1038 |
|
1039 |
<!-- Keep this comment at the end of the file |
1040 |
Local variables: |
1041 |
mode: sgml |
1042 |
sgml-omittag:t |
1043 |
sgml-shorttag:t |
1044 |
sgml-minimize-attributes:nil |
1045 |
sgml-always-quote-attributes:t |
1046 |
sgml-indent-step:2 |
1047 |
sgml-indent-data:t |
1048 |
sgml-parent-document:nil |
1049 |
sgml-default-dtd-file:nil |
1050 |
sgml-exposed-tags:nil |
1051 |
sgml-local-catalogs:nil |
1052 |
sgml-local-ecat-files:nil |
1053 |
End: |
1054 |
--> |