root / man / gnt-instance.sgml @ 231db3a5
History | View | Annotate | Download (83.9 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>February 11, 2009</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 |
<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.0</refmiscinfo> |
34 |
</refmeta> |
35 |
<refnamediv> |
36 |
<refname>&dhpackage;</refname> |
37 |
|
38 |
<refpurpose>ganeti instance 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 instance |
53 |
administration in the ganeti system. |
54 |
</para> |
55 |
|
56 |
</refsect1> |
57 |
<refsect1> |
58 |
<title>COMMANDS</title> |
59 |
|
60 |
<refsect2> |
61 |
<title>Creation/removal/querying</title> |
62 |
|
63 |
<refsect3> |
64 |
<title>ADD</title> |
65 |
<cmdsynopsis> |
66 |
<command>add</command> |
67 |
<sbr> |
68 |
<arg choice="req">-t<group choice="req"> |
69 |
<arg>diskless</arg> |
70 |
<arg>file</arg> |
71 |
<arg>plain</arg> |
72 |
<arg>drbd</arg> |
73 |
</group></arg> |
74 |
<sbr> |
75 |
|
76 |
<group choice="req"> |
77 |
<arg rep="repeat">--disk=<replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg> |
78 |
<arg>-s <replaceable>SIZE</replaceable></arg> |
79 |
</group> |
80 |
<sbr> |
81 |
<arg>--no-ip-check</arg> |
82 |
<arg>--no-name-check</arg> |
83 |
<arg>--no-start</arg> |
84 |
<sbr> |
85 |
<group> |
86 |
<arg rep="repeat">--net=<replaceable>N</replaceable><arg rep="repeat">:options</arg></arg> |
87 |
<arg>--no-nics</arg> |
88 |
</group> |
89 |
<sbr> |
90 |
<arg>-B <replaceable>BEPARAMS</replaceable></arg> |
91 |
<sbr> |
92 |
|
93 |
<arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg> |
94 |
<sbr> |
95 |
|
96 |
<arg>--file-storage-dir <replaceable>dir_path</replaceable></arg> |
97 |
<arg>--file-driver<group choice="req"> |
98 |
<arg>loop</arg> |
99 |
<arg>blktap</arg> |
100 |
</group></arg> |
101 |
<sbr> |
102 |
|
103 |
<group choice="req"> |
104 |
<arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> |
105 |
<arg>--iallocator <replaceable>name</replaceable></arg> |
106 |
</group> |
107 |
<sbr> |
108 |
|
109 |
<arg choice="req">-o <replaceable>os-type</replaceable></arg> |
110 |
<sbr> |
111 |
<arg>--submit</arg> |
112 |
<sbr> |
113 |
|
114 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
115 |
</cmdsynopsis> |
116 |
|
117 |
<para> |
118 |
Creates a new instance on the specified host. The |
119 |
<replaceable>instance</replaceable> argument must be in DNS, |
120 |
but depending on the bridge/routing setup, need not be in |
121 |
the same network as the nodes in the cluster. |
122 |
</para> |
123 |
|
124 |
<para> |
125 |
The <option>disk</option> option specifies the parameters |
126 |
for the disks of the instance. The numbering of disks starts |
127 |
at zero, and at least one disk needs to be passed. For each |
128 |
disk, at least the size needs to be given, and optionally |
129 |
the access mode (read-only or the default of read-write) can |
130 |
also be specified. The size is interpreted (when no unit is |
131 |
given) in mebibytes. You can also use one of the suffixes |
132 |
<literal>m</literal>, <literal>g</literal> or |
133 |
<literal>t</literal> to specificy the exact the units used; |
134 |
these suffixes map to mebibytes, gibibytes and tebibytes. |
135 |
</para> |
136 |
|
137 |
<para> |
138 |
Alternatively, a single-disk instance can be created via the |
139 |
<option>-s</option> option which takes a single argument, |
140 |
the size of the disk. This is similar to the Ganeti 1.2 |
141 |
version (but will only create one disk). |
142 |
</para> |
143 |
|
144 |
<para> |
145 |
The minimum disk specification is therefore |
146 |
<userinput>--disk 0:size=20G</userinput> (or <userinput>-s |
147 |
20G</userinput> when using the <option>-s</option> option), |
148 |
and a three-disk instance can be specified as |
149 |
<userinput>--disk 0:size=20G --disk 1:size=4G --disk |
150 |
2:size=100G</userinput>. |
151 |
</para> |
152 |
|
153 |
<para> |
154 |
The <option>--no-ip-check</option> skips the checks that are |
155 |
done to see if the instance's IP is not already alive |
156 |
(i.e. reachable from the master node). |
157 |
</para> |
158 |
|
159 |
<para> |
160 |
The <option>--no-name-check</option> skips the check for the |
161 |
instance name via the resolver (e.g. in DNS or /etc/hosts, |
162 |
depending on your setup). Since the name check is used to |
163 |
compute the IP address, if you pass this option you must |
164 |
also pass the <option>--no-ip-check</option> option. |
165 |
</para> |
166 |
|
167 |
<para> |
168 |
If you don't wat the instance to automatically start after |
169 |
creation, this is possible via the |
170 |
<option>--no-start</option> option. This will leave the |
171 |
instance down until a subsequent <command>gnt-instance |
172 |
start</command> command. |
173 |
</para> |
174 |
|
175 |
<para> |
176 |
The NICs of the instances can be specified via the |
177 |
<option>--net</option> option. By default, one NIC is |
178 |
created for the instance, with a random MAC, and set |
179 |
up according the the cluster level nic parameters. |
180 |
Each NIC can take these parameters (all optional): |
181 |
<variablelist> |
182 |
<varlistentry> |
183 |
<term>mac</term> |
184 |
<listitem> |
185 |
<simpara>either a value or <constant>GENERATE</constant> |
186 |
to generate a new unique MAC</simpara> |
187 |
</listitem> |
188 |
</varlistentry> |
189 |
<varlistentry> |
190 |
<term>ip</term> |
191 |
<listitem> |
192 |
<simpara>specifies the IP address assigned to the |
193 |
instance from the Ganeti side (this is not necessarily |
194 |
what the instance will use, but what the node expects |
195 |
the instance to use)</simpara> |
196 |
</listitem> |
197 |
</varlistentry> |
198 |
<varlistentry> |
199 |
<term>mode</term> |
200 |
<listitem> |
201 |
<simpara>specifies the connection mode for this nic: |
202 |
routed or bridged.</simpara> |
203 |
</listitem> |
204 |
</varlistentry> |
205 |
<varlistentry> |
206 |
<term>link</term> |
207 |
<listitem> |
208 |
<simpara>in bridged mode specifies the bridge to attach |
209 |
this NIC to, in routed mode it's intended to |
210 |
differentiate between different routing tables/instance |
211 |
groups (but the meaning is dependent on the network |
212 |
script, see gnt-cluster(8) for more details)</simpara> |
213 |
</listitem> |
214 |
</varlistentry> |
215 |
</variablelist> |
216 |
Of these "mode" and "link" are nic parameters, and inherit their |
217 |
default at cluster level. |
218 |
</para> |
219 |
|
220 |
<para> |
221 |
Alternatively, if no network is desired for the instance, you |
222 |
can prevent the default of one NIC with the |
223 |
<option>--no-nics</option> option. |
224 |
</para> |
225 |
|
226 |
<para> |
227 |
The <option>-o</option> options specifies the operating |
228 |
system to be installed. The available operating systems can |
229 |
be listed with <command>gnt-os list</command>. |
230 |
</para> |
231 |
|
232 |
<para> |
233 |
The <option>-B</option> option specifies the backend |
234 |
parameters for the instance. If no such parameters are |
235 |
specified, the values are inherited from the cluster. Possible |
236 |
parameters are: |
237 |
<variablelist> |
238 |
<varlistentry> |
239 |
<term>memory</term> |
240 |
<listitem> |
241 |
<simpara>the memory size of the instance; as usual, |
242 |
suffixes can be used to denote the unit, otherwise the |
243 |
value is taken in mebibites</simpara> |
244 |
</listitem> |
245 |
</varlistentry> |
246 |
<varlistentry> |
247 |
<term>vcpus</term> |
248 |
<listitem> |
249 |
<simpara>the number of VCPUs to assign to the instance |
250 |
(if this value makes sense for the hypervisor)</simpara> |
251 |
</listitem> |
252 |
</varlistentry> |
253 |
<varlistentry> |
254 |
<term>auto_balance</term> |
255 |
<listitem> |
256 |
<simpara>whether the instance is considered in the N+1 |
257 |
cluster checks (enough redundancy in the cluster to |
258 |
survive a node failure)</simpara> |
259 |
</listitem> |
260 |
</varlistentry> |
261 |
</variablelist> |
262 |
</para> |
263 |
|
264 |
<para> |
265 |
The <option>-H</option> option specified the hypervisor to |
266 |
use for the instance (must be one of the enabled hypervisors |
267 |
on the cluster) and optionally custom parameters for this |
268 |
instance. If not other options are used (i.e. the invocation |
269 |
is just <userinput>-H |
270 |
<replaceable>NAME</replaceable></userinput>) the instance |
271 |
will inherit the cluster options. The defaults below show |
272 |
the cluster defaults at cluster creation time. |
273 |
</para> |
274 |
|
275 |
<para> |
276 |
The possible hypervisor options are as follows: |
277 |
<variablelist> |
278 |
<varlistentry> |
279 |
<term>boot_order</term> |
280 |
<listitem> |
281 |
<simpara>Valid for the Xen HVM and KVM |
282 |
hypervisors.</simpara> |
283 |
|
284 |
<simpara>A string value denoting the boot order. This |
285 |
has different meaning for the Xen HVM hypervisor and |
286 |
for the KVM one.</simpara> |
287 |
|
288 |
<simpara> |
289 |
For Xen HVM, The boot order is a string of letters |
290 |
listing the boot devices, with valid device letters |
291 |
being: |
292 |
</simpara> |
293 |
<variablelist> |
294 |
<varlistentry> |
295 |
<term>a</term> |
296 |
<listitem> |
297 |
<para> |
298 |
floppy drive |
299 |
</para> |
300 |
</listitem> |
301 |
</varlistentry> |
302 |
<varlistentry> |
303 |
<term>c</term> |
304 |
<listitem> |
305 |
<para> |
306 |
hard disk |
307 |
</para> |
308 |
</listitem> |
309 |
</varlistentry> |
310 |
<varlistentry> |
311 |
<term>d</term> |
312 |
<listitem> |
313 |
<para> |
314 |
CDROM drive |
315 |
</para> |
316 |
</listitem> |
317 |
</varlistentry> |
318 |
<varlistentry> |
319 |
<term>n</term> |
320 |
<listitem> |
321 |
<para> |
322 |
network boot (PXE) |
323 |
</para> |
324 |
</listitem> |
325 |
</varlistentry> |
326 |
</variablelist> |
327 |
<simpara> |
328 |
The default is not to set an HVM boot order which is |
329 |
interpreted as 'dc'. |
330 |
</simpara> |
331 |
|
332 |
</listitem> |
333 |
</varlistentry> |
334 |
<varlistentry> |
335 |
<term>cdrom_image_path</term> |
336 |
<listitem> |
337 |
<simpara>Valid for the Xen HVM and KVM hypervisors.</simpara> |
338 |
|
339 |
<simpara>The path to a CDROM image to attach to the |
340 |
instance.</simpara> |
341 |
|
342 |
</listitem> |
343 |
</varlistentry> |
344 |
<varlistentry> |
345 |
<term>nic_type</term> |
346 |
<listitem> |
347 |
<simpara>Valid for the Xen HVM and KVM hypervisors.</simpara> |
348 |
|
349 |
<para> |
350 |
This parameter determines the way the network cards |
351 |
are presented to the instance. The possible options are: |
352 |
<simplelist> |
353 |
<member>rtl8139 (default for Xen HVM) (HVM & KVM)</member> |
354 |
<member>ne2k_isa (HVM & KVM)</member> |
355 |
<member>ne2k_pci (HVM & KVM)</member> |
356 |
<member>i82551 (KVM)</member> |
357 |
<member>i82557b (KVM)</member> |
358 |
<member>i82559er (KVM)</member> |
359 |
<member>pcnet (KVM)</member> |
360 |
<member>e1000 (KVM)</member> |
361 |
<member>paravirtual (default for KVM) (HVM & KVM)</member> |
362 |
</simplelist> |
363 |
</para> |
364 |
</listitem> |
365 |
</varlistentry> |
366 |
<varlistentry> |
367 |
<term>disk_type</term> |
368 |
<listitem> |
369 |
<simpara>Valid for the Xen HVM and KVM hypervisors.</simpara> |
370 |
|
371 |
<para> |
372 |
This parameter determines the way the disks are |
373 |
presented to the instance. The possible options are: |
374 |
<simplelist> |
375 |
<member>ioemu (default for HVM & KVM) (HVM & KVM)</member> |
376 |
<member>ide (HVM & KVM)</member> |
377 |
<member>scsi (KVM)</member> |
378 |
<member>sd (KVM)</member> |
379 |
<member>mtd (KVM)</member> |
380 |
<member>pflash (KVM)</member> |
381 |
</simplelist> |
382 |
</para> |
383 |
</listitem> |
384 |
</varlistentry> |
385 |
<varlistentry> |
386 |
<term>vnc_bind_address</term> |
387 |
<listitem> |
388 |
<simpara>Valid for the Xen HVM and KVM hypervisors.</simpara> |
389 |
|
390 |
<para>Specifies the address that the VNC listener for |
391 |
this instance should bind to. Valid values are IPv4 |
392 |
addresses. Use the address 0.0.0.0 to bind to all |
393 |
available interfaces (this is the default) or specify |
394 |
the address of one of the interfaces on the node to |
395 |
restrict listening to that interface.</para> |
396 |
</listitem> |
397 |
</varlistentry> |
398 |
|
399 |
<varlistentry> |
400 |
<term>vnc_tls</term> |
401 |
<listitem> |
402 |
<simpara>Valid for the KVM hypervisor.</simpara> |
403 |
|
404 |
<simpara>A boolean option that controls whether the |
405 |
VNC connection is secured with TLS.</simpara> |
406 |
</listitem> |
407 |
</varlistentry> |
408 |
|
409 |
<varlistentry> |
410 |
<term>vnc_x509_path</term> |
411 |
<listitem> |
412 |
<simpara>Valid for the KVM hypervisor.</simpara> |
413 |
|
414 |
<para>If <option>vnc_tls</option> is enabled, this |
415 |
options specifies the path to the x509 certificate to |
416 |
use.</para> |
417 |
</listitem> |
418 |
</varlistentry> |
419 |
|
420 |
<varlistentry> |
421 |
<term>vnc_x509_verify</term> |
422 |
<listitem> |
423 |
<simpara>Valid for the KVM hypervisor.</simpara> |
424 |
</listitem> |
425 |
</varlistentry> |
426 |
|
427 |
<varlistentry> |
428 |
<term>acpi</term> |
429 |
<listitem> |
430 |
<simpara>Valid for the Xen HVM and KVM hypervisors.</simpara> |
431 |
|
432 |
<para> |
433 |
A boolean option that specifies if the hypervisor |
434 |
should enable ACPI support for this instance. By |
435 |
default, ACPI is disabled. |
436 |
</para> |
437 |
</listitem> |
438 |
</varlistentry> |
439 |
|
440 |
<varlistentry> |
441 |
<term>pae</term> |
442 |
<listitem> |
443 |
<simpara>Valid for the Xen HVM and KVM hypervisors.</simpara> |
444 |
|
445 |
<para> |
446 |
A boolean option that specifies if the hypervisor |
447 |
should enabled PAE support for this instance. The |
448 |
default is false, disabling PAE support. |
449 |
</para> |
450 |
</listitem> |
451 |
</varlistentry> |
452 |
|
453 |
<varlistentry> |
454 |
<term>use_localtime</term> |
455 |
<listitem> |
456 |
<simpara>Valid for the Xen HVM and KVM hypervisors.</simpara> |
457 |
|
458 |
<para> |
459 |
A boolean option that specifies if the instance |
460 |
should be started with its clock set to the |
461 |
localtime of the machine (when true) or to the UTC |
462 |
(When false). The default is false, which is useful |
463 |
for Linux/Unix machines; for Windows OSes, it is |
464 |
recommended to enable this parameter. |
465 |
</para> |
466 |
</listitem> |
467 |
</varlistentry> |
468 |
|
469 |
<varlistentry> |
470 |
<term>kernel_path</term> |
471 |
<listitem> |
472 |
<simpara>Valid for the Xen PVM and KVM hypervisors.</simpara> |
473 |
|
474 |
<para> |
475 |
This option specifies the path (on the node) to the |
476 |
kernel to boot the instance with. Xen PVM instances |
477 |
always require this, while for KVM if this option is |
478 |
empty, it will cause the machine to load the kernel |
479 |
from its disks. |
480 |
</para> |
481 |
</listitem> |
482 |
</varlistentry> |
483 |
|
484 |
<varlistentry> |
485 |
<term>kernel_args</term> |
486 |
<listitem> |
487 |
<simpara>Valid for the Xen PVM and KVM hypervisors.</simpara> |
488 |
|
489 |
<para> |
490 |
This options specifies extra arguments to the kernel |
491 |
that will be loaded. device. This is always used |
492 |
for Xen PVM, while for KVM it is only used if the |
493 |
<option>kernel_path</option> option is also |
494 |
specified. |
495 |
</para> |
496 |
|
497 |
<para> |
498 |
The default setting for this value is simply |
499 |
<constant>"ro"</constant>, which mounts the root |
500 |
disk (initially) in read-only one. For example, |
501 |
setting this to <userinput>single</userinput> will |
502 |
cause the instance to start in single-user mode. |
503 |
</para> |
504 |
</listitem> |
505 |
</varlistentry> |
506 |
|
507 |
<varlistentry> |
508 |
<term>initrd_path</term> |
509 |
<listitem> |
510 |
<simpara>Valid for the Xen PVM and KVM hypervisors.</simpara> |
511 |
|
512 |
<para> |
513 |
This option specifies the path (on the node) to the |
514 |
initrd to boot the instance with. Xen PVM instances |
515 |
can use this always, while for KVM if this option is |
516 |
only used if the <option>kernel_path</option> option |
517 |
is also specified. You can pass here either an |
518 |
absolute filename (the path to the initrd) if you |
519 |
want to use an initrd, or use the format |
520 |
<userinput>no_initrd_path</userinput> for no initrd. |
521 |
</para> |
522 |
</listitem> |
523 |
</varlistentry> |
524 |
|
525 |
<varlistentry> |
526 |
<term>root_path</term> |
527 |
<listitem> |
528 |
<simpara>Valid for the Xen PVM and KVM hypervisors.</simpara> |
529 |
|
530 |
<para> |
531 |
This options specifies the name of the root |
532 |
device. This is always needed for Xen PVM, while for |
533 |
KVM it is only used if the |
534 |
<option>kernel_path</option> option is also |
535 |
specified. |
536 |
</para> |
537 |
</listitem> |
538 |
</varlistentry> |
539 |
|
540 |
<varlistentry> |
541 |
<term>serial_console</term> |
542 |
<listitem> |
543 |
<simpara>Valid for the KVM hypervisor.</simpara> |
544 |
|
545 |
<simpara>This boolean option specifies whether to |
546 |
emulate a serial console for the instance.</simpara> |
547 |
</listitem> |
548 |
</varlistentry> |
549 |
|
550 |
<varlistentry> |
551 |
<term>disk_cache</term> |
552 |
<listitem> |
553 |
<simpara>Valid for the KVM hypervisor.</simpara> |
554 |
|
555 |
<simpara>The disk cache mode. It can be either |
556 |
<userinput>default</userinput> to not pass any cache |
557 |
option to KVM, or one of the KVM cache modes: none |
558 |
(for direct I/O), writethrough (to use the host cache |
559 |
but report completion to the guest only when the host |
560 |
has commited the changes to disk) or writeback (to use |
561 |
the host cache and report completion as soon as the |
562 |
data is in the host cache). Note that there are |
563 |
special considerations for the cache mode depending on |
564 |
version of KVM used and disk type (always raw file |
565 |
under Ganeti), please refer to the KVM documentation |
566 |
for more details. |
567 |
</simpara> |
568 |
</listitem> |
569 |
</varlistentry> |
570 |
|
571 |
</variablelist> |
572 |
|
573 |
</para> |
574 |
|
575 |
<para> |
576 |
The <option>--iallocator</option> option specifies the instance |
577 |
allocator plugin to use. If you pass in this option the allocator |
578 |
will select nodes for this instance automatically, so you don't need |
579 |
to pass them with the <option>-n</option> option. For more |
580 |
information please refer to the instance allocator documentation. |
581 |
</para> |
582 |
|
583 |
<para> |
584 |
The <option>-t</option> options specifies the disk layout type for |
585 |
the instance. The available choices are: |
586 |
<variablelist> |
587 |
<varlistentry> |
588 |
<term>diskless</term> |
589 |
<listitem> |
590 |
<para> |
591 |
This creates an instance with no disks. Its useful for |
592 |
testing only (or other special cases). |
593 |
</para> |
594 |
</listitem> |
595 |
</varlistentry> |
596 |
<varlistentry> |
597 |
<term>file</term> |
598 |
<listitem> |
599 |
<para>Disk devices will be regular files.</para> |
600 |
</listitem> |
601 |
</varlistentry> |
602 |
<varlistentry> |
603 |
<term>plain</term> |
604 |
<listitem> |
605 |
<para>Disk devices will be logical volumes.</para> |
606 |
</listitem> |
607 |
</varlistentry> |
608 |
<varlistentry> |
609 |
<term>drbd</term> |
610 |
<listitem> |
611 |
<para> |
612 |
Disk devices will be drbd (version 8.x) on top of |
613 |
lvm volumes. |
614 |
</para> |
615 |
</listitem> |
616 |
</varlistentry> |
617 |
</variablelist> |
618 |
</para> |
619 |
|
620 |
<para> |
621 |
The optional second value of the <option>--node</option> is used for |
622 |
the drbd template type and specifies the remote node. |
623 |
</para> |
624 |
|
625 |
<para> |
626 |
If you do not want gnt-instance to wait for the disk mirror |
627 |
to be synced, use the <option>--no-wait-for-sync</option> |
628 |
option. |
629 |
</para> |
630 |
|
631 |
<para> |
632 |
The <option>--file-storage-dir</option> specifies the relative path |
633 |
under the cluster-wide file storage directory to store file-based |
634 |
disks. It is useful for having different subdirectories for |
635 |
different instances. The full path of the directory where the disk |
636 |
files are stored will consist of cluster-wide file storage directory |
637 |
+ optional subdirectory + instance name. Example: |
638 |
/srv/ganeti/file-storage/mysubdir/instance1.example.com. This option |
639 |
is only relevant for instances using the file storage backend. |
640 |
</para> |
641 |
|
642 |
<para> |
643 |
The <option>--file-driver</option> specifies the driver to use for |
644 |
file-based disks. Note that currently these drivers work with the |
645 |
xen hypervisor only. This option is only relevant for instances using |
646 |
the file storage backend. The available choices are: |
647 |
<variablelist> |
648 |
<varlistentry> |
649 |
<term>loop</term> |
650 |
<listitem> |
651 |
<para> |
652 |
Kernel loopback driver. This driver uses loopback |
653 |
devices to access the filesystem within the |
654 |
file. However, running I/O intensive applications in |
655 |
your instance using the loop driver might result in |
656 |
slowdowns. Furthermore, if you use the loopback |
657 |
driver consider increasing the maximum amount of |
658 |
loopback devices (on most systems it's 8) using the |
659 |
max_loop param. |
660 |
</para> |
661 |
</listitem> |
662 |
</varlistentry> |
663 |
<varlistentry> |
664 |
<term>blktap</term> |
665 |
<listitem> |
666 |
<para>The blktap driver (for Xen hypervisors). In |
667 |
order to be able to use the blktap driver you should |
668 |
check if the 'blktapctrl' user space disk agent is |
669 |
running (usually automatically started via xend). This |
670 |
user-level disk I/O interface has the advantage of |
671 |
better performance. Especially if you use a network |
672 |
file system (e.g. NFS) to store your instances this is |
673 |
the recommended choice. |
674 |
</para> |
675 |
</listitem> |
676 |
</varlistentry> |
677 |
</variablelist> |
678 |
</para> |
679 |
|
680 |
<para> |
681 |
The <option>--submit</option> option is used to send the job to |
682 |
the master daemon but not wait for its completion. The job |
683 |
ID will be shown so that it can be examined via |
684 |
<command>gnt-job info</command>. |
685 |
</para> |
686 |
|
687 |
<para> |
688 |
Example: |
689 |
<screen> |
690 |
# gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \ |
691 |
-n node1.example.com --file-storage-dir=mysubdir instance1.example.com |
692 |
# gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \ |
693 |
-n node1.example.com instance1.example.com |
694 |
# gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \ |
695 |
-n node1.example.com:node2.example.com instance2.example.com |
696 |
</screen> |
697 |
</para> |
698 |
</refsect3> |
699 |
|
700 |
<refsect3> |
701 |
<title>BATCH-CREATE</title> |
702 |
<cmdsynopsis> |
703 |
<command>batch-create</command> |
704 |
<arg choice="req">instances_file.json</arg> |
705 |
</cmdsynopsis> |
706 |
|
707 |
<para> |
708 |
This command (similar to the Ganeti 1.2 |
709 |
<command>batcher</command> tool) submits multiple instance |
710 |
creation jobs based on a definition file. The instance |
711 |
configurations do not encompass all the possible options for |
712 |
the <command>add</command> command, but only a subset. |
713 |
</para> |
714 |
|
715 |
<para> |
716 |
The instance file should be a valid-formed JSON file, |
717 |
containing a dictionary with instance name and instance |
718 |
parameters. The accepted parameters are: |
719 |
|
720 |
<variablelist> |
721 |
<varlistentry> |
722 |
<term>disk_size</term> |
723 |
<listitem> |
724 |
<simpara>The size of the disks of the instance.</simpara> |
725 |
</listitem> |
726 |
</varlistentry> |
727 |
<varlistentry> |
728 |
<term>disk_templace</term> |
729 |
<listitem> |
730 |
<simpara>The disk template to use for the instance, |
731 |
the same as in the <command>add</command> |
732 |
command.</simpara> |
733 |
</listitem> |
734 |
</varlistentry> |
735 |
<varlistentry> |
736 |
<term>backend</term> |
737 |
<listitem> |
738 |
<simpara>A dictionary of backend parameters.</simpara> |
739 |
</listitem> |
740 |
</varlistentry> |
741 |
<varlistentry> |
742 |
<term>hypervisor</term> |
743 |
<listitem> |
744 |
<simpara>A dictionary with a single key (the |
745 |
hypervisor name), and as value the hypervisor |
746 |
options. If not passed, the default hypervisor and |
747 |
hypervisor options will be inherited.</simpara> |
748 |
</listitem> |
749 |
</varlistentry> |
750 |
<varlistentry> |
751 |
<term>mac, ip, mode, link</term> |
752 |
<listitem> |
753 |
<simpara>Specifications for the one NIC that will be |
754 |
created for the instance. 'bridge' is also accepted |
755 |
as a backwards compatibile key.</simpara> |
756 |
</listitem> |
757 |
</varlistentry> |
758 |
<varlistentry> |
759 |
<term>nics</term> |
760 |
<listitem> |
761 |
<simpara>List of nics that will be created for the |
762 |
instance. Each entry should be a dict, with mac, ip, mode |
763 |
and link as possible keys. Please don't provide the "mac, |
764 |
ip, mode, link" parent keys if you use this method for |
765 |
specifying nics.</simpara> |
766 |
</listitem> |
767 |
</varlistentry> |
768 |
<varlistentry> |
769 |
<term>primary_node, secondary_node</term> |
770 |
<listitem> |
771 |
<simpara>The primary and optionally the secondary node |
772 |
to use for the instance (in case an iallocator script |
773 |
is not used).</simpara> |
774 |
</listitem> |
775 |
</varlistentry> |
776 |
<varlistentry> |
777 |
<term>iallocator</term> |
778 |
<listitem> |
779 |
<simpara>Instead of specifying the nodes, an |
780 |
iallocator script can be used to automatically compute |
781 |
them.</simpara> |
782 |
</listitem> |
783 |
</varlistentry> |
784 |
<varlistentry> |
785 |
<term>start</term> |
786 |
<listitem> |
787 |
<simpara>whether to start the instance</simpara> |
788 |
</listitem> |
789 |
</varlistentry> |
790 |
<varlistentry> |
791 |
<term>ip_check</term> |
792 |
<listitem> |
793 |
<simpara>Skip the check for already-in-use instance; |
794 |
see the description in the <command>add</command> |
795 |
command for details.</simpara> |
796 |
</listitem> |
797 |
</varlistentry> |
798 |
<varlistentry> |
799 |
<term>name_check</term> |
800 |
<listitem> |
801 |
<simpara>Skip the name check for instances; |
802 |
see the description in the <command>add</command> |
803 |
command for details.</simpara> |
804 |
</listitem> |
805 |
</varlistentry> |
806 |
<varlistentry> |
807 |
<term>file_storage_dir, file_driver</term> |
808 |
<listitem> |
809 |
<simpara>Configuration for the <literal>file</literal> |
810 |
disk type, see the <command>add</command> command for |
811 |
details.</simpara> |
812 |
</listitem> |
813 |
</varlistentry> |
814 |
</variablelist> |
815 |
</para> |
816 |
|
817 |
<para> |
818 |
A simple definition for one instance can be (with most of |
819 |
the parameters taken from the cluster defaults): |
820 |
<screen> |
821 |
{ |
822 |
"instance3": { |
823 |
"template": "drbd", |
824 |
"os": "debootstrap", |
825 |
"disk_size": ["25G"], |
826 |
"iallocator": "dumb" |
827 |
}, |
828 |
"instance5": { |
829 |
"template": "drbd", |
830 |
"os": "debootstrap", |
831 |
"disk_size": ["25G"], |
832 |
"iallocator": "dumb", |
833 |
"hypervisor": "xen-hvm", |
834 |
"hvparams": {"acpi": true}, |
835 |
"backend": {"memory": 512} |
836 |
} |
837 |
} |
838 |
</screen> |
839 |
</para> |
840 |
|
841 |
<para> |
842 |
The command will display the job id for each submitted instance, as follows: |
843 |
<screen> |
844 |
# gnt-instance batch-create instances.json |
845 |
instance3: 11224 |
846 |
instance5: 11225 |
847 |
</screen> |
848 |
</para> |
849 |
|
850 |
</refsect3> |
851 |
|
852 |
<refsect3> |
853 |
<title>REMOVE</title> |
854 |
|
855 |
<cmdsynopsis> |
856 |
<command>remove</command> |
857 |
<arg>--ignore-failures</arg> |
858 |
<arg>--shutdown-timeout=<replaceable>N</replaceable></arg> |
859 |
<arg>--submit</arg> |
860 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
861 |
</cmdsynopsis> |
862 |
|
863 |
<para> |
864 |
Remove an instance. This will remove all data from the |
865 |
instance and there is <emphasis>no way back</emphasis>. If |
866 |
you are not sure if you use an instance again, use |
867 |
<command>shutdown</command> first and leave it in the |
868 |
shutdown state for a while. |
869 |
|
870 |
</para> |
871 |
|
872 |
<para> |
873 |
The <option>--ignore-failures</option> option will cause the |
874 |
removal to proceed even in the presence of errors during the |
875 |
removal of the instance (e.g. during the shutdown or the |
876 |
disk removal). If this option is not given, the command will |
877 |
stop at the first error. |
878 |
</para> |
879 |
|
880 |
<para> |
881 |
The <option>--shutdown-timeout</option> is used to specify how |
882 |
much time to wait before forcing the shutdown (xm destroy in xen, |
883 |
killing the kvm process, for kvm). By default two minutes are |
884 |
given to each instance to stop. |
885 |
</para> |
886 |
|
887 |
<para> |
888 |
The <option>--submit</option> option is used to send the job to |
889 |
the master daemon but not wait for its completion. The job |
890 |
ID will be shown so that it can be examined via |
891 |
<command>gnt-job info</command>. |
892 |
</para> |
893 |
|
894 |
<para> |
895 |
Example: |
896 |
<screen> |
897 |
# gnt-instance remove instance1.example.com |
898 |
</screen> |
899 |
</para> |
900 |
</refsect3> |
901 |
|
902 |
<refsect3> |
903 |
<title>LIST</title> |
904 |
|
905 |
<cmdsynopsis> |
906 |
<command>list</command> |
907 |
<arg>--no-headers</arg> |
908 |
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg> |
909 |
<arg>-o <replaceable>[+]FIELD,...</replaceable></arg> |
910 |
<arg rep="repeat">instance</arg> |
911 |
</cmdsynopsis> |
912 |
|
913 |
<para> |
914 |
Shows the currently configured instances with memory usage, |
915 |
disk usage, the node they are running on, and their run |
916 |
status. |
917 |
</para> |
918 |
|
919 |
<para> |
920 |
The <option>--no-headers</option> option will skip the |
921 |
initial header line. The <option>--separator</option> option |
922 |
takes an argument which denotes what will be used between |
923 |
the output fields. Both these options are to help scripting. |
924 |
</para> |
925 |
|
926 |
<para> |
927 |
The <option>-o</option> option takes a comma-separated list |
928 |
of output fields. The available fields and their meaning |
929 |
are: |
930 |
<variablelist> |
931 |
<varlistentry> |
932 |
<term>name</term> |
933 |
<listitem> |
934 |
<simpara>the instance name</simpara> |
935 |
</listitem> |
936 |
</varlistentry> |
937 |
<varlistentry> |
938 |
<term>os</term> |
939 |
<listitem> |
940 |
<simpara>the OS of the instance</simpara> |
941 |
</listitem> |
942 |
</varlistentry> |
943 |
<varlistentry> |
944 |
<term>pnode</term> |
945 |
<listitem> |
946 |
<simpara>the primary node of the instance</simpara> |
947 |
</listitem> |
948 |
</varlistentry> |
949 |
<varlistentry> |
950 |
<term>snodes</term> |
951 |
<listitem> |
952 |
<simpara>comma-separated list of secondary nodes for the |
953 |
instance; usually this will be just one node</simpara> |
954 |
</listitem> |
955 |
</varlistentry> |
956 |
<varlistentry> |
957 |
<term>admin_state</term> |
958 |
<listitem> |
959 |
<simpara>the desired state of the instance (either "yes" |
960 |
or "no" denoting the instance should run or |
961 |
not)</simpara> |
962 |
</listitem> |
963 |
</varlistentry> |
964 |
<varlistentry> |
965 |
<term>disk_template</term> |
966 |
<listitem> |
967 |
<simpara>the disk template of the instance</simpara> |
968 |
</listitem> |
969 |
</varlistentry> |
970 |
<varlistentry> |
971 |
<term>oper_state</term> |
972 |
<listitem> |
973 |
<simpara>the actual state of the instance; can be |
974 |
one of the values "running", "stopped", "(node |
975 |
down)"</simpara> |
976 |
</listitem> |
977 |
</varlistentry> |
978 |
<varlistentry> |
979 |
<term>status</term> |
980 |
<listitem> |
981 |
<simpara>combined form of admin_state and oper_stat; |
982 |
this can be one of: |
983 |
<computeroutput>ERROR_nodedown</computeroutput> if the |
984 |
node of the instance is down, |
985 |
<computeroutput>ERROR_down</computeroutput> if the |
986 |
instance should run but is down, |
987 |
<computeroutput>ERROR_up</computeroutput> if the |
988 |
instance should be stopped but is actually running, |
989 |
<computeroutput>ADMIN_down</computeroutput> if the |
990 |
instance has been stopped (and is stopped) and |
991 |
<computeroutput>running</computeroutput> if the |
992 |
instance is set to be running (and is |
993 |
running)</simpara> |
994 |
</listitem> |
995 |
</varlistentry> |
996 |
<varlistentry> |
997 |
<term>oper_ram</term> |
998 |
<listitem> |
999 |
<simpara>the actual memory usage of the instance as seen |
1000 |
by the hypervisor</simpara> |
1001 |
</listitem> |
1002 |
</varlistentry> |
1003 |
<varlistentry> |
1004 |
<term>ip</term> |
1005 |
<listitem> |
1006 |
<simpara>the ip address ganeti recognizes as associated with |
1007 |
the first instance interface</simpara> |
1008 |
</listitem> |
1009 |
</varlistentry> |
1010 |
<varlistentry> |
1011 |
<term>mac</term> |
1012 |
<listitem> |
1013 |
<simpara>the first instance interface MAC address</simpara> |
1014 |
</listitem> |
1015 |
</varlistentry> |
1016 |
|
1017 |
<varlistentry> |
1018 |
<term>nic_mode</term> |
1019 |
<listitem> |
1020 |
<simpara>the mode of the first instance NIC |
1021 |
(routed or bridged)</simpara> |
1022 |
</listitem> |
1023 |
</varlistentry> |
1024 |
<varlistentry> |
1025 |
<term>nic_link</term> |
1026 |
<listitem> |
1027 |
<simpara>the link of the first instance NIC |
1028 |
</simpara> |
1029 |
</listitem> |
1030 |
</varlistentry> |
1031 |
<varlistentry> |
1032 |
<term>sda_size</term> |
1033 |
<listitem> |
1034 |
<simpara>the size of the instance's first disk</simpara> |
1035 |
</listitem> |
1036 |
</varlistentry> |
1037 |
<varlistentry> |
1038 |
<term>sdb_size</term> |
1039 |
<listitem> |
1040 |
<simpara>the size of the instance's second disk, if |
1041 |
any</simpara> |
1042 |
</listitem> |
1043 |
</varlistentry> |
1044 |
<varlistentry> |
1045 |
<term>vcpus</term> |
1046 |
<listitem> |
1047 |
<simpara>the number of VCPUs allocated to the |
1048 |
instance</simpara> |
1049 |
</listitem> |
1050 |
</varlistentry> |
1051 |
<varlistentry> |
1052 |
<term>tags</term> |
1053 |
<listitem> |
1054 |
<simpara>comma-separated list of the instances's |
1055 |
tags</simpara> |
1056 |
</listitem> |
1057 |
</varlistentry> |
1058 |
<varlistentry> |
1059 |
<term>serial_no</term> |
1060 |
<listitem> |
1061 |
<simpara>the so called 'serial number' of the |
1062 |
instance; this is a numeric field that is incremented |
1063 |
each time the instance is modified, and it can be used |
1064 |
to track modifications</simpara> |
1065 |
</listitem> |
1066 |
</varlistentry> |
1067 |
<varlistentry> |
1068 |
<term>ctime</term> |
1069 |
<listitem> |
1070 |
<para> |
1071 |
the creation time of the instance; note that this |
1072 |
field contains spaces and as such it's harder to |
1073 |
parse |
1074 |
</para> |
1075 |
<para> |
1076 |
if this attribute is not present (e.g. when |
1077 |
upgrading from older versions), then "N/A" will be |
1078 |
shown instead |
1079 |
</para> |
1080 |
</listitem> |
1081 |
</varlistentry> |
1082 |
<varlistentry> |
1083 |
<term>mtime</term> |
1084 |
<listitem> |
1085 |
<para> |
1086 |
the last modification time of the instance; note |
1087 |
that this field contains spaces and as such it's |
1088 |
harder to parse |
1089 |
</para> |
1090 |
<para> |
1091 |
if this attribute is not present (e.g. when |
1092 |
upgrading from older versions), then "N/A" will be |
1093 |
shown instead |
1094 |
</para> |
1095 |
</listitem> |
1096 |
</varlistentry> |
1097 |
|
1098 |
<varlistentry> |
1099 |
<term>uuid</term> |
1100 |
<listitem> |
1101 |
<simpara>Show the UUID of the instance (generated |
1102 |
automatically by Ganeti)</simpara> |
1103 |
</listitem> |
1104 |
</varlistentry> |
1105 |
|
1106 |
<varlistentry> |
1107 |
<term>network_port</term> |
1108 |
<listitem> |
1109 |
<simpara>If the instance has a network port assigned |
1110 |
to it (e.g. for VNC connections), this will be shown, |
1111 |
otherwise <literal>-</literal> will be |
1112 |
displayed.</simpara> |
1113 |
</listitem> |
1114 |
</varlistentry> |
1115 |
<varlistentry> |
1116 |
<term>beparams</term> |
1117 |
<listitem> |
1118 |
<simpara>A text format of the entire beparams for the |
1119 |
instance. It's more useful to select individual fields |
1120 |
from this dictionary, see below.</simpara> |
1121 |
</listitem> |
1122 |
</varlistentry> |
1123 |
<varlistentry> |
1124 |
<term>disk.count</term> |
1125 |
<listitem> |
1126 |
<simpara>The number of instance disks.</simpara> |
1127 |
</listitem> |
1128 |
</varlistentry> |
1129 |
<varlistentry> |
1130 |
<term>disk.size/N</term> |
1131 |
<listitem> |
1132 |
<simpara>The size of the instance's Nth disk. This is |
1133 |
a more generic form of the <literal>sda_size</literal> |
1134 |
and <literal>sdb_size</literal> fields.</simpara> |
1135 |
</listitem> |
1136 |
</varlistentry> |
1137 |
<varlistentry> |
1138 |
<term>disk.sizes</term> |
1139 |
<listitem> |
1140 |
<simpara>A comma-separated list of the disk sizes for |
1141 |
this instance.</simpara> |
1142 |
</listitem> |
1143 |
</varlistentry> |
1144 |
<varlistentry> |
1145 |
<term>disk_usage</term> |
1146 |
<listitem> |
1147 |
<simpara>The total disk space used by this instance on |
1148 |
each of its nodes. This is not the instance-visible |
1149 |
disk size, but the actual disk "cost" of the |
1150 |
instance.</simpara> |
1151 |
</listitem> |
1152 |
</varlistentry> |
1153 |
<varlistentry> |
1154 |
<term>nic.mac/N</term> |
1155 |
<listitem> |
1156 |
<simpara>The MAC of the Nth instance NIC.</simpara> |
1157 |
</listitem> |
1158 |
</varlistentry> |
1159 |
<varlistentry> |
1160 |
<term>nic.ip/N</term> |
1161 |
<listitem> |
1162 |
<simpara>The IP address of the Nth instance NIC.</simpara> |
1163 |
</listitem> |
1164 |
</varlistentry> |
1165 |
<varlistentry> |
1166 |
<term>nic.mode/N</term> |
1167 |
<listitem> |
1168 |
<simpara>The mode of the Nth instance NIC</simpara> |
1169 |
</listitem> |
1170 |
</varlistentry> |
1171 |
<varlistentry> |
1172 |
<term>nic.link/N</term> |
1173 |
<listitem> |
1174 |
<simpara>The link of the Nth instance NIC</simpara> |
1175 |
</listitem> |
1176 |
</varlistentry> |
1177 |
<varlistentry> |
1178 |
<term>nic.macs</term> |
1179 |
<listitem> |
1180 |
<simpara>A comma-separated list of all the MACs of the |
1181 |
instance's NICs.</simpara> |
1182 |
</listitem> |
1183 |
</varlistentry> |
1184 |
<varlistentry> |
1185 |
<term>nic.ips</term> |
1186 |
<listitem> |
1187 |
<simpara>A comma-separated list of all the IP |
1188 |
addresses of the instance's NICs.</simpara> |
1189 |
</listitem> |
1190 |
</varlistentry> |
1191 |
<varlistentry> |
1192 |
<term>nic.modes</term> |
1193 |
<listitem> |
1194 |
<simpara>A comma-separated list of all the modes of the |
1195 |
instance's NICs.</simpara> |
1196 |
</listitem> |
1197 |
</varlistentry> |
1198 |
<varlistentry> |
1199 |
<term>nic.links</term> |
1200 |
<listitem> |
1201 |
<simpara>A comma-separated list of all the link parameters |
1202 |
of the instance's NICs.</simpara> |
1203 |
</listitem> |
1204 |
</varlistentry> |
1205 |
<varlistentry> |
1206 |
<term>nic.count</term> |
1207 |
<listitem> |
1208 |
<simpara>The number of instance nics.</simpara> |
1209 |
</listitem> |
1210 |
</varlistentry> |
1211 |
<varlistentry> |
1212 |
<term>hv/<replaceable>NAME</replaceable></term> |
1213 |
<listitem> |
1214 |
<simpara>The value of the hypervisor parameter called |
1215 |
<replaceable>NAME</replaceable>. For details of what |
1216 |
hypervisor parameters exist and their meaning, see the |
1217 |
<command>add</command> command.</simpara> |
1218 |
</listitem> |
1219 |
</varlistentry> |
1220 |
<varlistentry> |
1221 |
<term>be/memory</term> |
1222 |
<listitem> |
1223 |
<simpara>The configured memory for the instance.</simpara> |
1224 |
</listitem> |
1225 |
</varlistentry> |
1226 |
<varlistentry> |
1227 |
<term>be/vcpus</term> |
1228 |
<listitem> |
1229 |
<simpara>The configured number of VCPUs for the |
1230 |
instance.</simpara> |
1231 |
</listitem> |
1232 |
</varlistentry> |
1233 |
<varlistentry> |
1234 |
<term>be/auto_balance</term> |
1235 |
<listitem> |
1236 |
<simpara>Whether the instance is considered in N+1 |
1237 |
checks.</simpara> |
1238 |
</listitem> |
1239 |
</varlistentry> |
1240 |
</variablelist> |
1241 |
</para> |
1242 |
|
1243 |
<para> |
1244 |
If the value of the option starts with the character |
1245 |
<constant>+</constant>, the new field(s) will be added to the |
1246 |
default list. This allows to quickly see the default list |
1247 |
plus a few other fields, instead of retyping the entire list |
1248 |
of fields. |
1249 |
</para> |
1250 |
|
1251 |
<para> |
1252 |
There is a subtle grouping about the available output |
1253 |
fields: all fields except for <option>oper_state</option>, |
1254 |
<option>oper_ram</option> and <option>status</option> are |
1255 |
configuration value and not run-time values. So if you don't |
1256 |
select any of the these fields, the query will be satisfied |
1257 |
instantly from the cluster configuration, without having to |
1258 |
ask the remote nodes for the data. This can be helpful for |
1259 |
big clusters when you only want some data and it makes sense |
1260 |
to specify a reduced set of output fields. |
1261 |
</para> |
1262 |
|
1263 |
<para>The default output field list is: |
1264 |
<simplelist type="inline"> |
1265 |
<member>name</member> |
1266 |
<member>os</member> |
1267 |
<member>pnode</member> |
1268 |
<member>admin_state</member> |
1269 |
<member>oper_state</member> |
1270 |
<member>oper_ram</member> |
1271 |
</simplelist>. |
1272 |
</para> |
1273 |
</refsect3> |
1274 |
|
1275 |
<refsect3> |
1276 |
<title>INFO</title> |
1277 |
|
1278 |
<cmdsynopsis> |
1279 |
<command>info</command> |
1280 |
<group> |
1281 |
<arg>-s</arg> |
1282 |
<arg>--static</arg> |
1283 |
</group> |
1284 |
<group choice="req"> |
1285 |
<arg>--all</arg> |
1286 |
<arg rep="repeat"><replaceable>instance</replaceable></arg> |
1287 |
</group> |
1288 |
</cmdsynopsis> |
1289 |
|
1290 |
<para> |
1291 |
Show detailed information about the given instance(s). This is |
1292 |
different from <command>list</command> as it shows detailed data |
1293 |
about the instance's disks (especially useful for the drbd disk |
1294 |
template). |
1295 |
</para> |
1296 |
|
1297 |
<para> |
1298 |
If the option <option>-s</option> is used, only information |
1299 |
available in the configuration file is returned, without |
1300 |
querying nodes, making the operation faster. |
1301 |
</para> |
1302 |
|
1303 |
<para> |
1304 |
Use the <option>--all</option> to get info about all instances, |
1305 |
rather than explicitely passing the ones you're interested in. |
1306 |
</para> |
1307 |
</refsect3> |
1308 |
|
1309 |
<refsect3> |
1310 |
<title>MODIFY</title> |
1311 |
|
1312 |
<cmdsynopsis> |
1313 |
<command>modify</command> |
1314 |
<sbr> |
1315 |
<arg choice="opt">-H <replaceable>HYPERVISOR_PARAMETERS</replaceable></arg> |
1316 |
<sbr> |
1317 |
<arg choice="opt">-B <replaceable>BACKEND_PARAMETERS</replaceable></arg> |
1318 |
<sbr> |
1319 |
<group> |
1320 |
<arg>--net add<replaceable><optional>:options</optional></replaceable></arg> |
1321 |
<arg>--net remove</arg> |
1322 |
<arg>--net <replaceable>N:options</replaceable></arg> |
1323 |
</group> |
1324 |
<sbr> |
1325 |
<group> |
1326 |
<arg>--disk add:size=<replaceable>SIZE</replaceable></arg> |
1327 |
<arg>--disk remove</arg> |
1328 |
<arg>--disk <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></arg> |
1329 |
</group> |
1330 |
|
1331 |
<sbr> |
1332 |
<arg>--submit</arg> |
1333 |
<sbr> |
1334 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1335 |
</cmdsynopsis> |
1336 |
|
1337 |
<para> |
1338 |
Modifies the memory size, number of vcpus, ip address, MAC |
1339 |
address and/or nic parameters for an instance. It can also |
1340 |
add and remove disks and NICs to/from the instance. Note |
1341 |
that you need to give at least one of the arguments, otherwise |
1342 |
the command complains. |
1343 |
</para> |
1344 |
|
1345 |
<para> |
1346 |
The <option>-H</option> option specifies hypervisor options |
1347 |
in the form of <userinput>name=value[,...]</userinput>. For details which options can be specified, see the <command>add</command> command. |
1348 |
</para> |
1349 |
|
1350 |
<para> |
1351 |
The <option>--disk |
1352 |
add:size=<replaceable>SIZE</replaceable></option> option |
1353 |
adds a disk to the instance. The <option>--disk |
1354 |
remove</option> will remove the last disk of the |
1355 |
instance. The <option>--disk |
1356 |
<replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></option> |
1357 |
option will change the mode of the Nth disk of the instance |
1358 |
between read-only (<literal>ro</literal>) and read-write |
1359 |
(<literal>rw</literal>). |
1360 |
</para> |
1361 |
|
1362 |
<para> |
1363 |
The <option>--net |
1364 |
add:<replaceable>options</replaceable></option> option will |
1365 |
add a new NIC to the instance. The available options are the |
1366 |
same as in the <command>add</command> command (mac, ip, link, |
1367 |
mode). The <option>--net remove</option> will remove the |
1368 |
last NIC of the instance, while the <option>--net |
1369 |
<replaceable>N</replaceable>:<replaceable>options</replaceable></option> |
1370 |
option will change the parameters of the Nth instance NIC. |
1371 |
</para> |
1372 |
|
1373 |
<para> |
1374 |
The <option>--submit</option> option is used to send the job to |
1375 |
the master daemon but not wait for its completion. The job |
1376 |
ID will be shown so that it can be examined via |
1377 |
<command>gnt-job info</command>. |
1378 |
</para> |
1379 |
|
1380 |
<para> |
1381 |
All the changes take effect at the next restart. If the |
1382 |
instance is running, there is no effect on the instance. |
1383 |
</para> |
1384 |
</refsect3> |
1385 |
|
1386 |
<refsect3> |
1387 |
<title>REINSTALL</title> |
1388 |
|
1389 |
<cmdsynopsis> |
1390 |
<command>reinstall</command> |
1391 |
<arg choice="opt">-o <replaceable>os-type</replaceable></arg> |
1392 |
<arg>--select-os</arg> |
1393 |
<arg choice="opt">-f <replaceable>force</replaceable></arg> |
1394 |
<arg>--force-multiple</arg> |
1395 |
<sbr> |
1396 |
<group choice="opt"> |
1397 |
<arg>--instance</arg> |
1398 |
<arg>--node</arg> |
1399 |
<arg>--primary</arg> |
1400 |
<arg>--secondary</arg> |
1401 |
<arg>--all</arg> |
1402 |
</group> |
1403 |
<arg>--submit</arg> |
1404 |
<arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg> |
1405 |
</cmdsynopsis> |
1406 |
|
1407 |
<para> |
1408 |
Reinstalls the operating system on the given instance(s). The |
1409 |
instance(s) must be stopped when running this command. If the |
1410 |
<option>--os-type</option> is specified, the operating |
1411 |
system is changed. |
1412 |
</para> |
1413 |
|
1414 |
<para> |
1415 |
The <option>--select-os</option> option switches to an |
1416 |
interactive OS reinstall. The user is prompted to select the OS |
1417 |
template from the list of available OS templates. |
1418 |
</para> |
1419 |
|
1420 |
<para> |
1421 |
Since this is a potentially dangerous command, the user will |
1422 |
be required to confirm this action, unless the |
1423 |
<option>-f</option> flag is passed. When multiple instances |
1424 |
are selected (either by passing multiple arguments or by |
1425 |
using the <option>--node</option>, |
1426 |
<option>--primary</option>, <option>--secondary</option> or |
1427 |
<option>--all</option> options), the user must pass both the |
1428 |
<option>--force</option> and |
1429 |
<option>--force-multiple</option> options to skip the |
1430 |
interactive confirmation. |
1431 |
</para> |
1432 |
|
1433 |
<para> |
1434 |
The <option>--submit</option> option is used to send the job to |
1435 |
the master daemon but not wait for its completion. The job |
1436 |
ID will be shown so that it can be examined via |
1437 |
<command>gnt-job info</command>. |
1438 |
</para> |
1439 |
|
1440 |
|
1441 |
</refsect3> |
1442 |
|
1443 |
<refsect3> |
1444 |
<title>RENAME</title> |
1445 |
|
1446 |
<cmdsynopsis> |
1447 |
<command>rename</command> |
1448 |
<arg>--no-ip-check</arg> |
1449 |
<arg>--submit</arg> |
1450 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1451 |
<arg choice="req"><replaceable>new_name</replaceable></arg> |
1452 |
</cmdsynopsis> |
1453 |
|
1454 |
<para> |
1455 |
Renames the given instance. The instance must be stopped |
1456 |
when running this command. The requirements for the new name |
1457 |
are the same as for adding an instance: the new name must be |
1458 |
resolvable and the IP it resolves to must not be reachable |
1459 |
(in order to prevent duplicate IPs the next time the |
1460 |
instance is started). The IP test can be skipped if the |
1461 |
<option>--no-ip-check</option> option is passed. |
1462 |
</para> |
1463 |
|
1464 |
<para> |
1465 |
The <option>--submit</option> option is used to send the job to |
1466 |
the master daemon but not wait for its completion. The job |
1467 |
ID will be shown so that it can be examined via |
1468 |
<command>gnt-job info</command>. |
1469 |
</para> |
1470 |
|
1471 |
</refsect3> |
1472 |
|
1473 |
</refsect2> |
1474 |
|
1475 |
<refsect2> |
1476 |
<title>Starting/stopping/connecting to console</title> |
1477 |
|
1478 |
<refsect3> |
1479 |
<title>STARTUP</title> |
1480 |
|
1481 |
<cmdsynopsis> |
1482 |
<command>startup</command> |
1483 |
<sbr> |
1484 |
<arg>--force</arg> |
1485 |
<sbr> |
1486 |
<arg>--force-multiple</arg> |
1487 |
<sbr> |
1488 |
<group choice="opt"> |
1489 |
<arg>--instance</arg> |
1490 |
<arg>--node</arg> |
1491 |
<arg>--primary</arg> |
1492 |
<arg>--secondary</arg> |
1493 |
<arg>--all</arg> |
1494 |
</group> |
1495 |
<sbr> |
1496 |
<arg>-H <option>key=value...</option></arg> |
1497 |
<arg>-B <option>key=value...</option></arg> |
1498 |
<sbr> |
1499 |
<arg>--submit</arg> |
1500 |
<sbr> |
1501 |
<arg choice="opt" |
1502 |
rep="repeat"><replaceable>name</replaceable></arg> |
1503 |
</cmdsynopsis> |
1504 |
|
1505 |
<para> |
1506 |
Starts one or more instances, depending on the following |
1507 |
options. The four available modes are: |
1508 |
<variablelist> |
1509 |
<varlistentry> |
1510 |
<term><option>--instance</option></term> |
1511 |
<listitem> |
1512 |
<simpara>will start the instances given as arguments |
1513 |
(at least one argument required); this is the default |
1514 |
selection</simpara> |
1515 |
</listitem> |
1516 |
</varlistentry> |
1517 |
<varlistentry> |
1518 |
<term>--node</term> |
1519 |
<listitem> |
1520 |
<simpara>will start the instances who have the given |
1521 |
node as either primary or secondary</simpara> |
1522 |
</listitem> |
1523 |
</varlistentry> |
1524 |
<varlistentry> |
1525 |
<term><option>--primary</option></term> |
1526 |
<listitem> |
1527 |
<simpara>will start all instances whose primary node |
1528 |
is in the list of nodes passed as arguments (at least |
1529 |
one node required)</simpara> |
1530 |
</listitem> |
1531 |
</varlistentry> |
1532 |
<varlistentry> |
1533 |
<term><option>--secondary</option></term> |
1534 |
<listitem> |
1535 |
<simpara>will start all instances whose secondary node |
1536 |
is in the list of nodes passed as arguments (at least |
1537 |
one node required)</simpara> |
1538 |
</listitem> |
1539 |
</varlistentry> |
1540 |
<varlistentry> |
1541 |
<term>--all</term> |
1542 |
<listitem> |
1543 |
<simpara>will start all instances in the cluster (no |
1544 |
arguments accepted)</simpara> |
1545 |
</listitem> |
1546 |
</varlistentry> |
1547 |
</variablelist> |
1548 |
</para> |
1549 |
|
1550 |
<para> |
1551 |
Note that although you can pass more than one selection |
1552 |
option, the last one wins, so in order to guarantee the |
1553 |
desired result, don't pass more than one such option. |
1554 |
</para> |
1555 |
|
1556 |
<para> |
1557 |
Use <option>--force</option> to start even if secondary disks are |
1558 |
failing. |
1559 |
</para> |
1560 |
|
1561 |
<para> |
1562 |
The <option>--force-multiple</option> will skip the |
1563 |
interactive confirmation in the case the more than one |
1564 |
instance will be affected. |
1565 |
</para> |
1566 |
|
1567 |
<para> |
1568 |
The <option>-H</option> and <option>-B</option> options |
1569 |
specify temporary hypervisor and backend parameters that can |
1570 |
be used to start an instance with modified parameters. They |
1571 |
can be useful for quick testing without having to modify an |
1572 |
instance back and forth, e.g.: |
1573 |
<screen> |
1574 |
# gnt-instance start -H root_args="single" instance1 |
1575 |
# gnt-instance start -B memory=2048 instance2 |
1576 |
</screen> |
1577 |
The first form will start the instance |
1578 |
<userinput>instance1</userinput> in single-user mode, and |
1579 |
the instance <userinput>instance2</userinput> with 2GB of |
1580 |
RAM (this time only, unless that is the actual instance |
1581 |
memory size already). Note that the values override the |
1582 |
instance parameters (and not extend them): an instance with |
1583 |
"root_args=ro" when started with <userinput>-H |
1584 |
root_args=single</userinput> will result in "single", not |
1585 |
"ro single". |
1586 |
</para> |
1587 |
|
1588 |
<para> |
1589 |
The <option>--submit</option> option is used to send the job to |
1590 |
the master daemon but not wait for its completion. The job |
1591 |
ID will be shown so that it can be examined via |
1592 |
<command>gnt-job info</command>. |
1593 |
</para> |
1594 |
|
1595 |
<para> |
1596 |
Example: |
1597 |
<screen> |
1598 |
# gnt-instance start instance1.example.com |
1599 |
# gnt-instance start --node node1.example.com node2.example.com |
1600 |
# gnt-instance start --all |
1601 |
</screen> |
1602 |
</para> |
1603 |
</refsect3> |
1604 |
|
1605 |
<refsect3> |
1606 |
<title>SHUTDOWN</title> |
1607 |
|
1608 |
<cmdsynopsis> |
1609 |
<command>shutdown</command> |
1610 |
<sbr> |
1611 |
<arg>--timeout=<replaceable>N</replaceable></arg> |
1612 |
<sbr> |
1613 |
<arg>--force-multiple</arg> |
1614 |
<sbr> |
1615 |
<group choice="opt"> |
1616 |
<arg>--instance</arg> |
1617 |
<arg>--node</arg> |
1618 |
<arg>--primary</arg> |
1619 |
<arg>--secondary</arg> |
1620 |
<arg>--all</arg> |
1621 |
</group> |
1622 |
<sbr> |
1623 |
<arg>--submit</arg> |
1624 |
<sbr> |
1625 |
<arg choice="opt" |
1626 |
rep="repeat"><replaceable>name</replaceable></arg> |
1627 |
</cmdsynopsis> |
1628 |
|
1629 |
<para> |
1630 |
Stops one or more instances. If the instance cannot be |
1631 |
cleanly stopped during a hardcoded interval (currently 2 |
1632 |
minutes), it will forcibly stop the instance (equivalent to |
1633 |
switching off the power on a physical machine). |
1634 |
</para> |
1635 |
|
1636 |
<para> |
1637 |
The <option>--timeout</option> is used to specify how much time to |
1638 |
wait before forcing the shutdown (xm destroy in xen, killing the kvm |
1639 |
process, for kvm). By default two minutes are given to each instance |
1640 |
to stop. |
1641 |
</para> |
1642 |
|
1643 |
<para> |
1644 |
The <option>--instance</option>, <option>--node</option>, |
1645 |
<option>--primary</option>, <option>--secondary</option> and |
1646 |
<option>--all</option> options are similar as for the |
1647 |
<command>startup</command> command and they influence the |
1648 |
actual instances being shutdown. |
1649 |
</para> |
1650 |
|
1651 |
<para> |
1652 |
The <option>--submit</option> option is used to send the job to |
1653 |
the master daemon but not wait for its completion. The job |
1654 |
ID will be shown so that it can be examined via |
1655 |
<command>gnt-job info</command>. |
1656 |
</para> |
1657 |
|
1658 |
|
1659 |
<para> |
1660 |
Example: |
1661 |
<screen> |
1662 |
# gnt-instance shutdown instance1.example.com |
1663 |
# gnt-instance shutdown --all |
1664 |
</screen> |
1665 |
</para> |
1666 |
</refsect3> |
1667 |
|
1668 |
<refsect3> |
1669 |
<title>REBOOT</title> |
1670 |
|
1671 |
<cmdsynopsis> |
1672 |
<command>reboot</command> |
1673 |
<sbr> |
1674 |
<arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg> |
1675 |
<sbr> |
1676 |
<arg>--ignore-secondaries</arg> |
1677 |
<sbr> |
1678 |
<arg>--shutdown-timeout=<replaceable>N</replaceable></arg> |
1679 |
<sbr> |
1680 |
<arg>--force-multiple</arg> |
1681 |
<sbr> |
1682 |
<group choice="opt"> |
1683 |
<arg>--instance</arg> |
1684 |
<arg>--node</arg> |
1685 |
<arg>--primary</arg> |
1686 |
<arg>--secondary</arg> |
1687 |
<arg>--all</arg> |
1688 |
</group> |
1689 |
<sbr> |
1690 |
<arg>--submit</arg> |
1691 |
<sbr> |
1692 |
<arg choice="opt" |
1693 |
rep="repeat"><replaceable>name</replaceable></arg> |
1694 |
</cmdsynopsis> |
1695 |
|
1696 |
<para> |
1697 |
Reboots one or more instances. The type of reboot depends on |
1698 |
the value of <option>--type</option>. A soft reboot does a |
1699 |
hypervisor reboot, a hard reboot does a instance stop, |
1700 |
recreates the hypervisor config for the instance and |
1701 |
starts the instance. A full reboot does the equivalent |
1702 |
of <command>gnt-instance shutdown && gnt-instance |
1703 |
startup</command>. The default is hard reboot. |
1704 |
</para> |
1705 |
|
1706 |
<para> |
1707 |
For the hard reboot the option |
1708 |
<option>--ignore-secondaries</option> ignores errors for the |
1709 |
secondary node while re-assembling the instance disks. |
1710 |
</para> |
1711 |
|
1712 |
<para> |
1713 |
The <option>--instance</option>, <option>--node</option>, |
1714 |
<option>--primary</option>, <option>--secondary</option> and |
1715 |
<option>--all</option> options are similar as for the |
1716 |
<command>startup</command> command and they influence the |
1717 |
actual instances being rebooted. |
1718 |
</para> |
1719 |
|
1720 |
<para> |
1721 |
The <option>--shutdown-timeout</option> is used to specify how |
1722 |
much time to wait before forcing the shutdown (xm destroy in xen, |
1723 |
killing the kvm process, for kvm). By default two minutes are |
1724 |
given to each instance to stop. |
1725 |
</para> |
1726 |
|
1727 |
<para> |
1728 |
The <option>--force-multiple</option> will skip the |
1729 |
interactive confirmation in the case the more than one |
1730 |
instance will be affected. |
1731 |
</para> |
1732 |
|
1733 |
<para> |
1734 |
Example: |
1735 |
<screen> |
1736 |
# gnt-instance reboot instance1.example.com |
1737 |
# gnt-instance reboot --type=full instance1.example.com |
1738 |
</screen> |
1739 |
</para> |
1740 |
</refsect3> |
1741 |
|
1742 |
<refsect3> |
1743 |
<title>CONSOLE</title> |
1744 |
<cmdsynopsis> |
1745 |
<command>console</command> |
1746 |
<arg choice="opt">--show-cmd</arg> |
1747 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1748 |
</cmdsynopsis> |
1749 |
|
1750 |
<para> |
1751 |
Connects to the console of the given instance. If the |
1752 |
instance is not up, an error is returned. Use the |
1753 |
<option>--show-cmd</option> option to display the command |
1754 |
instead of executing it. |
1755 |
</para> |
1756 |
|
1757 |
<para> |
1758 |
For HVM instances, this will attempt to connect to the |
1759 |
serial console of the instance. To connect to the |
1760 |
virtualized "physical" console of a HVM instance, use a VNC |
1761 |
client with the connection info from the |
1762 |
<command>info</command> command. |
1763 |
</para> |
1764 |
|
1765 |
<para> |
1766 |
Example: |
1767 |
<screen> |
1768 |
# gnt-instance console instance1.example.com |
1769 |
</screen> |
1770 |
</para> |
1771 |
</refsect3> |
1772 |
|
1773 |
</refsect2> |
1774 |
|
1775 |
<refsect2> |
1776 |
<title>Disk management</title> |
1777 |
|
1778 |
<refsect3> |
1779 |
<title>REPLACE-DISKS</title> |
1780 |
|
1781 |
<cmdsynopsis> |
1782 |
<command>replace-disks</command> |
1783 |
<arg>--submit</arg> |
1784 |
<arg choice="req">-p</arg> |
1785 |
<arg>--disks <replaceable>idx</replaceable></arg> |
1786 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1787 |
</cmdsynopsis> |
1788 |
|
1789 |
<cmdsynopsis> |
1790 |
<command>replace-disks</command> |
1791 |
<arg>--submit</arg> |
1792 |
<arg choice="req">-s</arg> |
1793 |
<arg>--disks <replaceable>idx</replaceable></arg> |
1794 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1795 |
</cmdsynopsis> |
1796 |
|
1797 |
<cmdsynopsis> |
1798 |
<command>replace-disks</command> |
1799 |
<arg>--submit</arg> |
1800 |
<group choice="req"> |
1801 |
<arg>--iallocator <replaceable>name</replaceable></arg> |
1802 |
<arg>--new-secondary <replaceable>NODE</replaceable></arg> |
1803 |
</group> |
1804 |
|
1805 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1806 |
</cmdsynopsis> |
1807 |
|
1808 |
<cmdsynopsis> |
1809 |
<command>replace-disks</command> |
1810 |
<arg>--submit</arg> |
1811 |
<arg choice="req">--auto</arg> |
1812 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1813 |
</cmdsynopsis> |
1814 |
|
1815 |
<para> |
1816 |
This command is a generalized form for replacing disks. It |
1817 |
is currently only valid for the mirrored (DRBD) disk |
1818 |
template. |
1819 |
</para> |
1820 |
|
1821 |
<para> |
1822 |
The first form (when passing the <option>-p</option> option) |
1823 |
will replace the disks on the primary, while the second form |
1824 |
(when passing the <option>-s</option> option will replace |
1825 |
the disks on the secondary node. For these two cases (as the |
1826 |
node doesn't change), it is possible to only run the replace |
1827 |
for a subset of the disks, using the option |
1828 |
<option>--disks</option> which takes a list of |
1829 |
comma-delimited disk indices (zero-based), |
1830 |
e.g. <userinput>0,2</userinput> to replace only the first |
1831 |
and third disks. |
1832 |
</para> |
1833 |
|
1834 |
<para> |
1835 |
The third form (when passing either the |
1836 |
<option>--iallocator</option> or the |
1837 |
<option>--new-secondary</option> option) is designed to |
1838 |
change secondary node of the instance. Specifying |
1839 |
<option>--iallocator</option> makes the new secondary be |
1840 |
selected automatically by the specified allocator plugin, |
1841 |
otherwise the new secondary node will be the one chosen |
1842 |
manually via the <option>--new-secondary</option> option. |
1843 |
</para> |
1844 |
|
1845 |
<para> |
1846 |
The fourth form (when using <option>--auto</option>) will |
1847 |
automatically determine which disks of an instance are faulty and |
1848 |
replace them within the same node. The <option>--auto</option> |
1849 |
option works only when an instance has only faulty disks on |
1850 |
either the primary or secondary node; it doesn't work when |
1851 |
both sides have faulty disks. |
1852 |
</para> |
1853 |
|
1854 |
<para> |
1855 |
The <option>--submit</option> option is used to send the job to |
1856 |
the master daemon but not wait for its completion. The job |
1857 |
ID will be shown so that it can be examined via |
1858 |
<command>gnt-job info</command>. |
1859 |
</para> |
1860 |
|
1861 |
<para> |
1862 |
Note that it is not possible to select an offline or drained |
1863 |
node as a new secondary. |
1864 |
</para> |
1865 |
|
1866 |
</refsect3> |
1867 |
|
1868 |
<refsect3> |
1869 |
<title>ACTIVATE-DISKS</title> |
1870 |
|
1871 |
<cmdsynopsis> |
1872 |
<command>activate-disks</command> |
1873 |
<arg>--submit</arg> |
1874 |
<arg>--ignore-size</arg> |
1875 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1876 |
</cmdsynopsis> |
1877 |
<para> |
1878 |
Activates the block devices of the given instance. If |
1879 |
successful, the command will show the location and name of |
1880 |
the block devices: |
1881 |
<screen> |
1882 |
node1.example.com:disk/0:/dev/drbd0 |
1883 |
node1.example.com:disk/1:/dev/drbd1 |
1884 |
</screen> |
1885 |
|
1886 |
In this example, <emphasis>node1.example.com</emphasis> is |
1887 |
the name of the node on which the devices have been |
1888 |
activated. The <emphasis>disk/0</emphasis> and |
1889 |
<emphasis>disk/1</emphasis> are the Ganeti-names of the |
1890 |
instance disks; how they are visible inside the instance is |
1891 |
hypervisor-specific. <emphasis>/dev/drbd0</emphasis> and |
1892 |
<emphasis>/dev/drbd1</emphasis> are the actual block devices |
1893 |
as visible on the node. |
1894 |
</para> |
1895 |
|
1896 |
<para> |
1897 |
The <option>--submit</option> option is used to send the job to |
1898 |
the master daemon but not wait for its completion. The job |
1899 |
ID will be shown so that it can be examined via |
1900 |
<command>gnt-job info</command>. |
1901 |
</para> |
1902 |
|
1903 |
<para> |
1904 |
The <option>--ignore-size</option> option can be used to |
1905 |
activate disks ignoring the currently configured size in |
1906 |
Ganeti. This can be used in cases where the configuration |
1907 |
has gotten out of sync with the real-world (e.g. after a |
1908 |
partially-failed grow-disk operation or due to rounding in |
1909 |
LVM devices). This should not be used in normal cases, but |
1910 |
only when activate-disks fails without it. |
1911 |
</para> |
1912 |
|
1913 |
<para> |
1914 |
Note that it is safe to run this command while the instance |
1915 |
is already running. |
1916 |
</para> |
1917 |
</refsect3> |
1918 |
|
1919 |
<refsect3> |
1920 |
<title>DEACTIVATE-DISKS</title> |
1921 |
|
1922 |
<cmdsynopsis> |
1923 |
<command>deactivate-disks</command> |
1924 |
<arg>--submit</arg> |
1925 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1926 |
</cmdsynopsis> |
1927 |
<para> |
1928 |
De-activates the block devices of the given instance. Note |
1929 |
that if you run this command for an instance with a drbd |
1930 |
disk template, while it is running, it will not be able to |
1931 |
shutdown the block devices on the primary node, but it will |
1932 |
shutdown the block devices on the secondary nodes, thus |
1933 |
breaking the replication. |
1934 |
</para> |
1935 |
|
1936 |
<para> |
1937 |
The <option>--submit</option> option is used to send the job to |
1938 |
the master daemon but not wait for its completion. The job |
1939 |
ID will be shown so that it can be examined via |
1940 |
<command>gnt-job info</command>. |
1941 |
</para> |
1942 |
|
1943 |
</refsect3> |
1944 |
|
1945 |
<refsect3> |
1946 |
<title>GROW-DISK</title> |
1947 |
<cmdsynopsis> |
1948 |
<command>grow-disk</command> |
1949 |
<arg>--no-wait-for-sync</arg> |
1950 |
<arg>--submit</arg> |
1951 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1952 |
<arg choice="req"><replaceable>disk</replaceable></arg> |
1953 |
<arg choice="req"><replaceable>amount</replaceable></arg> |
1954 |
</cmdsynopsis> |
1955 |
|
1956 |
<para> |
1957 |
Grows an instance's disk. This is only possible for |
1958 |
instances having a <literal>plain</literal> or |
1959 |
<literal>drbd</literal> disk template. |
1960 |
</para> |
1961 |
|
1962 |
<para> |
1963 |
Note that this command only change the block device size; it |
1964 |
will not grow the actual filesystems, partitions, etc. that |
1965 |
live on that disk. Usually, you will need to: |
1966 |
<orderedlist> |
1967 |
<listitem> |
1968 |
<simpara>use <command>gnt-instance grow-disk</command></simpara> |
1969 |
</listitem> |
1970 |
<listitem> |
1971 |
<simpara>reboot the instance (later, at a convenient |
1972 |
time)</simpara> |
1973 |
</listitem> |
1974 |
<listitem> |
1975 |
<simpara>use a filesystem resizer, such as |
1976 |
<citerefentry> <refentrytitle>ext2online</refentrytitle> |
1977 |
<manvolnum>8</manvolnum> </citerefentry> or |
1978 |
<citerefentry> <refentrytitle>xfs_growfs</refentrytitle> |
1979 |
<manvolnum>8</manvolnum> </citerefentry> to resize the |
1980 |
filesystem, or use <citerefentry> |
1981 |
<refentrytitle>fdisk</refentrytitle> |
1982 |
<manvolnum>8</manvolnum> </citerefentry> to change the |
1983 |
partition table on the disk |
1984 |
</simpara> |
1985 |
</listitem> |
1986 |
</orderedlist> |
1987 |
</para> |
1988 |
|
1989 |
|
1990 |
<para> |
1991 |
The <replaceable>disk</replaceable> argument is the index of |
1992 |
the instance disk to grow. The |
1993 |
<replaceable>amount</replaceable> argument is given either |
1994 |
as a number (and it represents the amount to increase the |
1995 |
disk with in mebibytes) or can be given similar to the |
1996 |
arguments in the create instance operation, with a suffix |
1997 |
denoting the unit. |
1998 |
</para> |
1999 |
|
2000 |
<para> |
2001 |
Note that the disk grow operation might complete on one node |
2002 |
but fail on the other; this will leave the instance with |
2003 |
different-sized LVs on the two nodes, but this will not |
2004 |
create problems (except for unused space). |
2005 |
</para> |
2006 |
|
2007 |
<para> |
2008 |
If you do not want gnt-instance to wait for the new disk |
2009 |
region to be synced, use the |
2010 |
<option>--no-wait-for-sync</option> option. |
2011 |
</para> |
2012 |
|
2013 |
<para> |
2014 |
The <option>--submit</option> option is used to send the job to |
2015 |
the master daemon but not wait for its completion. The job |
2016 |
ID will be shown so that it can be examined via |
2017 |
<command>gnt-job info</command>. |
2018 |
</para> |
2019 |
|
2020 |
|
2021 |
<para>Example (increase the first disk for instance1 by 16GiB): |
2022 |
<screen> |
2023 |
# gnt-instance grow-disk instance1.example.com 0 16g |
2024 |
</screen> |
2025 |
</para> |
2026 |
|
2027 |
<para> |
2028 |
Also note that disk shrinking is not supported; use |
2029 |
<command>gnt-backup export</command> and then |
2030 |
<command>gnt-backup import</command> to reduce the disk size |
2031 |
of an instance. |
2032 |
</para> |
2033 |
</refsect3> |
2034 |
|
2035 |
<refsect3> |
2036 |
<title>RECREATE-DISKS</title> |
2037 |
|
2038 |
<cmdsynopsis> |
2039 |
<command>recreate-disks</command> |
2040 |
<arg>--submit</arg> |
2041 |
<arg>--disks=<option>indices</option></arg> |
2042 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
2043 |
</cmdsynopsis> |
2044 |
<para> |
2045 |
Recreates the disks of the given instance, or only a subset |
2046 |
of the disks (if the option <option>disks</option> is |
2047 |
passed, which must be a comma-separated list of disk |
2048 |
indices, starting from zero). |
2049 |
</para> |
2050 |
|
2051 |
<para> |
2052 |
Note that this functionality should only be used for missing |
2053 |
disks; if any of the given disks already exists, the |
2054 |
operation will fail. While this is suboptimal, |
2055 |
recreate-disks should hopefully not be needed in normal |
2056 |
operation and as such the impact of this is low. |
2057 |
</para> |
2058 |
|
2059 |
<para> |
2060 |
The <option>--submit</option> option is used to send the job to |
2061 |
the master daemon but not wait for its completion. The job |
2062 |
ID will be shown so that it can be examined via |
2063 |
<command>gnt-job info</command>. |
2064 |
</para> |
2065 |
|
2066 |
</refsect3> |
2067 |
|
2068 |
</refsect2> |
2069 |
|
2070 |
<refsect2> |
2071 |
<title>Recovery</title> |
2072 |
|
2073 |
<refsect3> |
2074 |
<title>FAILOVER</title> |
2075 |
|
2076 |
<cmdsynopsis> |
2077 |
<command>failover</command> |
2078 |
<arg>-f</arg> |
2079 |
<arg>--ignore-consistency</arg> |
2080 |
<arg>--shutdown-timeout=<replaceable>N</replaceable></arg> |
2081 |
<arg>--submit</arg> |
2082 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
2083 |
</cmdsynopsis> |
2084 |
|
2085 |
<para> |
2086 |
Failover will fail the instance over its secondary |
2087 |
node. This works only for instances having a drbd disk |
2088 |
template. |
2089 |
</para> |
2090 |
|
2091 |
<para> |
2092 |
Normally the failover will check the consistency of the |
2093 |
disks before failing over the instance. If you are trying to |
2094 |
migrate instances off a dead node, this will fail. Use the |
2095 |
<option>--ignore-consistency</option> option for this |
2096 |
purpose. Note that this option can be dangerous as errors in |
2097 |
shutting down the instance will be ignored, resulting in |
2098 |
possibly having the instance running on two machines in |
2099 |
parallel (on disconnected DRBD drives). |
2100 |
</para> |
2101 |
|
2102 |
<para> |
2103 |
The <option>--shutdown-timeout</option> is used to specify how |
2104 |
much time to wait before forcing the shutdown (xm destroy in xen, |
2105 |
killing the kvm process, for kvm). By default two minutes are |
2106 |
given to each instance to stop. |
2107 |
</para> |
2108 |
|
2109 |
<para> |
2110 |
The <option>--submit</option> option is used to send the job to |
2111 |
the master daemon but not wait for its completion. The job |
2112 |
ID will be shown so that it can be examined via |
2113 |
<command>gnt-job info</command>. |
2114 |
</para> |
2115 |
|
2116 |
<para> |
2117 |
Example: |
2118 |
<screen> |
2119 |
# gnt-instance failover instance1.example.com |
2120 |
</screen> |
2121 |
</para> |
2122 |
</refsect3> |
2123 |
|
2124 |
<refsect3> |
2125 |
<title>MIGRATE</title> |
2126 |
|
2127 |
<cmdsynopsis> |
2128 |
<command>migrate</command> |
2129 |
<arg>-f</arg> |
2130 |
<arg choice="req">--cleanup</arg> |
2131 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
2132 |
</cmdsynopsis> |
2133 |
|
2134 |
<cmdsynopsis> |
2135 |
<command>migrate</command> |
2136 |
<arg>-f</arg> |
2137 |
<arg>--non-live</arg> |
2138 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
2139 |
</cmdsynopsis> |
2140 |
|
2141 |
<para> |
2142 |
Migrate will move the instance to its secondary node without |
2143 |
shutdown. It only works for instances having the drbd8 disk |
2144 |
template type. |
2145 |
</para> |
2146 |
|
2147 |
<para> |
2148 |
The migration command needs a perfectly healthy instance, as |
2149 |
we rely on the dual-master capability of drbd8 and the disks |
2150 |
of the instance are not allowed to be degraded. |
2151 |
</para> |
2152 |
|
2153 |
<para> |
2154 |
The <option>--non-live</option> option will switch (for the |
2155 |
hypervisors that support it) between a "fully live" |
2156 |
(i.e. the interruption is as minimal as possible) migration |
2157 |
and one in which the instance is frozen, its state saved and |
2158 |
transported to the remote node, and then resumed there. This |
2159 |
all depends on the hypervisor support for two different |
2160 |
methods. In any case, it is not an error to pass this |
2161 |
parameter (it will just be ignored if the hypervisor doesn't |
2162 |
support it). |
2163 |
</para> |
2164 |
|
2165 |
<para> |
2166 |
If the <option>--cleanup</option> option is passed, the |
2167 |
operation changes from migration to attempting recovery from |
2168 |
a failed previous migration. In this mode, ganeti checks if |
2169 |
the instance runs on the correct node (and updates its |
2170 |
configuration if not) and ensures the instances's disks are |
2171 |
configured correctly. In this mode, the |
2172 |
<option>--non-live</option> option is ignored. |
2173 |
</para> |
2174 |
|
2175 |
<para> |
2176 |
The option <option>-f</option> will skip the prompting for |
2177 |
confirmation. |
2178 |
</para> |
2179 |
<para> |
2180 |
Example (and expected output): |
2181 |
<screen> |
2182 |
# gnt-instance migrate instance1 |
2183 |
Migrate will happen to the instance instance1. Note that migration is |
2184 |
**experimental** in this version. This might impact the instance if |
2185 |
anything goes wrong. Continue? |
2186 |
y/[n]/?: y |
2187 |
* checking disk consistency between source and target |
2188 |
* ensuring the target is in secondary mode |
2189 |
* changing disks into dual-master mode |
2190 |
- INFO: Waiting for instance instance1 to sync disks. |
2191 |
- INFO: Instance instance1's disks are in sync. |
2192 |
* migrating instance to node2.example.com |
2193 |
* changing the instance's disks on source node to secondary |
2194 |
- INFO: Waiting for instance instance1 to sync disks. |
2195 |
- INFO: Instance instance1's disks are in sync. |
2196 |
* changing the instance's disks to single-master |
2197 |
# |
2198 |
</screen> |
2199 |
</para> |
2200 |
</refsect3> |
2201 |
|
2202 |
<refsect3> |
2203 |
<title>MOVE</title> |
2204 |
|
2205 |
<cmdsynopsis> |
2206 |
<command>move</command> |
2207 |
<arg>-f</arg> |
2208 |
<arg>-n <replaceable>node</replaceable></arg> |
2209 |
<arg>--shutdown-timeout=<replaceable>N</replaceable></arg> |
2210 |
<arg>--submit</arg> |
2211 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
2212 |
</cmdsynopsis> |
2213 |
|
2214 |
<para> |
2215 |
Move will move the instance to an arbitrary node in the |
2216 |
cluster. This works only for instances having a plain or |
2217 |
file disk template. |
2218 |
</para> |
2219 |
|
2220 |
<para> |
2221 |
Note that since this operation is done via data copy, it |
2222 |
will take a long time for big disks (similar to |
2223 |
replace-disks for a drbd instance). |
2224 |
</para> |
2225 |
|
2226 |
<para> |
2227 |
The <option>--shutdown-timeout</option> is used to specify how |
2228 |
much time to wait before forcing the shutdown (xm destroy in xen, |
2229 |
killing the kvm process, for kvm). By default two minutes are |
2230 |
given to each instance to stop. |
2231 |
</para> |
2232 |
|
2233 |
<para> |
2234 |
The <option>--submit</option> option is used to send the job to |
2235 |
the master daemon but not wait for its completion. The job |
2236 |
ID will be shown so that it can be examined via |
2237 |
<command>gnt-job info</command>. |
2238 |
</para> |
2239 |
|
2240 |
<para> |
2241 |
Example: |
2242 |
<screen> |
2243 |
# gnt-instance move -n node3.example.com instance1.example.com |
2244 |
</screen> |
2245 |
</para> |
2246 |
</refsect3> |
2247 |
|
2248 |
</refsect2> |
2249 |
|
2250 |
<refsect2> |
2251 |
<title>TAGS</title> |
2252 |
|
2253 |
<refsect3> |
2254 |
<title>ADD-TAGS</title> |
2255 |
|
2256 |
<cmdsynopsis> |
2257 |
<command>add-tags</command> |
2258 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
2259 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
2260 |
<arg choice="req" |
2261 |
rep="repeat"><replaceable>tag</replaceable></arg> |
2262 |
</cmdsynopsis> |
2263 |
|
2264 |
<para> |
2265 |
Add tags to the given instance. If any of the tags contains |
2266 |
invalid characters, the entire operation will abort. |
2267 |
</para> |
2268 |
<para> |
2269 |
If the <option>--from</option> option is given, the list of |
2270 |
tags will be extended with the contents of that file (each |
2271 |
line becomes a tag). In this case, there is not need to pass |
2272 |
tags on the command line (if you do, both sources will be |
2273 |
used). A file name of - will be interpreted as stdin. |
2274 |
</para> |
2275 |
</refsect3> |
2276 |
|
2277 |
<refsect3> |
2278 |
<title>LIST-TAGS</title> |
2279 |
|
2280 |
<cmdsynopsis> |
2281 |
<command>list-tags</command> |
2282 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
2283 |
</cmdsynopsis> |
2284 |
|
2285 |
<para>List the tags of the given instance.</para> |
2286 |
</refsect3> |
2287 |
|
2288 |
<refsect3> |
2289 |
<title>REMOVE-TAGS</title> |
2290 |
<cmdsynopsis> |
2291 |
<command>remove-tags</command> |
2292 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
2293 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
2294 |
<arg choice="req" |
2295 |
rep="repeat"><replaceable>tag</replaceable></arg> |
2296 |
</cmdsynopsis> |
2297 |
|
2298 |
<para> |
2299 |
Remove tags from the given instance. If any of the tags are |
2300 |
not existing on the node, the entire operation will abort. |
2301 |
</para> |
2302 |
|
2303 |
<para> |
2304 |
If the <option>--from</option> option is given, the list of |
2305 |
tags will be extended with the contents of that file (each |
2306 |
line becomes a tag). In this case, there is not need to pass |
2307 |
tags on the command line (if you do, both sources will be |
2308 |
used). A file name of - will be interpreted as stdin. |
2309 |
</para> |
2310 |
</refsect3> |
2311 |
|
2312 |
</refsect2> |
2313 |
|
2314 |
</refsect1> |
2315 |
|
2316 |
&footer; |
2317 |
|
2318 |
</refentry> |
2319 |
|
2320 |
<!-- Keep this comment at the end of the file |
2321 |
Local variables: |
2322 |
mode: sgml |
2323 |
sgml-omittag:t |
2324 |
sgml-shorttag:t |
2325 |
sgml-minimize-attributes:nil |
2326 |
sgml-always-quote-attributes:t |
2327 |
sgml-indent-step:2 |
2328 |
sgml-indent-data:t |
2329 |
sgml-parent-document:nil |
2330 |
sgml-default-dtd-file:nil |
2331 |
sgml-exposed-tags:nil |
2332 |
sgml-local-catalogs:nil |
2333 |
sgml-local-ecat-files:nil |
2334 |
End: |
2335 |
--> |