root / man / gnt-instance.sgml @ 6174860c
History | View | Annotate | Download (31.7 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>May 16, 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-instance</refentrytitle>"> |
10 |
<!ENTITY dhpackage "gnt-instance"> |
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 instance administration</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 instance |
51 |
administration in the ganeti system. |
52 |
</para> |
53 |
|
54 |
</refsect1> |
55 |
<refsect1> |
56 |
<title>COMMANDS</title> |
57 |
|
58 |
<refsect2> |
59 |
<title>Creation/removal/querying</title> |
60 |
|
61 |
<refsect3> |
62 |
<title>ADD</title> |
63 |
<cmdsynopsis> |
64 |
<command>add</command> |
65 |
<arg>-s <replaceable>disksize</replaceable></arg> |
66 |
<arg>--swap-size <replaceable>disksize</replaceable></arg> |
67 |
<arg>-m <replaceable>memsize</replaceable></arg> |
68 |
<sbr> |
69 |
<arg>-o <replaceable>os-type</replaceable></arg> |
70 |
<arg>-b <replaceable>bridge</replaceable></arg> |
71 |
<sbr> |
72 |
<arg choice="req">-t<group> |
73 |
<arg>diskless</arg> |
74 |
<arg>plain</arg> |
75 |
<arg>local_raid1</arg> |
76 |
<arg>remote_raid1</arg> |
77 |
<arg>drbd</arg> |
78 |
</group> |
79 |
</arg> |
80 |
<sbr> |
81 |
<arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> |
82 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
83 |
</cmdsynopsis> |
84 |
<para> |
85 |
Creates a new instance on the specified |
86 |
host. <replaceable>instance</replaceable> must be in DNS and |
87 |
resolve to a IP in the same network as the nodes in the |
88 |
cluster. |
89 |
</para> |
90 |
|
91 |
<para> |
92 |
The <option>-s</option> option specifies the disk size for |
93 |
the instance, in mebibytes (defaults to |
94 |
<constant>20480MiB</constant> = |
95 |
<constant>20GiB</constant>). You can also use one of the |
96 |
suffixes <literal>m</literal>, <literal>g</literal> or |
97 |
<literal>t</literal> to specificy the exact the units used; |
98 |
these suffixes map to mebibytes, gibibytes and tebibytes. |
99 |
</para> |
100 |
|
101 |
<para> |
102 |
The <option>--swap-size</option> option specifies the swap |
103 |
disk size (in mebibytes) for the instance (the one presented |
104 |
as <filename class="devicefile">/dev/sdb</filename>). The |
105 |
default is <constant>4096MiB</constant>. As for the disk |
106 |
size, you can specify other suffixes. |
107 |
</para> |
108 |
|
109 |
<para> |
110 |
The <option>-m</option> option specifies the memory size for |
111 |
the instance, in mebibytes (defaults to 128 MiB). Again, you |
112 |
can use other suffixes (e.g. <userinput>2g</userinput>). |
113 |
</para> |
114 |
|
115 |
<para> |
116 |
The <option>-o</option> options specifies the operating |
117 |
system to be installed. The available operating systems can |
118 |
be listed with <command>gnt-os list</command>. |
119 |
</para> |
120 |
|
121 |
<para> |
122 |
The <option>-b</option> option specifies the bridge to which the |
123 |
instance will be connected. (defaults to the cluster-wide default |
124 |
bridge specified at cluster initialization time). |
125 |
</para> |
126 |
|
127 |
<para> |
128 |
The <option>-t</option> options specifies the disk layout type for |
129 |
the instance. The available choices are: |
130 |
<variablelist> |
131 |
<varlistentry> |
132 |
<term>diskless</term> |
133 |
<listitem> |
134 |
<para> |
135 |
This creates an instance with no disks. Its useful for |
136 |
testing only (or other special cases). |
137 |
</para> |
138 |
</listitem> |
139 |
</varlistentry> |
140 |
<varlistentry> |
141 |
<term>plain</term> |
142 |
<listitem> |
143 |
<para>Disk devices will be logical volumes.</para> |
144 |
</listitem> |
145 |
</varlistentry> |
146 |
<varlistentry> |
147 |
<term>local_raid1</term> |
148 |
<listitem> |
149 |
<para> |
150 |
Disk devices will be md raid1 arrays over two local |
151 |
logical volumes. |
152 |
</para> |
153 |
</listitem> |
154 |
</varlistentry> |
155 |
<varlistentry> |
156 |
<term>remote_raid1</term> |
157 |
<listitem> |
158 |
<para> |
159 |
Disk devices will be md raid1 arrays with one |
160 |
component (so it's not actually raid1): a drbd |
161 |
(0.7.x) device between the instance's primary node |
162 |
and the node given by the second value of the |
163 |
<option>--node</option> option. |
164 |
</para> |
165 |
</listitem> |
166 |
</varlistentry> |
167 |
<varlistentry> |
168 |
<term>drbd</term> |
169 |
<listitem> |
170 |
<para> |
171 |
Disk devices will be drbd (version 8.x) on top of |
172 |
lvm volumes. They are equivalent in functionality to |
173 |
<replaceable>remote_raid1</replaceable>, but are |
174 |
recommended for new instances (if you have drbd 8.x |
175 |
installed). |
176 |
</para> |
177 |
</listitem> |
178 |
</varlistentry> |
179 |
</variablelist> |
180 |
</para> |
181 |
|
182 |
<para> |
183 |
The optional second value of the <option>--node</option> is used for |
184 |
the remote raid template type and specifies the remote node. |
185 |
</para> |
186 |
|
187 |
<para> |
188 |
If you do not want gnt-instance to wait for the disk mirror |
189 |
to be synced, use the <option>--no-wait-for-sync</option> |
190 |
option. |
191 |
</para> |
192 |
|
193 |
<para> |
194 |
Example: |
195 |
<screen> |
196 |
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \ |
197 |
-n node1.example.com instance1.example.com |
198 |
# gnt-instance add -t remote_raid1 -s 30g -m 512 -o debian-etch \ |
199 |
-n node1.example.com:node2.example.com instance2.example.com |
200 |
</screen> |
201 |
</para> |
202 |
</refsect3> |
203 |
|
204 |
<refsect3> |
205 |
<title>REMOVE</title> |
206 |
|
207 |
<cmdsynopsis> |
208 |
<command>remove</command> |
209 |
<arg>--ignore-failures</arg> |
210 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
211 |
</cmdsynopsis> |
212 |
|
213 |
<para> |
214 |
Remove an instance. This will remove all data from the |
215 |
instance and there is <emphasis>no way back</emphasis>. If |
216 |
you are not sure if you use an instance again, use |
217 |
<command>shutdown</command> first and leave it in the |
218 |
shutdown state for a while. |
219 |
|
220 |
</para> |
221 |
|
222 |
<para> |
223 |
The <option>--ignore-failures</option> option will cause the |
224 |
removal to proceed even in the presence of errors during the |
225 |
removal of the instance (e.g. during the shutdown or the |
226 |
disk removal). If this option is not given, the command will |
227 |
stop at the first error. |
228 |
</para> |
229 |
|
230 |
<para> |
231 |
Example: |
232 |
<screen> |
233 |
# gnt-instance remove instance1.example.com |
234 |
</screen> |
235 |
</para> |
236 |
</refsect3> |
237 |
|
238 |
<refsect3> |
239 |
<title>LIST</title> |
240 |
|
241 |
<cmdsynopsis> |
242 |
<command>list</command> |
243 |
<arg>--no-headers</arg> |
244 |
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg> |
245 |
<arg>-o <replaceable>FIELD,...</replaceable></arg> |
246 |
</cmdsynopsis> |
247 |
|
248 |
<para> |
249 |
Shows the currently configured instances with memory usage, |
250 |
disk usage, the node they are running on, and the CPU time, |
251 |
counted in seconds, used by each instance since its latest |
252 |
restart. |
253 |
</para> |
254 |
|
255 |
<para> |
256 |
The <option>--no-headers</option> option will skip the |
257 |
initial header line. The <option>--separator</option> option |
258 |
takes an argument which denotes what will be used between |
259 |
the output fields. Both these options are to help scripting. |
260 |
</para> |
261 |
|
262 |
<para> |
263 |
The <option>-o</option> option takes a comma-separated list |
264 |
of output fields. The available fields and their meaning |
265 |
are: |
266 |
<variablelist> |
267 |
<varlistentry> |
268 |
<term>name</term> |
269 |
<listitem> |
270 |
<simpara>the instance name</simpara> |
271 |
</listitem> |
272 |
</varlistentry> |
273 |
<varlistentry> |
274 |
<term>os</term> |
275 |
<listitem> |
276 |
<simpara>the OS of the instance</simpara> |
277 |
</listitem> |
278 |
</varlistentry> |
279 |
<varlistentry> |
280 |
<term>pnode</term> |
281 |
<listitem> |
282 |
<simpara>the primary node of the instance</simpara> |
283 |
</listitem> |
284 |
</varlistentry> |
285 |
<varlistentry> |
286 |
<term>snodes</term> |
287 |
<listitem> |
288 |
<simpara>comma-separated list of secondary nodes for the |
289 |
instance; usually this will be just one node</simpara> |
290 |
</listitem> |
291 |
</varlistentry> |
292 |
<varlistentry> |
293 |
<term>admin_state</term> |
294 |
<listitem> |
295 |
<simpara>the desired state of the instance (either "yes" |
296 |
or "no" denoting the instance should run or |
297 |
not)</simpara> |
298 |
</listitem> |
299 |
</varlistentry> |
300 |
<varlistentry> |
301 |
<term>admin_ram</term> |
302 |
<listitem> |
303 |
<simpara>the desired memory for the instance</simpara> |
304 |
</listitem> |
305 |
</varlistentry> |
306 |
<varlistentry> |
307 |
<term>disk_template</term> |
308 |
<listitem> |
309 |
<simpara>the disk template of the instance</simpara> |
310 |
</listitem> |
311 |
</varlistentry> |
312 |
<varlistentry> |
313 |
<term>oper_state</term> |
314 |
<listitem> |
315 |
<simpara>the actual state of the instance; can take of |
316 |
the values "running", "stopped", "(node down)"</simpara> |
317 |
</listitem> |
318 |
</varlistentry> |
319 |
<varlistentry> |
320 |
<term>oper_ram</term> |
321 |
<listitem> |
322 |
<simpara>the actual memory usage of the instance as seen |
323 |
by the hypervisor</simpara> |
324 |
</listitem> |
325 |
</varlistentry> |
326 |
<varlistentry> |
327 |
<term>ip</term> |
328 |
<listitem> |
329 |
<simpara>the ip address ganeti recognizes as associated with |
330 |
the instance interface</simpara> |
331 |
</listitem> |
332 |
</varlistentry> |
333 |
<varlistentry> |
334 |
<term>mac</term> |
335 |
<listitem> |
336 |
<simpara>the instance interface MAC address</simpara> |
337 |
</listitem> |
338 |
</varlistentry> |
339 |
<varlistentry> |
340 |
<term>bridge</term> |
341 |
<listitem> |
342 |
<simpara>bridge the instance is connected to |
343 |
</simpara> |
344 |
</listitem> |
345 |
</varlistentry> |
346 |
</variablelist> |
347 |
</para> |
348 |
|
349 |
<para> |
350 |
There is a subtle grouping about the available output |
351 |
fields: all fields except for <option>oper_state</option> |
352 |
and <option>oper_ram</option> are configuration value and |
353 |
not run-time values. So if you don't select any of the |
354 |
<option>oper_*</option> fields, the query will be satisfied |
355 |
instantly from the cluster configuration, without having to |
356 |
ask the remote nodes for the data. This can be helpful for |
357 |
big clusters when you only want some data and it makes sense |
358 |
to specify a reduced set of output fields. |
359 |
</para> |
360 |
|
361 |
<para>The default output field list is: |
362 |
<simplelist type="inline"> |
363 |
<member>name</member> |
364 |
<member>os</member> |
365 |
<member>pnode</member> |
366 |
<member>admin_state</member> |
367 |
<member>oper_state</member> |
368 |
<member>oper_ram</member> |
369 |
</simplelist>. |
370 |
</para> |
371 |
</refsect3> |
372 |
|
373 |
<refsect3> |
374 |
<title>INFO</title> |
375 |
|
376 |
<cmdsynopsis> |
377 |
<command>info</command> |
378 |
<arg rep="repeat"><replaceable>instance</replaceable></arg> |
379 |
</cmdsynopsis> |
380 |
|
381 |
<para> |
382 |
Show detailed information about the (given) instances. This |
383 |
is different from <command>list</command> as it shows |
384 |
detailed data about the instance's disks (especially useful |
385 |
for remote raid templates). |
386 |
</para> |
387 |
</refsect3> |
388 |
|
389 |
<refsect3> |
390 |
<title>MODIFY</title> |
391 |
|
392 |
<cmdsynopsis> |
393 |
<command>modify</command> |
394 |
<arg choice="opt">-m <replaceable>memsize</replaceable></arg> |
395 |
<arg choice="opt">-p <replaceable>vcpus</replaceable></arg> |
396 |
<arg choice="opt">-i <replaceable>ip</replaceable></arg> |
397 |
<arg choice="opt">-b <replaceable>bridge</replaceable></arg> |
398 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
399 |
</cmdsynopsis> |
400 |
|
401 |
<para> |
402 |
Modify the memory size, number of vcpus, ip address and/or bridge |
403 |
for an instance. |
404 |
</para> |
405 |
|
406 |
<para> |
407 |
The memory size is given in MiB. Note that you need to give |
408 |
at least one of the arguments, otherwise the command |
409 |
complains. |
410 |
</para> |
411 |
|
412 |
<para> |
413 |
All the changes take effect at the next restart. If the |
414 |
instance is running, there is no effect on the instance. |
415 |
</para> |
416 |
</refsect3> |
417 |
|
418 |
<refsect3> |
419 |
<title>REINSTALL</title> |
420 |
|
421 |
<cmdsynopsis> |
422 |
<command>reinstall</command> |
423 |
<arg choice="opt">-o <replaceable>os-type</replaceable></arg> |
424 |
<arg choice="opt">-f <replaceable>force</replaceable></arg> |
425 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
426 |
</cmdsynopsis> |
427 |
|
428 |
<para> |
429 |
Reinstalls the operating system on the given instance. The instance |
430 |
must be stopped when running this command. If the |
431 |
<option>--os-type</option> is specified, the operating system is |
432 |
changed. |
433 |
</para> |
434 |
</refsect3> |
435 |
|
436 |
<refsect3> |
437 |
<title>RENAME</title> |
438 |
|
439 |
<cmdsynopsis> |
440 |
<command>rename</command> |
441 |
<arg>--no-ip-check</arg> |
442 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
443 |
<arg choice="req"><replaceable>new_name</replaceable></arg> |
444 |
</cmdsynopsis> |
445 |
|
446 |
<para> |
447 |
Renames the given instance. The instance must be stopped |
448 |
when running this command. The requirements for the new name |
449 |
are the same as for adding an instance: the new name must be |
450 |
resolvable and the IP it resolves to must not be reachable |
451 |
(in order to prevent duplicate IPs the next time the |
452 |
instance is started). The IP test can be skipped if the |
453 |
<option>--no-ip-check</option> option is passed. |
454 |
</para> |
455 |
</refsect3> |
456 |
|
457 |
</refsect2> |
458 |
|
459 |
<refsect2> |
460 |
<title>Starting/stopping/connecting to console</title> |
461 |
|
462 |
<refsect3> |
463 |
<title>STARTUP</title> |
464 |
|
465 |
<cmdsynopsis> |
466 |
<command>startup</command> |
467 |
<arg>--extra=<replaceable>PARAMS</replaceable></arg> |
468 |
<arg>--force</arg> |
469 |
<sbr> |
470 |
<group choice="opt"> |
471 |
<arg>--instance</arg> |
472 |
<arg>--node</arg> |
473 |
<arg>--primary</arg> |
474 |
<arg>--secondary</arg> |
475 |
<arg>--all</arg> |
476 |
</group> |
477 |
<sbr> |
478 |
<arg choice="opt" |
479 |
rep="repeat"><replaceable>name</replaceable></arg> |
480 |
</cmdsynopsis> |
481 |
|
482 |
<para> |
483 |
Starts one or more instances, depending on the following |
484 |
options. The four available modes are: |
485 |
<variablelist> |
486 |
<varlistentry> |
487 |
<term><option>--instance</option></term> |
488 |
<listitem> |
489 |
<simpara>will start the instances given as arguments |
490 |
(at least one argument required); this is the default |
491 |
selection</simpara> |
492 |
</listitem> |
493 |
</varlistentry> |
494 |
<varlistentry> |
495 |
<term>--node</term> |
496 |
<listitem> |
497 |
<simpara>will start the instances who have the given |
498 |
node as either primary or secondary</simpara> |
499 |
</listitem> |
500 |
</varlistentry> |
501 |
<varlistentry> |
502 |
<term><option>--primary</option></term> |
503 |
<listitem> |
504 |
<simpara>will start all instances whose primary node |
505 |
is in the list of nodes passed as arguments (at least |
506 |
one node required)</simpara> |
507 |
</listitem> |
508 |
</varlistentry> |
509 |
<varlistentry> |
510 |
<term><option>--secondary</option></term> |
511 |
<listitem> |
512 |
<simpara>will start all instances whose secondary node |
513 |
is in the list of nodes passed as arguments (at least |
514 |
one node required)</simpara> |
515 |
</listitem> |
516 |
</varlistentry> |
517 |
<varlistentry> |
518 |
<term>--all</term> |
519 |
<listitem> |
520 |
<simpara>will start all instances in the cluster (no |
521 |
arguments accepted)</simpara> |
522 |
</listitem> |
523 |
</varlistentry> |
524 |
</variablelist> |
525 |
</para> |
526 |
|
527 |
<para> |
528 |
Note that although you can pass more than one selection |
529 |
option, the last one wins, so in order to guarantee the |
530 |
desired result, don't pass more than one such option. |
531 |
</para> |
532 |
|
533 |
<para> |
534 |
The <option>--extra</option> option is used to pass |
535 |
additional argument to the instance's kernel for this start |
536 |
only. Currently there is no way to specify a persistent set |
537 |
of arguments (beside the one hardcoded). Note that this may |
538 |
not apply to all virtualization types. |
539 |
</para> |
540 |
|
541 |
<para> |
542 |
Use <option>--force</option> to start even if secondary disks are |
543 |
failing. |
544 |
</para> |
545 |
|
546 |
<para> |
547 |
Example: |
548 |
<screen> |
549 |
# gnt-instance start instance1.example.com |
550 |
# gnt-instance start --extra single test1.example.com |
551 |
# gnt-instance start --node node1.example.com node2.example.com |
552 |
# gnt-instance start --all |
553 |
</screen> |
554 |
</para> |
555 |
</refsect3> |
556 |
|
557 |
<refsect3> |
558 |
<title>SHUTDOWN</title> |
559 |
|
560 |
<cmdsynopsis> |
561 |
<command>shutdown</command> |
562 |
<sbr> |
563 |
<group choice="opt"> |
564 |
<arg>--instance</arg> |
565 |
<arg>--node</arg> |
566 |
<arg>--primary</arg> |
567 |
<arg>--secondary</arg> |
568 |
<arg>--all</arg> |
569 |
</group> |
570 |
<sbr> |
571 |
|
572 |
<arg choice="opt" |
573 |
rep="repeat"><replaceable>name</replaceable></arg> |
574 |
</cmdsynopsis> |
575 |
|
576 |
<para> |
577 |
Stops one or more instances. If the instance cannot be |
578 |
cleanly stopped during a hardcoded interval (currently 2 |
579 |
minutes), it will forcibly stop the instance (equivalent to |
580 |
switching off the power on a physical machine). |
581 |
</para> |
582 |
|
583 |
<para> |
584 |
The <option>--instance</option>, <option>--node</option>, |
585 |
<option>--primary</option>, <option>--secondary</option> and |
586 |
<option>--all</option> options are similar as for the |
587 |
<command>startup</command> command and they influence the |
588 |
actual instances being shutdown. |
589 |
</para> |
590 |
|
591 |
<para> |
592 |
Example: |
593 |
<screen> |
594 |
# gnt-instance shutdown instance1.example.com |
595 |
# gnt-instance shutdown --all |
596 |
</screen> |
597 |
</para> |
598 |
</refsect3> |
599 |
|
600 |
<refsect3> |
601 |
<title>REBOOT</title> |
602 |
|
603 |
<cmdsynopsis> |
604 |
<command>reboot</command> |
605 |
<sbr> |
606 |
<arg>--extra=<replaceable>PARAMS</replaceable></arg> |
607 |
<sbr> |
608 |
<arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg> |
609 |
<sbr> |
610 |
<arg>--ignore-secondaries</arg> |
611 |
<sbr> |
612 |
<arg>--force-multiple</arg> |
613 |
<sbr> |
614 |
<group choice="opt"> |
615 |
<arg>--instance</arg> |
616 |
<arg>--node</arg> |
617 |
<arg>--primary</arg> |
618 |
<arg>--secondary</arg> |
619 |
<arg>--all</arg> |
620 |
</group> |
621 |
<sbr> |
622 |
|
623 |
<arg choice="opt" |
624 |
rep="repeat"><replaceable>name</replaceable></arg> |
625 |
</cmdsynopsis> |
626 |
|
627 |
<para> |
628 |
Reboots one or more instances. The type of reboot depends on |
629 |
the value of <option>--type</option>. A soft reboot does a |
630 |
hypervisor reboot, a hard reboot does a instance stop, |
631 |
recreates the hypervisor config for the instance and |
632 |
starts the instance. A full reboot does the equivalent |
633 |
of <command>gnt-instance shutdown && gnt-instance |
634 |
startup</command>. The default is soft reboot. |
635 |
</para> |
636 |
|
637 |
<para> |
638 |
For the hard reboot the option |
639 |
<option>--ignore-secondaries</option> ignores errors for the |
640 |
secondary node while re-assembling the instance disks. |
641 |
</para> |
642 |
|
643 |
<para> |
644 |
The <option>--instance</option>, <option>--node</option>, |
645 |
<option>--primary</option>, <option>--secondary</option> and |
646 |
<option>--all</option> options are similar as for the |
647 |
<command>startup</command> command and they influence the |
648 |
actual instances being rebooted. |
649 |
</para> |
650 |
|
651 |
<para> |
652 |
Use the <option>--force-multiple</option> option to keep |
653 |
gnt-instance from asking for confirmation when more than one |
654 |
instance is affected. |
655 |
</para> |
656 |
|
657 |
<para> |
658 |
Example: |
659 |
<screen> |
660 |
# gnt-instance reboot instance1.example.com |
661 |
# gnt-instance reboot --type=full instance1.example.com |
662 |
</screen> |
663 |
</para> |
664 |
</refsect3> |
665 |
|
666 |
<refsect3> |
667 |
<title>CONSOLE</title> |
668 |
<cmdsynopsis> |
669 |
<command>console</command> |
670 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
671 |
</cmdsynopsis> |
672 |
|
673 |
<para> |
674 |
Connects to the console of the given instance. If the instance |
675 |
is not up, an error is returned. |
676 |
</para> |
677 |
|
678 |
<para> |
679 |
Example: |
680 |
<screen> |
681 |
# gnt-instance console instance1.example.com |
682 |
</screen> |
683 |
</para> |
684 |
</refsect3> |
685 |
|
686 |
</refsect2> |
687 |
|
688 |
<refsect2> |
689 |
<title>Disk management</title> |
690 |
|
691 |
<refsect3> |
692 |
<title>REPLACE-DISKS</title> |
693 |
|
694 |
<cmdsynopsis> |
695 |
<command>replace-disks</command> |
696 |
<arg choice="opt">--new-secondary <replaceable>NODE</replaceable></arg> |
697 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
698 |
</cmdsynopsis> |
699 |
|
700 |
<cmdsynopsis> |
701 |
<command>replace-disks</command> |
702 |
<arg choice="req">-s</arg> |
703 |
<arg choice="req">--new-secondary <replaceable>NODE</replaceable></arg> |
704 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
705 |
</cmdsynopsis> |
706 |
|
707 |
<cmdsynopsis> |
708 |
<command>replace-disks</command> |
709 |
<group> |
710 |
<arg choice="req">-s</arg> |
711 |
<arg choice="req">-p</arg> |
712 |
</group> |
713 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
714 |
</cmdsynopsis> |
715 |
|
716 |
<para> |
717 |
This command is a generalized form for adding and replacing |
718 |
disks. |
719 |
</para> |
720 |
|
721 |
<para> |
722 |
The first form is usable with the |
723 |
<literal>remote_raid1</literal> disk template. This will |
724 |
replace the disks on both the primary and secondary node, |
725 |
and optionally will change the secondary node to a new one |
726 |
if you pass the <option>--new-secondary</option> option. |
727 |
</para> |
728 |
|
729 |
<para> |
730 |
The second and third forms are usable with the |
731 |
<literal>drbd</literal> disk template. The second form will |
732 |
do a secondary replacement, but as opposed to the |
733 |
<literal>remote_raid1</literal> will not replace the disks |
734 |
on the primary, therefore it will execute faster. The third |
735 |
form will replace the disks on either the primary |
736 |
(<option>-p</option>) or the secondary (<option>-s</option>) |
737 |
node of the instance only, without changing the node. |
738 |
</para> |
739 |
|
740 |
</refsect3> |
741 |
|
742 |
<refsect3> |
743 |
<title>ADD-MIRROR</title> |
744 |
<cmdsynopsis> |
745 |
<command>add-mirror</command> |
746 |
<arg choice="req">-b <replaceable>sdX</replaceable></arg> |
747 |
<arg choice="req">-n <replaceable>node</replaceable></arg> |
748 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
749 |
</cmdsynopsis> |
750 |
<para> |
751 |
Adds a new mirror to the disk layout of the instance, if the |
752 |
instance has a remote raid disk layout. |
753 |
|
754 |
The new mirror member will be between the instance's primary |
755 |
node and the node given with the <option>-n</option> option. |
756 |
</para> |
757 |
</refsect3> |
758 |
|
759 |
<refsect3> |
760 |
<title>REMOVE-MIRROR</title> |
761 |
|
762 |
<cmdsynopsis> |
763 |
<command>removemirror</command> |
764 |
<arg choice="req">-b <replaceable>sdX</replaceable></arg> |
765 |
<arg choice="req">-p <replaceable>id</replaceable></arg> |
766 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
767 |
</cmdsynopsis> |
768 |
<para> |
769 |
Removes a mirror componenent from the disk layout of the |
770 |
instance, if the instance has a remote raid disk layout. |
771 |
</para> |
772 |
|
773 |
<para> |
774 |
You need to specifiy on which disk to act on using the |
775 |
<option>-b</option> option (either <filename>sda</filename> |
776 |
or <filename>sdb</filename>) and the mirror component, which |
777 |
is identified by the <option>-p</option> option. You can |
778 |
find the list of valid identifiers with the |
779 |
<command>info</command> command. |
780 |
</para> |
781 |
|
782 |
<refsect3> |
783 |
<title>ACTIVATE-DISKS</title> |
784 |
|
785 |
<cmdsynopsis> |
786 |
<command>activate-disks</command> |
787 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
788 |
</cmdsynopsis> |
789 |
<para> |
790 |
Activates the block devices of the given instance. If |
791 |
successful, the command will show the location and name of |
792 |
the block devices: |
793 |
<screen> |
794 |
node1.example.com:sda:/dev/md0 |
795 |
node1.example.com:sdb:/dev/md1 |
796 |
</screen> |
797 |
|
798 |
In this example, <emphasis>node1.example.com</emphasis> is |
799 |
the name of the node on which the devices have been |
800 |
activated. The <emphasis>sda</emphasis> and |
801 |
<emphasis>sdb</emphasis> are the names of the block devices |
802 |
inside the instance. <emphasis>/dev/md0</emphasis> and |
803 |
<emphasis>/dev/md1</emphasis> are the names of the block |
804 |
devices as visible on the node. |
805 |
</para> |
806 |
|
807 |
<para> |
808 |
Note that it is safe to run this command while the instance |
809 |
is already running. |
810 |
</para> |
811 |
</refsect3> |
812 |
|
813 |
<refsect3> |
814 |
<title>DEACTIVATE-DISKS</title> |
815 |
|
816 |
<cmdsynopsis> |
817 |
<command>deactivate-disks</command> |
818 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
819 |
</cmdsynopsis> |
820 |
<para> |
821 |
De-activates the block devices of the given instance. Note |
822 |
that if you run this command for a remote raid instance |
823 |
type, while it is running, it will not be able to shutdown |
824 |
the block devices on the primary node, but it will shutdown |
825 |
the block devices on the secondary nodes, thus breaking the |
826 |
replication. |
827 |
</para> |
828 |
|
829 |
</refsect3> |
830 |
|
831 |
</refsect2> |
832 |
|
833 |
<refsect2> |
834 |
<title>Recovery</title> |
835 |
|
836 |
<refsect3> |
837 |
<title>FAILOVER</title> |
838 |
|
839 |
<cmdsynopsis> |
840 |
<command>failover</command> |
841 |
<arg>-f</arg> |
842 |
<arg>--ignore-consistency</arg> |
843 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
844 |
</cmdsynopsis> |
845 |
|
846 |
<para> |
847 |
Failover will fail the instance over its secondary |
848 |
node. This works only for instances having a remote raid |
849 |
disk layout. |
850 |
</para> |
851 |
|
852 |
<para> |
853 |
Normally the failover will check the consistency of the |
854 |
disks before failing over the instance. If you are trying to |
855 |
migrate instances off a dead node, this will fail. Use the |
856 |
<option>--ignore-consistency</option> option for this |
857 |
purpose. Note that this option can be dangerous as errors in |
858 |
shutting down the instance will be ignored, resulting in |
859 |
possibly having the instance running on two machines in |
860 |
parallel (on disconnected DRBD drives). |
861 |
</para> |
862 |
|
863 |
<para> |
864 |
Example: |
865 |
<screen> |
866 |
# gnt-instance failover instance1.example.com |
867 |
</screen> |
868 |
</para> |
869 |
</refsect3> |
870 |
|
871 |
</refsect2> |
872 |
|
873 |
<refsect2> |
874 |
<title>TAGS</title> |
875 |
|
876 |
<refsect3> |
877 |
<title>ADD-TAGS</title> |
878 |
|
879 |
<cmdsynopsis> |
880 |
<command>add-tags</command> |
881 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
882 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
883 |
<arg choice="req" |
884 |
rep="repeat"><replaceable>tag</replaceable></arg> |
885 |
</cmdsynopsis> |
886 |
|
887 |
<para> |
888 |
Add tags to the given instance. If any of the tags contains |
889 |
invalid characters, the entire operation will abort. |
890 |
</para> |
891 |
<para> |
892 |
If the <option>--from</option> option is given, the list of |
893 |
tags will be extended with the contents of that file (each |
894 |
line becomes a tag). In this case, there is not need to pass |
895 |
tags on the command line (if you do, both sources will be |
896 |
used). A file name of - will be interpreted as stdin. |
897 |
</para> |
898 |
</refsect3> |
899 |
|
900 |
<refsect3> |
901 |
<title>LIST-TAGS</title> |
902 |
|
903 |
<cmdsynopsis> |
904 |
<command>list-tags</command> |
905 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
906 |
</cmdsynopsis> |
907 |
|
908 |
<para>List the tags of the given instance.</para> |
909 |
</refsect3> |
910 |
|
911 |
<refsect3> |
912 |
<title>REMOVE-TAGS</title> |
913 |
<cmdsynopsis> |
914 |
<command>remove-tags</command> |
915 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
916 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
917 |
<arg choice="req" |
918 |
rep="repeat"><replaceable>tag</replaceable></arg> |
919 |
</cmdsynopsis> |
920 |
|
921 |
<para> |
922 |
Remove tags from the given instance. If any of the tags are |
923 |
not existing on the node, the entire operation will abort. |
924 |
</para> |
925 |
|
926 |
<para> |
927 |
If the <option>--from</option> option is given, the list of |
928 |
tags will be extended with the contents of that file (each |
929 |
line becomes a tag). In this case, there is not need to pass |
930 |
tags on the command line (if you do, both sources will be |
931 |
used). A file name of - will be interpreted as stdin. |
932 |
</para> |
933 |
</refsect3> |
934 |
|
935 |
</refsect2> |
936 |
|
937 |
</refsect1> |
938 |
|
939 |
&footer; |
940 |
|
941 |
</refentry> |
942 |
|
943 |
<!-- Keep this comment at the end of the file |
944 |
Local variables: |
945 |
mode: sgml |
946 |
sgml-omittag:t |
947 |
sgml-shorttag:t |
948 |
sgml-minimize-attributes:nil |
949 |
sgml-always-quote-attributes:t |
950 |
sgml-indent-step:2 |
951 |
sgml-indent-data:t |
952 |
sgml-parent-document:nil |
953 |
sgml-default-dtd-file:nil |
954 |
sgml-exposed-tags:nil |
955 |
sgml-local-catalogs:nil |
956 |
sgml-local-ecat-files:nil |
957 |
End: |
958 |
--> |