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