Statistics
| Branch: | Tag: | Revision:

root / man / gnt-instance.sgml @ 80de0e3f

History | View | Annotate | Download (29.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>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
            </group>
78
          </arg>
79
          <sbr>
80
          <arg choice="req">-n <replaceable>node</replaceable></arg>
81
          <arg choice="req"><replaceable>instance</replaceable></arg>
82
        </cmdsynopsis>
83
        <para>
84
          Creates a new instance on the specified
85
          host. <replaceable>instance</replaceable> must be in DNS and
86
          resolve to a IP in the same network as the nodes in the
87
          cluster.
88
        </para>
89

    
90
        <para>
91
          The <option>-s</option> option specifies the disk size for
92
          the instance, in mebibytes (defaults to
93
          <constant>20480MiB</constant> =
94
          <constant>20GiB</constant>). You can also use one of the
95
          suffixes <literal>m</literal>, <literal>g</literal> or
96
          <literal>t</literal> to specificy the exact the units used;
97
          these suffixes map to mebibytes, gibibytes and tebibytes.
98
        </para>
99

    
100
        <para>
101
          The <option>--swap-size</option> option specifies the swap
102
          disk size (in mebibytes) for the instance (the one presented
103
          as <filename class="devicefile">/dev/sdb</filename>). The
104
          default is <constant>4096MiB</constant>. As for the disk
105
          size, you can specify other suffixes.
106
        </para>
107

    
108
        <para>
109
          The <option>-m</option> option specifies the memory size for
110
          the instance, in mebibytes (defaults to 128 MiB). Again, you
111
          can use other suffixes (e.g. <userinput>2g</userinput>).
112
        </para>
113

    
114
        <para>
115
          The <option>-o</option> options specifies the operating
116
          system to be installed. The available operating systems can
117
          be listed with <command>gnt-os list</command>.
118
        </para>
119

    
120
        <para>
121
          The <option>-b</option> option specifies the bridge to which the
122
          instance will be connected. (defaults to the cluster-wide default
123
          bridge specified at cluster initialization time).
124
        </para>
125

    
126
        <para>
127
          The <option>-t</option> options specifies the disk layout type for
128
          the instance. The available choices are:
129
          <variablelist>
130
            <varlistentry>
131
              <term>diskless</term>
132
              <listitem>
133
                <para>
134
                  This creates an instance with no disks. Its useful for
135
                  testing only (or other special cases).
136
                </para>
137
              </listitem>
138
            </varlistentry>
139
            <varlistentry>
140
              <term>plain</term>
141
              <listitem>
142
                <para>Disk devices will be logical volumes.</para>
143
              </listitem>
144
            </varlistentry>
145
            <varlistentry>
146
              <term>local_raid1</term>
147
              <listitem>
148
                <para>
149
                  Disk devices will be md raid1 arrays over two local
150
                  logical volumes.
151
                </para>
152
              </listitem>
153
            </varlistentry>
154
            <varlistentry>
155
              <term>remote_raid1</term>
156
              <listitem>
157
                <para>
158
                  Disk devices will be md raid1 arrays with one
159
                  component (so it's not actually raid1): a drbd device
160
                  between the instance's primary node and the node given
161
                  by the option <option>--secondary-node</option>.
162
                </para>
163
              </listitem>
164
            </varlistentry>
165
          </variablelist>
166
        </para>
167

    
168
        <para>
169
          The <option>--secondary-node</option> option is used with
170
          the remote raid disk template type and specifies the remote
171
          node.
172
        </para>
173

    
174
        <para>
175
          If you do not want gnt-instance to wait for the disk mirror
176
          to be synced, use the <option>--no-wait-for-sync</option>
177
          option.
178
        </para>
179

    
180

    
181
        <para>
182
          Example:
183
          <screen>
184
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
185
  -n node1.example.com instance1.example.com
186
# gnt-instance add -t remote_raid1 --secondary-node node3.example.com \
187
  -s 30g -m 512 -o debian-etch \
188
  -n node1.example.com instance2.example.com
189
          </screen>
190
        </para>
191

    
192
      </refsect3>
193

    
194
      <refsect3>
195
        <title>REMOVE</title>
196

    
197
        <cmdsynopsis>
198
          <command>remove</command>
199
          <arg>--ignore-failures</arg>
200
          <arg choice="req"><replaceable>instance</replaceable></arg>
201
        </cmdsynopsis>
202

    
203
        <para>
204
          Remove an instance. This will remove all data from the
205
          instance and there is <emphasis>no way back</emphasis>. If
206
          you are not sure if you use an instance again, use
207
          <command>shutdown</command> first and leave it in the
208
          shutdown state for a while.
209

    
210
        </para>
211

    
212
        <para>
213
          The <option>--ignore-failures</option> option will cause the
214
          removal to proceed even in the presence of errors during the
215
          removal of the instance (e.g. during the shutdown or the
216
          disk removal). If this option is not given, the command will
217
          stop at the first error.
218
        </para>
219

    
220
        <para>
221
          Example:
222
          <screen>
223
# gnt-instance remove instance1.example.com
224
          </screen>
225
        </para>
226
      </refsect3>
227

    
228
      <refsect3>
229
        <title>LIST</title>
230

    
231
        <cmdsynopsis>
232
          <command>list</command>
233
          <arg>--no-headers</arg>
234
          <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
235
          <arg>-o <replaceable>FIELD,...</replaceable></arg>
236
        </cmdsynopsis>
237

    
238
        <para>
239
          Shows the currently configured instances with memory usage,
240
          disk usage, the node they are running on, and the CPU time,
241
          counted in seconds, used by each instance since its latest
242
          restart.
243
        </para>
244

    
245
        <para>
246
          The <option>--no-headers</option> option will skip the
247
          initial header line. The <option>--separator</option> option
248
          takes an argument which denotes what will be used between
249
          the output fields. Both these options are to help scripting.
250
        </para>
251

    
252
        <para>
253
          The <option>-o</option> option takes a comma-separated list
254
          of output fields. The available fields and their meaning
255
          are:
256
          <variablelist>
257
            <varlistentry>
258
              <term>name</term>
259
              <listitem>
260
                <simpara>the instance name</simpara>
261
              </listitem>
262
            </varlistentry>
263
            <varlistentry>
264
              <term>os</term>
265
              <listitem>
266
                <simpara>the OS of the instance</simpara>
267
              </listitem>
268
            </varlistentry>
269
            <varlistentry>
270
              <term>pnode</term>
271
              <listitem>
272
                <simpara>the primary node of the instance</simpara>
273
              </listitem>
274
            </varlistentry>
275
            <varlistentry>
276
              <term>snodes</term>
277
              <listitem>
278
                <simpara>comma-separated list of secondary-nodes for the
279
                  instance; usually this will be just one node</simpara>
280
              </listitem>
281
            </varlistentry>
282
            <varlistentry>
283
              <term>admin_state</term>
284
              <listitem>
285
                <simpara>the desired state of the instance (either "yes"
286
                  or "no" denoting the instance should run or
287
                  not)</simpara>
288
              </listitem>
289
            </varlistentry>
290
            <varlistentry>
291
              <term>admin_ram</term>
292
              <listitem>
293
                <simpara>the desired memory for the instance</simpara>
294
              </listitem>
295
            </varlistentry>
296
            <varlistentry>
297
              <term>disk_template</term>
298
              <listitem>
299
                <simpara>the disk template of the instance</simpara>
300
              </listitem>
301
            </varlistentry>
302
            <varlistentry>
303
              <term>oper_state</term>
304
              <listitem>
305
                <simpara>the actual state of the instance; can take of
306
                  the values "running", "stopped", "(node down)"</simpara>
307
              </listitem>
308
            </varlistentry>
309
            <varlistentry>
310
              <term>oper_ram</term>
311
              <listitem>
312
                <simpara>the actual memory usage of the instance as seen
313
                  by the hypervisor</simpara>
314
              </listitem>
315
            </varlistentry>
316
            <varlistentry>
317
              <term>ip</term>
318
              <listitem>
319
                <simpara>the ip address ganeti recognizes as associated with
320
                the instance interface</simpara>
321
              </listitem>
322
            </varlistentry>
323
            <varlistentry>
324
              <term>mac</term>
325
              <listitem>
326
                <simpara>the instance interface MAC address</simpara>
327
              </listitem>
328
            </varlistentry>
329
            <varlistentry>
330
              <term>bridge</term>
331
              <listitem>
332
                <simpara>bridge the instance is connected to
333
                </simpara>
334
              </listitem>
335
            </varlistentry>
336
          </variablelist>
337
        </para>
338

    
339
        <para>
340
          There is a subtle grouping about the available output
341
          fields: all fields except for <option>oper_state</option>
342
          and <option>oper_ram</option> are configuration value and
343
          not run-time values. So if you don't select any of the
344
          <option>oper_*</option> fields, the query will be satisfied
345
          instantly from the cluster configuration, without having to
346
          ask the remote nodes for the data. This can be helpful for
347
          big clusters when you only want some data and it makes sense
348
          to specify a reduced set of output fields.
349
        </para>
350

    
351
        <para>The default output field list is:
352
          <simplelist type="inline">
353
            <member>name</member>
354
            <member>os</member>
355
            <member>pnode</member>
356
            <member>admin_state</member>
357
            <member>oper_state</member>
358
            <member>oper_ram</member>
359
          </simplelist>.
360
        </para>
361
      </refsect3>
362

    
363
      <refsect3>
364
        <title>INFO</title>
365

    
366
        <cmdsynopsis>
367
          <command>info</command>
368
          <arg rep="repeat"><replaceable>instance</replaceable></arg>
369
        </cmdsynopsis>
370

    
371
        <para>
372
          Show detailed information about the (given) instances. This
373
          is different from <command>list</command> as it shows
374
          detailed data about the instance's disks (especially useful
375
          for remote raid templates).
376
        </para>
377
      </refsect3>
378

    
379
      <refsect3>
380
        <title>MODIFY</title>
381

    
382
        <cmdsynopsis>
383
          <command>modify</command>
384
          <arg choice="opt">-m <replaceable>memsize</replaceable></arg>
385
          <arg choice="opt">-p <replaceable>vcpus</replaceable></arg>
386
          <arg choice="opt">-i <replaceable>ip</replaceable></arg>
387
          <arg choice="opt">-b <replaceable>bridge</replaceable></arg>
388
          <arg choice="req"><replaceable>instance</replaceable></arg>
389
        </cmdsynopsis>
390

    
391
        <para>
392
          Modify the memory size, number of vcpus, ip address and/or bridge
393
          for an instance.
394
        </para>
395

    
396
        <para>
397
          The memory size is given in MiB. Note that you need to give
398
          at least one of the arguments, otherwise the command
399
          complains.
400
        </para>
401

    
402
        <para>
403
          All the changes take effect at the next restart. If the
404
          instance is running, there is no effect on the instance.
405
        </para>
406
      </refsect3>
407

    
408
      <refsect3>
409
        <title>REINSTALL</title>
410

    
411
        <cmdsynopsis>
412
          <command>reinstall</command>
413
          <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
414
          <arg choice="opt">-f <replaceable>force</replaceable></arg>
415
          <arg choice="req"><replaceable>instance</replaceable></arg>
416
        </cmdsynopsis>
417

    
418
        <para>
419
          Reinstalls the operating system on the given instance. The instance
420
          must be stopped when running this command. If the
421
          <option>--os-type</option> is specified, the operating system is
422
          changed.
423
        </para>
424
      </refsect3>
425

    
426
      <refsect3>
427
        <title>RENAME</title>
428

    
429
        <cmdsynopsis>
430
          <command>rename</command>
431
          <arg>--no-ip-check</arg>
432
          <arg choice="req"><replaceable>instance</replaceable></arg>
433
          <arg choice="req"><replaceable>new_name</replaceable></arg>
434
        </cmdsynopsis>
435

    
436
        <para>
437
          Renames the given instance. The instance must be stopped
438
          when running this command. The requirements for the new name
439
          are the same as for adding an instance: the new name must be
440
          resolvable and the IP it resolves to must not be reachable
441
          (in order to prevent duplicate IPs the next time the
442
          instance is started). The IP test can be skipped if the
443
          <option>--no-ip-check</option> option is passed.
444
        </para>
445
      </refsect3>
446

    
447
    </refsect2>
448

    
449
    <refsect2>
450
      <title>Starting/stopping/connecting to console</title>
451

    
452
      <refsect3>
453
        <title>STARTUP</title>
454

    
455
        <cmdsynopsis>
456
          <command>startup</command>
457
          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
458
          <sbr>
459
          <group choice="opt">
460
            <arg>--instance</arg>
461
            <arg>--node</arg>
462
            <arg>--primary</arg>
463
            <arg>--secondary</arg>
464
            <arg>--all</arg>
465
          </group>
466
          <sbr>
467
          <arg choice="opt"
468
          rep="repeat"><replaceable>name</replaceable></arg>
469
        </cmdsynopsis>
470

    
471
        <para>
472
          Starts one or more instances, depending on the following
473
          options. The four available modes are:
474
          <variablelist>
475
            <varlistentry>
476
              <term><option>--instance</option></term>
477
              <listitem>
478
                <simpara>will start the instances given as arguments
479
                (at least one argument required); this is the default
480
                selection</simpara>
481
              </listitem>
482
            </varlistentry>
483
            <varlistentry>
484
              <term>--node</term>
485
              <listitem>
486
                <simpara>will start the instances who have the given
487
                node as either primary or secondary</simpara>
488
              </listitem>
489
            </varlistentry>
490
            <varlistentry>
491
              <term><option>--primary</option></term>
492
              <listitem>
493
                <simpara>will start all instances whose primary node
494
                is in the list of nodes passed as arguments (at least
495
                one node required)</simpara>
496
              </listitem>
497
            </varlistentry>
498
            <varlistentry>
499
              <term><option>--secondary</option></term>
500
              <listitem>
501
                <simpara>will start all instances whose secondary node
502
                is in the list of nodes passed as arguments (at least
503
                one node required)</simpara>
504
              </listitem>
505
            </varlistentry>
506
            <varlistentry>
507
              <term>--all</term>
508
              <listitem>
509
                <simpara>will start all instances in the cluster (no
510
                arguments accepted)</simpara>
511
              </listitem>
512
            </varlistentry>
513
          </variablelist>
514
        </para>
515

    
516
        <para>
517
          Note that although you can pass more than one selection
518
          option, the last one wins, so in order to guarantee the
519
          desired result, don't pass more than one such option.
520
        </para>
521

    
522
        <para>
523
          The <option>--extra</option> option is used to pass
524
          additional argument to the instance's kernel for this start
525
          only. Currently there is no way to specify a persistent set
526
          of arguments (beside the one hardcoded). Note that this may
527
          not apply to all virtualization types.
528
        </para>
529

    
530

    
531
        <para>
532
          Example:
533
          <screen>
534
# gnt-instance start instance1.example.com
535
# gnt-instance start --extra single test1.example.com
536
# gnt-instance start --node node1.example.com node2.example.com
537
# gnt-instance start --all
538
          </screen>
539
        </para>
540
      </refsect3>
541

    
542
      <refsect3>
543
        <title>SHUTDOWN</title>
544

    
545
        <cmdsynopsis>
546
          <command>shutdown</command>
547
          <sbr>
548
          <group choice="opt">
549
            <arg>--instance</arg>
550
            <arg>--node</arg>
551
            <arg>--primary</arg>
552
            <arg>--secondary</arg>
553
            <arg>--all</arg>
554
          </group>
555
          <sbr>
556

    
557
          <arg choice="opt"
558
          rep="repeat"><replaceable>name</replaceable></arg>
559
        </cmdsynopsis>
560

    
561
        <para>
562
          Stops one or more instances. If the instance cannot be
563
          cleanly stopped during a hardcoded interval (currently 2
564
          minutes), it will forcibly stop the instance (equivalent to
565
          switching off the power on a physical machine).
566
        </para>
567

    
568
        <para>
569
          The <option>--instance</option>, <option>--node</option>,
570
          <option>--primary</option>, <option>--secondary</option> and
571
          <option>--all</option> options are similar as for the
572
          <command>startup</command> command and they influence the
573
          actual instances being shutdown.
574
        </para>
575

    
576
        <para>
577
          Example:
578
          <screen>
579
# gnt-instance shutdown instance1.example.com
580
# gnt-instance shutdown --all
581
          </screen>
582
        </para>
583
      </refsect3>
584

    
585
      <refsect3>
586
        <title>REBOOT</title>
587

    
588
        <cmdsynopsis>
589
          <command>reboot</command>
590
          <sbr>
591
          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
592
          <sbr>
593
          <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
594
          <sbr>
595
          <arg>--ignore-secondaries</arg>
596
          <sbr>
597
          <arg>--force-multiple</arg>
598
          <sbr>
599
          <group choice="opt">
600
            <arg>--instance</arg>
601
            <arg>--node</arg>
602
            <arg>--primary</arg>
603
            <arg>--secondary</arg>
604
            <arg>--all</arg>
605
          </group>
606
          <sbr>
607

    
608
          <arg choice="opt"
609
          rep="repeat"><replaceable>name</replaceable></arg>
610
        </cmdsynopsis>
611

    
612
        <para>
613
          Reboots one or more instances. The type of reboot depends on
614
          the value of <option>--type</option>. A soft reboot does a
615
          hypervisor reboot, a hard reboot does a instance stop,
616
          recreates the hypervisor config for the instance and
617
          starts the instance. A full reboot does the equivalent
618
          of <command>gnt-instance shutdown &amp;&amp; gnt-instance
619
          startup</command>. The default is soft reboot.
620
        </para>
621

    
622
        <para>
623
          For the hard reboot the option
624
          <option>--ignore-secondaries</option> ignores errors for the
625
          secondary node while re-assembling the instance disks.
626
        </para>
627

    
628
        <para>
629
          The <option>--instance</option>, <option>--node</option>,
630
          <option>--primary</option>, <option>--secondary</option> and
631
          <option>--all</option> options are similar as for the
632
          <command>startup</command> command and they influence the
633
          actual instances being rebooted.
634
        </para>
635

    
636
        <para>
637
          Use the <option>--force-multiple</option> to keep
638
          gnt-instance from asking for confirmation when more than one
639
          instance is affected.
640
        </para>
641

    
642
        <para>
643
          Example:
644
          <screen>
645
# gnt-instance reboot instance1.example.com
646
# gnt-instance reboot --type=full instance1.example.com
647
          </screen>
648
        </para>
649
      </refsect3>
650

    
651
      <refsect3>
652
        <title>CONSOLE</title>
653
        <cmdsynopsis>
654
          <command>console</command>
655
          <arg choice="req"><replaceable>instance</replaceable></arg>
656
        </cmdsynopsis>
657

    
658
        <para>
659
          Connects to the console of the given instance. If the instance
660
          is not up, an error is returned.
661
        </para>
662

    
663
        <para>
664
          Example:
665
          <screen>
666
# gnt-instance console instance1.example.com
667
          </screen>
668
        </para>
669
      </refsect3>
670

    
671
    </refsect2>
672

    
673
    <refsect2>
674
      <title>Disk management</title>
675

    
676
      <refsect3>
677
        <title>REPLACE-DISKS</title>
678

    
679
        <cmdsynopsis>
680
          <command>replace-disks</command>
681
          <arg choice="req">--new-secondary <replaceable>NODE</replaceable></arg>
682
          <arg choice="req"><replaceable>instance</replaceable></arg>
683
        </cmdsynopsis>
684

    
685
        <para>
686
          This command does a full add and replace for both disks of
687
          an instance.  It basically does an
688
          <command>addmirror</command> and
689
          <command>removemirror</command> for both disks of the
690
          instance.
691
        </para>
692

    
693
        <para>
694
          If you also want to replace the secondary node during this
695
          process (for example to fix a broken secondary node), you
696
          can do so using the <option>--new-secondary</option> option.
697
        </para>
698
      </refsect3>
699

    
700
      <refsect3>
701
        <title>ADD-MIRROR</title>
702
        <cmdsynopsis>
703
          <command>add-mirror</command>
704
          <arg choice="req">-b <replaceable>sdX</replaceable></arg>
705
          <arg choice="req">-n <replaceable>node</replaceable></arg>
706
          <arg choice="req"><replaceable>instance</replaceable></arg>
707
        </cmdsynopsis>
708
        <para>
709
          Adds a new mirror to the disk layout of the instance, if the
710
          instance has a remote raid disk layout.
711

    
712
          The new mirror member will be between the instance's primary
713
          node and the node given with the <option>-n</option> option.
714
        </para>
715
      </refsect3>
716

    
717
      <refsect3>
718
        <title>REMOVE-MIRROR</title>
719

    
720
        <cmdsynopsis>
721
          <command>removemirror</command>
722
          <arg choice="req">-b <replaceable>sdX</replaceable></arg>
723
          <arg choice="req">-p <replaceable>id</replaceable></arg>
724
          <arg choice="req"><replaceable>instance</replaceable></arg>
725
        </cmdsynopsis>
726
        <para>
727
          Removes a mirror componenent from the disk layout of the
728
          instance, if the instance has a remote raid disk layout.
729
        </para>
730

    
731
        <para>
732
          You need to specifiy on which disk to act on using the
733
          <option>-b</option> option (either <filename>sda</filename>
734
          or <filename>sdb</filename>) and the mirror component, which
735
          is identified by the <option>-p</option> option. You can
736
          find the list of valid identifiers with the
737
          <command>info</command> command.
738
        </para>
739

    
740
      <refsect3>
741
        <title>ACTIVATE-DISKS</title>
742

    
743
        <cmdsynopsis>
744
          <command>activate-disks</command>
745
          <arg choice="req"><replaceable>instance</replaceable></arg>
746
        </cmdsynopsis>
747
        <para>
748
          Activates the block devices of the given instance. If
749
          successful, the command will show the location and name of
750
          the block devices:
751
          <screen>
752
node1.example.com:sda:/dev/md0
753
node1.example.com:sdb:/dev/md1
754
          </screen>
755

    
756
          In this example, <emphasis>node1.example.com</emphasis> is
757
          the name of the node on which the devices have been
758
          activated. The <emphasis>sda</emphasis> and
759
          <emphasis>sdb</emphasis> are the names of the block devices
760
          inside the instance. <emphasis>/dev/md0</emphasis> and
761
          <emphasis>/dev/md1</emphasis> are the names of the block
762
          devices as visible on the node.
763
        </para>
764

    
765
        <para>
766
          Note that it is safe to run this command while the instance
767
          is already running.
768
        </para>
769
      </refsect3>
770

    
771
      <refsect3>
772
        <title>DEACTIVATE-DISKS</title>
773

    
774
        <cmdsynopsis>
775
          <command>deactivate-disks</command>
776
          <arg choice="req"><replaceable>instance</replaceable></arg>
777
        </cmdsynopsis>
778
        <para>
779
          De-activates the block devices of the given instance. Note
780
          that if you run this command for a remote raid instance
781
          type, while it is running, it will not be able to shutdown
782
          the block devices on the primary node, but it will shutdown
783
          the block devices on the secondary nodes, thus breaking the
784
          replication.
785
        </para>
786

    
787
      </refsect3>
788

    
789
    </refsect2>
790

    
791
    <refsect2>
792
      <title>Recovery</title>
793

    
794
      <refsect3>
795
        <title>FAILOVER</title>
796

    
797
        <cmdsynopsis>
798
          <command>failover</command>
799
          <arg>-f</arg>
800
          <arg>--ignore-consistency</arg>
801
          <arg choice="req"><replaceable>instance</replaceable></arg>
802
        </cmdsynopsis>
803

    
804
        <para>
805
          Failover will fail the instance over its secondary
806
          node. This works only for instances having a remote raid
807
          disk layout.
808
        </para>
809

    
810
        <para>
811
          Normally the failover will check the consistency of the
812
          disks before failing over the instance. If you are trying to
813
          migrate instances off a dead node, this will fail. Use the
814
          <option>--ignore-consistency</option> option for this
815
          purpose. Note that this option can be dangerous as errors in
816
          shutting down the instance will be ignored, resulting in
817
          possibly having the instance running on two machines in
818
          parallel (on disconnected DRBD drives).
819
        </para>
820

    
821
        <para>
822
          Example:
823
          <screen>
824
# gnt-instance failover instance1.example.com
825
          </screen>
826
        </para>
827
      </refsect3>
828

    
829
    </refsect2>
830

    
831
    <refsect2>
832
      <title>TAGS</title>
833

    
834
    <refsect3>
835
        <title>ADD-TAGS</title>
836

    
837
        <cmdsynopsis>
838
          <command>add-tags</command>
839
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
840
          <arg choice="req"><replaceable>instancename</replaceable></arg>
841
          <arg choice="req"
842
            rep="repeat"><replaceable>tag</replaceable></arg>
843
        </cmdsynopsis>
844

    
845
        <para>
846
          Add tags to the given instance. If any of the tags contains
847
          invalid characters, the entire operation will abort.
848
        </para>
849
        <para>
850
          If the <option>--from</option> option is given, the list of
851
          tags will be extended with the contents of that file (each
852
          line becomes a tag). In this case, there is not need to pass
853
          tags on the command line (if you do, both sources will be
854
          used). A file name of - will be interpreted as stdin.
855
        </para>
856
      </refsect3>
857

    
858
      <refsect3>
859
        <title>LIST-TAGS</title>
860

    
861
        <cmdsynopsis>
862
          <command>list-tags</command>
863
          <arg choice="req"><replaceable>instancename</replaceable></arg>
864
        </cmdsynopsis>
865

    
866
        <para>List the tags of the given instance.</para>
867
      </refsect3>
868

    
869
      <refsect3>
870
        <title>REMOVE-TAGS</title>
871
        <cmdsynopsis>
872
          <command>remove-tags</command>
873
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
874
          <arg choice="req"><replaceable>instancename</replaceable></arg>
875
          <arg choice="req"
876
            rep="repeat"><replaceable>tag</replaceable></arg>
877
        </cmdsynopsis>
878

    
879
        <para>
880
          Remove tags from the given instance. If any of the tags are
881
          not existing on the node, the entire operation will abort.
882
        </para>
883

    
884
        <para>
885
          If the <option>--from</option> option is given, the list of
886
          tags will be extended with the contents of that file (each
887
          line becomes a tag). In this case, there is not need to pass
888
          tags on the command line (if you do, both sources will be
889
          used). A file name of - will be interpreted as stdin.
890
        </para>
891
      </refsect3>
892

    
893
    </refsect2>
894

    
895
  </refsect1>
896

    
897
  &footer;
898

    
899
</refentry>
900

    
901
<!-- Keep this comment at the end of the file
902
Local variables:
903
mode: sgml
904
sgml-omittag:t
905
sgml-shorttag:t
906
sgml-minimize-attributes:nil
907
sgml-always-quote-attributes:t
908
sgml-indent-step:2
909
sgml-indent-data:t
910
sgml-parent-document:nil
911
sgml-default-dtd-file:nil
912
sgml-exposed-tags:nil
913
sgml-local-catalogs:nil
914
sgml-local-ecat-files:nil
915
End:
916
-->