Statistics
| Branch: | Tag: | Revision:

root / man / gnt-instance.sgml @ 667479d5

History | View | Annotate | Download (31.5 kB)

1
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2

    
3
  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4
  <!-- Please adjust the date whenever revising the manpage. -->
5
  <!ENTITY dhdate      "<date>May 16, 2007</date>">
6
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7
       allowed: see man(7), man(1). -->
8
  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
9
  <!ENTITY dhucpackage "<refentrytitle>gnt-instance</refentrytitle>">
10
  <!ENTITY dhpackage   "gnt-instance">
11

    
12
  <!ENTITY debian      "<productname>Debian</productname>">
13
  <!ENTITY gnu         "<acronym>GNU</acronym>">
14
  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
15
  <!ENTITY footer SYSTEM "footer.sgml">
16
]>
17

    
18
<refentry>
19
  <refentryinfo>
20
    <copyright>
21
      <year>2006</year>
22
      <year>2007</year>
23
      <holder>Google Inc.</holder>
24
    </copyright>
25
    &dhdate;
26
  </refentryinfo>
27
  <refmeta>
28
    &dhucpackage;
29

    
30
    &dhsection;
31
    <refmiscinfo>ganeti 1.2</refmiscinfo>
32
  </refmeta>
33
  <refnamediv>
34
    <refname>&dhpackage;</refname>
35

    
36
    <refpurpose>ganeti instance administration</refpurpose>
37
  </refnamediv>
38
  <refsynopsisdiv>
39
    <cmdsynopsis>
40
      <command>&dhpackage; </command>
41

    
42
      <arg choice="req">command</arg>
43
      <arg>arguments...</arg>
44
    </cmdsynopsis>
45
  </refsynopsisdiv>
46
  <refsect1>
47
    <title>DESCRIPTION</title>
48

    
49
    <para>
50
      The <command>&dhpackage;</command> is used for instance
51
      administration in the ganeti system.
52
    </para>
53

    
54
  </refsect1>
55
  <refsect1>
56
    <title>COMMANDS</title>
57

    
58
    <refsect2>
59
      <title>Creation/removal/querying</title>
60

    
61
      <refsect3>
62
        <title>ADD</title>
63
        <cmdsynopsis>
64
          <command>add</command>
65
          <arg>-s <replaceable>disksize</replaceable></arg>
66
          <arg>--swap-size <replaceable>disksize</replaceable></arg>
67
          <arg>-m <replaceable>memsize</replaceable></arg>
68
          <sbr>
69
          <arg>-o <replaceable>os-type</replaceable></arg>
70
          <arg>-b <replaceable>bridge</replaceable></arg>
71
          <sbr>
72
          <arg choice="req">-t<group>
73
              <arg>diskless</arg>
74
              <arg>plain</arg>
75
              <arg>local_raid1</arg>
76
              <arg>remote_raid1</arg>
77
              <arg>drbd</arg>
78
            </group>
79
          </arg>
80
          <sbr>
81
          <arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
82
          <arg choice="req"><replaceable>instance</replaceable></arg>
83
        </cmdsynopsis>
84
        <para>
85
          Creates a new instance on the specified
86
          host. <replaceable>instance</replaceable> must be in DNS and
87
          resolve to a IP in the same network as the nodes in the
88
          cluster.
89
        </para>
90

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

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

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

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

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

    
127
        <para>
128
          The <option>-t</option> options specifies the disk layout type for
129
          the instance. The available choices are:
130
          <variablelist>
131
            <varlistentry>
132
              <term>diskless</term>
133
              <listitem>
134
                <para>
135
                  This creates an instance with no disks. Its useful for
136
                  testing only (or other special cases).
137
                </para>
138
              </listitem>
139
            </varlistentry>
140
            <varlistentry>
141
              <term>plain</term>
142
              <listitem>
143
                <para>Disk devices will be logical volumes.</para>
144
              </listitem>
145
            </varlistentry>
146
            <varlistentry>
147
              <term>local_raid1</term>
148
              <listitem>
149
                <para>
150
                  Disk devices will be md raid1 arrays over two local
151
                  logical volumes.
152
                </para>
153
              </listitem>
154
            </varlistentry>
155
            <varlistentry>
156
              <term>remote_raid1</term>
157
              <listitem>
158
                <para>
159
                  Disk devices will be md raid1 arrays with one
160
                  component (so it's not actually raid1): a drbd
161
                  (0.7.x) device between the instance's primary node
162
                  and the node given by the second value of the
163
                  <option>--node</option> option.
164
                </para>
165
              </listitem>
166
            </varlistentry>
167
            <varlistentry>
168
              <term>drbd</term>
169
              <listitem>
170
                <para>
171
                  Disk devices will be drbd (version 8.x) on top of
172
                  lvm volumes. They are equivalent in functionality to
173
                  <replaceable>remote_raid1</replaceable>, but are
174
                  recommended for new instances (if you have drbd 8.x
175
                  installed).
176
                </para>
177
              </listitem>
178
            </varlistentry>
179
          </variablelist>
180
        </para>
181

    
182
        <para>
183
          The optional second value of the <option>--node</option> is used for
184
          the remote raid template type and specifies the remote node.
185
        </para>
186

    
187
        <para>
188
          If you do not want gnt-instance to wait for the disk mirror
189
          to be synced, use the <option>--no-wait-for-sync</option>
190
          option.
191
        </para>
192

    
193
        <para>
194
          Example:
195
          <screen>
196
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
197
  -n node1.example.com instance1.example.com
198
# gnt-instance add -t remote_raid1 -s 30g -m 512 -o debian-etch \
199
  -n node1.example.com:node2.example.com instance2.example.com
200
          </screen>
201
        </para>
202
      </refsect3>
203

    
204
      <refsect3>
205
        <title>REMOVE</title>
206

    
207
        <cmdsynopsis>
208
          <command>remove</command>
209
          <arg>--ignore-failures</arg>
210
          <arg choice="req"><replaceable>instance</replaceable></arg>
211
        </cmdsynopsis>
212

    
213
        <para>
214
          Remove an instance. This will remove all data from the
215
          instance and there is <emphasis>no way back</emphasis>. If
216
          you are not sure if you use an instance again, use
217
          <command>shutdown</command> first and leave it in the
218
          shutdown state for a while.
219

    
220
        </para>
221

    
222
        <para>
223
          The <option>--ignore-failures</option> option will cause the
224
          removal to proceed even in the presence of errors during the
225
          removal of the instance (e.g. during the shutdown or the
226
          disk removal). If this option is not given, the command will
227
          stop at the first error.
228
        </para>
229

    
230
        <para>
231
          Example:
232
          <screen>
233
# gnt-instance remove instance1.example.com
234
          </screen>
235
        </para>
236
      </refsect3>
237

    
238
      <refsect3>
239
        <title>LIST</title>
240

    
241
        <cmdsynopsis>
242
          <command>list</command>
243
          <arg>--no-headers</arg>
244
          <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
245
          <arg>-o <replaceable>FIELD,...</replaceable></arg>
246
        </cmdsynopsis>
247

    
248
        <para>
249
          Shows the currently configured instances with memory usage,
250
          disk usage, the node they are running on, and the CPU time,
251
          counted in seconds, used by each instance since its latest
252
          restart.
253
        </para>
254

    
255
        <para>
256
          The <option>--no-headers</option> option will skip the
257
          initial header line. The <option>--separator</option> option
258
          takes an argument which denotes what will be used between
259
          the output fields. Both these options are to help scripting.
260
        </para>
261

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

    
349
        <para>
350
          There is a subtle grouping about the available output
351
          fields: all fields except for <option>oper_state</option>
352
          and <option>oper_ram</option> are configuration value and
353
          not run-time values. So if you don't select any of the
354
          <option>oper_*</option> fields, the query will be satisfied
355
          instantly from the cluster configuration, without having to
356
          ask the remote nodes for the data. This can be helpful for
357
          big clusters when you only want some data and it makes sense
358
          to specify a reduced set of output fields.
359
        </para>
360

    
361
        <para>The default output field list is:
362
          <simplelist type="inline">
363
            <member>name</member>
364
            <member>os</member>
365
            <member>pnode</member>
366
            <member>admin_state</member>
367
            <member>oper_state</member>
368
            <member>oper_ram</member>
369
          </simplelist>.
370
        </para>
371
      </refsect3>
372

    
373
      <refsect3>
374
        <title>INFO</title>
375

    
376
        <cmdsynopsis>
377
          <command>info</command>
378
          <arg rep="repeat"><replaceable>instance</replaceable></arg>
379
        </cmdsynopsis>
380

    
381
        <para>
382
          Show detailed information about the (given) instances. This
383
          is different from <command>list</command> as it shows
384
          detailed data about the instance's disks (especially useful
385
          for remote raid templates).
386
        </para>
387
      </refsect3>
388

    
389
      <refsect3>
390
        <title>MODIFY</title>
391

    
392
        <cmdsynopsis>
393
          <command>modify</command>
394
          <arg choice="opt">-m <replaceable>memsize</replaceable></arg>
395
          <arg choice="opt">-p <replaceable>vcpus</replaceable></arg>
396
          <arg choice="opt">-i <replaceable>ip</replaceable></arg>
397
          <arg choice="opt">-b <replaceable>bridge</replaceable></arg>
398
          <arg choice="req"><replaceable>instance</replaceable></arg>
399
        </cmdsynopsis>
400

    
401
        <para>
402
          Modify the memory size, number of vcpus, ip address and/or bridge
403
          for an instance.
404
        </para>
405

    
406
        <para>
407
          The memory size is given in MiB. Note that you need to give
408
          at least one of the arguments, otherwise the command
409
          complains.
410
        </para>
411

    
412
        <para>
413
          All the changes take effect at the next restart. If the
414
          instance is running, there is no effect on the instance.
415
        </para>
416
      </refsect3>
417

    
418
      <refsect3>
419
        <title>REINSTALL</title>
420

    
421
        <cmdsynopsis>
422
          <command>reinstall</command>
423
          <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
424
          <arg choice="opt">-f <replaceable>force</replaceable></arg>
425
          <arg choice="req"><replaceable>instance</replaceable></arg>
426
        </cmdsynopsis>
427

    
428
        <para>
429
          Reinstalls the operating system on the given instance. The instance
430
          must be stopped when running this command. If the
431
          <option>--os-type</option> is specified, the operating system is
432
          changed.
433
        </para>
434
      </refsect3>
435

    
436
      <refsect3>
437
        <title>RENAME</title>
438

    
439
        <cmdsynopsis>
440
          <command>rename</command>
441
          <arg>--no-ip-check</arg>
442
          <arg choice="req"><replaceable>instance</replaceable></arg>
443
          <arg choice="req"><replaceable>new_name</replaceable></arg>
444
        </cmdsynopsis>
445

    
446
        <para>
447
          Renames the given instance. The instance must be stopped
448
          when running this command. The requirements for the new name
449
          are the same as for adding an instance: the new name must be
450
          resolvable and the IP it resolves to must not be reachable
451
          (in order to prevent duplicate IPs the next time the
452
          instance is started). The IP test can be skipped if the
453
          <option>--no-ip-check</option> option is passed.
454
        </para>
455
      </refsect3>
456

    
457
    </refsect2>
458

    
459
    <refsect2>
460
      <title>Starting/stopping/connecting to console</title>
461

    
462
      <refsect3>
463
        <title>STARTUP</title>
464

    
465
        <cmdsynopsis>
466
          <command>startup</command>
467
          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
468
          <sbr>
469
          <group choice="opt">
470
            <arg>--instance</arg>
471
            <arg>--node</arg>
472
            <arg>--primary</arg>
473
            <arg>--secondary</arg>
474
            <arg>--all</arg>
475
          </group>
476
          <sbr>
477
          <arg choice="opt"
478
          rep="repeat"><replaceable>name</replaceable></arg>
479
        </cmdsynopsis>
480

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

    
526
        <para>
527
          Note that although you can pass more than one selection
528
          option, the last one wins, so in order to guarantee the
529
          desired result, don't pass more than one such option.
530
        </para>
531

    
532
        <para>
533
          The <option>--extra</option> option is used to pass
534
          additional argument to the instance's kernel for this start
535
          only. Currently there is no way to specify a persistent set
536
          of arguments (beside the one hardcoded). Note that this may
537
          not apply to all virtualization types.
538
        </para>
539

    
540

    
541
        <para>
542
          Example:
543
          <screen>
544
# gnt-instance start instance1.example.com
545
# gnt-instance start --extra single test1.example.com
546
# gnt-instance start --node node1.example.com node2.example.com
547
# gnt-instance start --all
548
          </screen>
549
        </para>
550
      </refsect3>
551

    
552
      <refsect3>
553
        <title>SHUTDOWN</title>
554

    
555
        <cmdsynopsis>
556
          <command>shutdown</command>
557
          <sbr>
558
          <group choice="opt">
559
            <arg>--instance</arg>
560
            <arg>--node</arg>
561
            <arg>--primary</arg>
562
            <arg>--secondary</arg>
563
            <arg>--all</arg>
564
          </group>
565
          <sbr>
566

    
567
          <arg choice="opt"
568
          rep="repeat"><replaceable>name</replaceable></arg>
569
        </cmdsynopsis>
570

    
571
        <para>
572
          Stops one or more instances. If the instance cannot be
573
          cleanly stopped during a hardcoded interval (currently 2
574
          minutes), it will forcibly stop the instance (equivalent to
575
          switching off the power on a physical machine).
576
        </para>
577

    
578
        <para>
579
          The <option>--instance</option>, <option>--node</option>,
580
          <option>--primary</option>, <option>--secondary</option> and
581
          <option>--all</option> options are similar as for the
582
          <command>startup</command> command and they influence the
583
          actual instances being shutdown.
584
        </para>
585

    
586
        <para>
587
          Example:
588
          <screen>
589
# gnt-instance shutdown instance1.example.com
590
# gnt-instance shutdown --all
591
          </screen>
592
        </para>
593
      </refsect3>
594

    
595
      <refsect3>
596
        <title>REBOOT</title>
597

    
598
        <cmdsynopsis>
599
          <command>reboot</command>
600
          <sbr>
601
          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
602
          <sbr>
603
          <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
604
          <sbr>
605
          <arg>--ignore-secondaries</arg>
606
          <sbr>
607
          <arg>--force-multiple</arg>
608
          <sbr>
609
          <group choice="opt">
610
            <arg>--instance</arg>
611
            <arg>--node</arg>
612
            <arg>--primary</arg>
613
            <arg>--secondary</arg>
614
            <arg>--all</arg>
615
          </group>
616
          <sbr>
617

    
618
          <arg choice="opt"
619
          rep="repeat"><replaceable>name</replaceable></arg>
620
        </cmdsynopsis>
621

    
622
        <para>
623
          Reboots one or more instances. The type of reboot depends on
624
          the value of <option>--type</option>. A soft reboot does a
625
          hypervisor reboot, a hard reboot does a instance stop,
626
          recreates the hypervisor config for the instance and
627
          starts the instance. A full reboot does the equivalent
628
          of <command>gnt-instance shutdown &amp;&amp; gnt-instance
629
          startup</command>. The default is soft reboot.
630
        </para>
631

    
632
        <para>
633
          For the hard reboot the option
634
          <option>--ignore-secondaries</option> ignores errors for the
635
          secondary node while re-assembling the instance disks.
636
        </para>
637

    
638
        <para>
639
          The <option>--instance</option>, <option>--node</option>,
640
          <option>--primary</option>, <option>--secondary</option> and
641
          <option>--all</option> options are similar as for the
642
          <command>startup</command> command and they influence the
643
          actual instances being rebooted.
644
        </para>
645

    
646
        <para>
647
          Use the <option>--force-multiple</option> to keep
648
          gnt-instance from asking for confirmation when more than one
649
          instance is affected.
650
        </para>
651

    
652
        <para>
653
          Example:
654
          <screen>
655
# gnt-instance reboot instance1.example.com
656
# gnt-instance reboot --type=full instance1.example.com
657
          </screen>
658
        </para>
659
      </refsect3>
660

    
661
      <refsect3>
662
        <title>CONSOLE</title>
663
        <cmdsynopsis>
664
          <command>console</command>
665
          <arg choice="req"><replaceable>instance</replaceable></arg>
666
        </cmdsynopsis>
667

    
668
        <para>
669
          Connects to the console of the given instance. If the instance
670
          is not up, an error is returned.
671
        </para>
672

    
673
        <para>
674
          Example:
675
          <screen>
676
# gnt-instance console instance1.example.com
677
          </screen>
678
        </para>
679
      </refsect3>
680

    
681
    </refsect2>
682

    
683
    <refsect2>
684
      <title>Disk management</title>
685

    
686
      <refsect3>
687
        <title>REPLACE-DISKS</title>
688

    
689
        <cmdsynopsis>
690
          <command>replace-disks</command>
691
          <arg choice="opt">--new-secondary <replaceable>NODE</replaceable></arg>
692
          <arg choice="req"><replaceable>instance</replaceable></arg>
693
        </cmdsynopsis>
694

    
695
        <cmdsynopsis>
696
          <command>replace-disks</command>
697
          <arg choice="req">-s</arg>
698
          <arg choice="req">--new-secondary <replaceable>NODE</replaceable></arg>
699
          <arg choice="req"><replaceable>instance</replaceable></arg>
700
        </cmdsynopsis>
701

    
702
        <cmdsynopsis>
703
          <command>replace-disks</command>
704
          <group>
705
          <arg choice="req">-s</arg>
706
          <arg choice="req">-p</arg>
707
          </group>
708
          <arg choice="req"><replaceable>instance</replaceable></arg>
709
        </cmdsynopsis>
710

    
711
        <para>
712
          This command is a generalized form for adding and replacing
713
          disks.
714
        </para>
715

    
716
        <para>
717
          The first form is usable with the
718
          <literal>remote_raid1</literal> disk template. This will
719
          replace the disks on both the primary and secondary node,
720
          and optionally will change the secondary node to a new one
721
          if you pass the <option>--new-secondary</option> option.
722
        </para>
723

    
724
        <para>
725
          The second and third forms are usable with the
726
          <literal>drbd</literal> disk template. The second form will
727
          do a secondary replacement, but as opposed to the
728
          <literal>remote_raid1</literal> will not replace the disks
729
          on the primary, therefore it will execute faster. The third
730
          form will replace the disks on either the primary
731
          (<option>-p</option>) or the secondary (<option>-s</option>)
732
          node of the instance only, without changing the node.
733
        </para>
734

    
735
      </refsect3>
736

    
737
      <refsect3>
738
        <title>ADD-MIRROR</title>
739
        <cmdsynopsis>
740
          <command>add-mirror</command>
741
          <arg choice="req">-b <replaceable>sdX</replaceable></arg>
742
          <arg choice="req">-n <replaceable>node</replaceable></arg>
743
          <arg choice="req"><replaceable>instance</replaceable></arg>
744
        </cmdsynopsis>
745
        <para>
746
          Adds a new mirror to the disk layout of the instance, if the
747
          instance has a remote raid disk layout.
748

    
749
          The new mirror member will be between the instance's primary
750
          node and the node given with the <option>-n</option> option.
751
        </para>
752
      </refsect3>
753

    
754
      <refsect3>
755
        <title>REMOVE-MIRROR</title>
756

    
757
        <cmdsynopsis>
758
          <command>removemirror</command>
759
          <arg choice="req">-b <replaceable>sdX</replaceable></arg>
760
          <arg choice="req">-p <replaceable>id</replaceable></arg>
761
          <arg choice="req"><replaceable>instance</replaceable></arg>
762
        </cmdsynopsis>
763
        <para>
764
          Removes a mirror componenent from the disk layout of the
765
          instance, if the instance has a remote raid disk layout.
766
        </para>
767

    
768
        <para>
769
          You need to specifiy on which disk to act on using the
770
          <option>-b</option> option (either <filename>sda</filename>
771
          or <filename>sdb</filename>) and the mirror component, which
772
          is identified by the <option>-p</option> option. You can
773
          find the list of valid identifiers with the
774
          <command>info</command> command.
775
        </para>
776

    
777
      <refsect3>
778
        <title>ACTIVATE-DISKS</title>
779

    
780
        <cmdsynopsis>
781
          <command>activate-disks</command>
782
          <arg choice="req"><replaceable>instance</replaceable></arg>
783
        </cmdsynopsis>
784
        <para>
785
          Activates the block devices of the given instance. If
786
          successful, the command will show the location and name of
787
          the block devices:
788
          <screen>
789
node1.example.com:sda:/dev/md0
790
node1.example.com:sdb:/dev/md1
791
          </screen>
792

    
793
          In this example, <emphasis>node1.example.com</emphasis> is
794
          the name of the node on which the devices have been
795
          activated. The <emphasis>sda</emphasis> and
796
          <emphasis>sdb</emphasis> are the names of the block devices
797
          inside the instance. <emphasis>/dev/md0</emphasis> and
798
          <emphasis>/dev/md1</emphasis> are the names of the block
799
          devices as visible on the node.
800
        </para>
801

    
802
        <para>
803
          Note that it is safe to run this command while the instance
804
          is already running.
805
        </para>
806
      </refsect3>
807

    
808
      <refsect3>
809
        <title>DEACTIVATE-DISKS</title>
810

    
811
        <cmdsynopsis>
812
          <command>deactivate-disks</command>
813
          <arg choice="req"><replaceable>instance</replaceable></arg>
814
        </cmdsynopsis>
815
        <para>
816
          De-activates the block devices of the given instance. Note
817
          that if you run this command for a remote raid instance
818
          type, while it is running, it will not be able to shutdown
819
          the block devices on the primary node, but it will shutdown
820
          the block devices on the secondary nodes, thus breaking the
821
          replication.
822
        </para>
823

    
824
      </refsect3>
825

    
826
    </refsect2>
827

    
828
    <refsect2>
829
      <title>Recovery</title>
830

    
831
      <refsect3>
832
        <title>FAILOVER</title>
833

    
834
        <cmdsynopsis>
835
          <command>failover</command>
836
          <arg>-f</arg>
837
          <arg>--ignore-consistency</arg>
838
          <arg choice="req"><replaceable>instance</replaceable></arg>
839
        </cmdsynopsis>
840

    
841
        <para>
842
          Failover will fail the instance over its secondary
843
          node. This works only for instances having a remote raid
844
          disk layout.
845
        </para>
846

    
847
        <para>
848
          Normally the failover will check the consistency of the
849
          disks before failing over the instance. If you are trying to
850
          migrate instances off a dead node, this will fail. Use the
851
          <option>--ignore-consistency</option> option for this
852
          purpose. Note that this option can be dangerous as errors in
853
          shutting down the instance will be ignored, resulting in
854
          possibly having the instance running on two machines in
855
          parallel (on disconnected DRBD drives).
856
        </para>
857

    
858
        <para>
859
          Example:
860
          <screen>
861
# gnt-instance failover instance1.example.com
862
          </screen>
863
        </para>
864
      </refsect3>
865

    
866
    </refsect2>
867

    
868
    <refsect2>
869
      <title>TAGS</title>
870

    
871
    <refsect3>
872
        <title>ADD-TAGS</title>
873

    
874
        <cmdsynopsis>
875
          <command>add-tags</command>
876
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
877
          <arg choice="req"><replaceable>instancename</replaceable></arg>
878
          <arg choice="req"
879
            rep="repeat"><replaceable>tag</replaceable></arg>
880
        </cmdsynopsis>
881

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

    
895
      <refsect3>
896
        <title>LIST-TAGS</title>
897

    
898
        <cmdsynopsis>
899
          <command>list-tags</command>
900
          <arg choice="req"><replaceable>instancename</replaceable></arg>
901
        </cmdsynopsis>
902

    
903
        <para>List the tags of the given instance.</para>
904
      </refsect3>
905

    
906
      <refsect3>
907
        <title>REMOVE-TAGS</title>
908
        <cmdsynopsis>
909
          <command>remove-tags</command>
910
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
911
          <arg choice="req"><replaceable>instancename</replaceable></arg>
912
          <arg choice="req"
913
            rep="repeat"><replaceable>tag</replaceable></arg>
914
        </cmdsynopsis>
915

    
916
        <para>
917
          Remove tags from the given instance. If any of the tags are
918
          not existing on the node, the entire operation will abort.
919
        </para>
920

    
921
        <para>
922
          If the <option>--from</option> option is given, the list of
923
          tags will be extended with the contents of that file (each
924
          line becomes a tag). In this case, there is not need to pass
925
          tags on the command line (if you do, both sources will be
926
          used). A file name of - will be interpreted as stdin.
927
        </para>
928
      </refsect3>
929

    
930
    </refsect2>
931

    
932
  </refsect1>
933

    
934
  &footer;
935

    
936
</refentry>
937

    
938
<!-- Keep this comment at the end of the file
939
Local variables:
940
mode: sgml
941
sgml-omittag:t
942
sgml-shorttag:t
943
sgml-minimize-attributes:nil
944
sgml-always-quote-attributes:t
945
sgml-indent-step:2
946
sgml-indent-data:t
947
sgml-parent-document:nil
948
sgml-default-dtd-file:nil
949
sgml-exposed-tags:nil
950
sgml-local-catalogs:nil
951
sgml-local-ecat-files:nil
952
End:
953
-->