Statistics
| Branch: | Tag: | Revision:

root / man / gnt-instance.sgml @ 4677a909

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<optional>:secondary-node</optional></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 component (so
159
                  it's not actually raid1): a drbd device between the
160
                  instance's primary node and the node given by the second
161
                  value of the <option>--node</option> option.
162
                </para>
163
              </listitem>
164
            </varlistentry>
165
          </variablelist>
166
        </para>
167

    
168
        <para>
169
          The optional second value of the <option>--node</option> is used for
170
          the remote raid template type and specifies the remote node.
171
        </para>
172

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

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

    
190
      <refsect3>
191
        <title>REMOVE</title>
192

    
193
        <cmdsynopsis>
194
          <command>remove</command>
195
          <arg>--ignore-failures</arg>
196
          <arg choice="req"><replaceable>instance</replaceable></arg>
197
        </cmdsynopsis>
198

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

    
206
        </para>
207

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

    
216
        <para>
217
          Example:
218
          <screen>
219
# gnt-instance remove instance1.example.com
220
          </screen>
221
        </para>
222
      </refsect3>
223

    
224
      <refsect3>
225
        <title>LIST</title>
226

    
227
        <cmdsynopsis>
228
          <command>list</command>
229
          <arg>--no-headers</arg>
230
          <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
231
          <arg>-o <replaceable>FIELD,...</replaceable></arg>
232
        </cmdsynopsis>
233

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

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

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

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

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

    
359
      <refsect3>
360
        <title>INFO</title>
361

    
362
        <cmdsynopsis>
363
          <command>info</command>
364
          <arg rep="repeat"><replaceable>instance</replaceable></arg>
365
        </cmdsynopsis>
366

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

    
375
      <refsect3>
376
        <title>MODIFY</title>
377

    
378
        <cmdsynopsis>
379
          <command>modify</command>
380
          <arg choice="opt">-m <replaceable>memsize</replaceable></arg>
381
          <arg choice="opt">-p <replaceable>vcpus</replaceable></arg>
382
          <arg choice="opt">-i <replaceable>ip</replaceable></arg>
383
          <arg choice="opt">-b <replaceable>bridge</replaceable></arg>
384
          <arg choice="req"><replaceable>instance</replaceable></arg>
385
        </cmdsynopsis>
386

    
387
        <para>
388
          Modify the memory size, number of vcpus, ip address and/or bridge
389
          for an instance.
390
        </para>
391

    
392
        <para>
393
          The memory size is given in MiB. Note that you need to give
394
          at least one of the arguments, otherwise the command
395
          complains.
396
        </para>
397

    
398
        <para>
399
          All the changes take effect at the next restart. If the
400
          instance is running, there is no effect on the instance.
401
        </para>
402
      </refsect3>
403

    
404
      <refsect3>
405
        <title>REINSTALL</title>
406

    
407
        <cmdsynopsis>
408
          <command>reinstall</command>
409
          <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
410
          <arg choice="opt">-f <replaceable>force</replaceable></arg>
411
          <arg choice="req"><replaceable>instance</replaceable></arg>
412
        </cmdsynopsis>
413

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

    
422
      <refsect3>
423
        <title>RENAME</title>
424

    
425
        <cmdsynopsis>
426
          <command>rename</command>
427
          <arg>--no-ip-check</arg>
428
          <arg choice="req"><replaceable>instance</replaceable></arg>
429
          <arg choice="req"><replaceable>new_name</replaceable></arg>
430
        </cmdsynopsis>
431

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

    
443
    </refsect2>
444

    
445
    <refsect2>
446
      <title>Starting/stopping/connecting to console</title>
447

    
448
      <refsect3>
449
        <title>STARTUP</title>
450

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

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

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

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

    
526

    
527
        <para>
528
          Example:
529
          <screen>
530
# gnt-instance start instance1.example.com
531
# gnt-instance start --extra single test1.example.com
532
# gnt-instance start --node node1.example.com node2.example.com
533
# gnt-instance start --all
534
          </screen>
535
        </para>
536
      </refsect3>
537

    
538
      <refsect3>
539
        <title>SHUTDOWN</title>
540

    
541
        <cmdsynopsis>
542
          <command>shutdown</command>
543
          <sbr>
544
          <group choice="opt">
545
            <arg>--instance</arg>
546
            <arg>--node</arg>
547
            <arg>--primary</arg>
548
            <arg>--secondary</arg>
549
            <arg>--all</arg>
550
          </group>
551
          <sbr>
552

    
553
          <arg choice="opt"
554
          rep="repeat"><replaceable>name</replaceable></arg>
555
        </cmdsynopsis>
556

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

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

    
572
        <para>
573
          Example:
574
          <screen>
575
# gnt-instance shutdown instance1.example.com
576
# gnt-instance shutdown --all
577
          </screen>
578
        </para>
579
      </refsect3>
580

    
581
      <refsect3>
582
        <title>REBOOT</title>
583

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

    
604
          <arg choice="opt"
605
          rep="repeat"><replaceable>name</replaceable></arg>
606
        </cmdsynopsis>
607

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

    
618
        <para>
619
          For the hard reboot the option
620
          <option>--ignore-secondaries</option> ignores errors for the
621
          secondary node while re-assembling the instance disks.
622
        </para>
623

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

    
632
        <para>
633
          Use the <option>--force-multiple</option> to keep
634
          gnt-instance from asking for confirmation when more than one
635
          instance is affected.
636
        </para>
637

    
638
        <para>
639
          Example:
640
          <screen>
641
# gnt-instance reboot instance1.example.com
642
# gnt-instance reboot --type=full instance1.example.com
643
          </screen>
644
        </para>
645
      </refsect3>
646

    
647
      <refsect3>
648
        <title>CONSOLE</title>
649
        <cmdsynopsis>
650
          <command>console</command>
651
          <arg choice="req"><replaceable>instance</replaceable></arg>
652
        </cmdsynopsis>
653

    
654
        <para>
655
          Connects to the console of the given instance. If the instance
656
          is not up, an error is returned.
657
        </para>
658

    
659
        <para>
660
          Example:
661
          <screen>
662
# gnt-instance console instance1.example.com
663
          </screen>
664
        </para>
665
      </refsect3>
666

    
667
    </refsect2>
668

    
669
    <refsect2>
670
      <title>Disk management</title>
671

    
672
      <refsect3>
673
        <title>REPLACE-DISKS</title>
674

    
675
        <cmdsynopsis>
676
          <command>replace-disks</command>
677
          <arg choice="req">--new-secondary <replaceable>NODE</replaceable></arg>
678
          <arg choice="req"><replaceable>instance</replaceable></arg>
679
        </cmdsynopsis>
680

    
681
        <para>
682
          This command does a full add and replace for both disks of
683
          an instance.  It basically does an
684
          <command>addmirror</command> and
685
          <command>removemirror</command> for both disks of the
686
          instance.
687
        </para>
688

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

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

    
708
          The new mirror member will be between the instance's primary
709
          node and the node given with the <option>-n</option> option.
710
        </para>
711
      </refsect3>
712

    
713
      <refsect3>
714
        <title>REMOVE-MIRROR</title>
715

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

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

    
736
      <refsect3>
737
        <title>ACTIVATE-DISKS</title>
738

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

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

    
761
        <para>
762
          Note that it is safe to run this command while the instance
763
          is already running.
764
        </para>
765
      </refsect3>
766

    
767
      <refsect3>
768
        <title>DEACTIVATE-DISKS</title>
769

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

    
783
      </refsect3>
784

    
785
    </refsect2>
786

    
787
    <refsect2>
788
      <title>Recovery</title>
789

    
790
      <refsect3>
791
        <title>FAILOVER</title>
792

    
793
        <cmdsynopsis>
794
          <command>failover</command>
795
          <arg>-f</arg>
796
          <arg>--ignore-consistency</arg>
797
          <arg choice="req"><replaceable>instance</replaceable></arg>
798
        </cmdsynopsis>
799

    
800
        <para>
801
          Failover will fail the instance over its secondary
802
          node. This works only for instances having a remote raid
803
          disk layout.
804
        </para>
805

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

    
817
        <para>
818
          Example:
819
          <screen>
820
# gnt-instance failover instance1.example.com
821
          </screen>
822
        </para>
823
      </refsect3>
824

    
825
    </refsect2>
826

    
827
    <refsect2>
828
      <title>TAGS</title>
829

    
830
    <refsect3>
831
        <title>ADD-TAGS</title>
832

    
833
        <cmdsynopsis>
834
          <command>add-tags</command>
835
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
836
          <arg choice="req"><replaceable>instancename</replaceable></arg>
837
          <arg choice="req"
838
            rep="repeat"><replaceable>tag</replaceable></arg>
839
        </cmdsynopsis>
840

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

    
854
      <refsect3>
855
        <title>LIST-TAGS</title>
856

    
857
        <cmdsynopsis>
858
          <command>list-tags</command>
859
          <arg choice="req"><replaceable>instancename</replaceable></arg>
860
        </cmdsynopsis>
861

    
862
        <para>List the tags of the given instance.</para>
863
      </refsect3>
864

    
865
      <refsect3>
866
        <title>REMOVE-TAGS</title>
867
        <cmdsynopsis>
868
          <command>remove-tags</command>
869
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
870
          <arg choice="req"><replaceable>instancename</replaceable></arg>
871
          <arg choice="req"
872
            rep="repeat"><replaceable>tag</replaceable></arg>
873
        </cmdsynopsis>
874

    
875
        <para>
876
          Remove tags from the given instance. If any of the tags are
877
          not existing on the node, the entire operation will abort.
878
        </para>
879

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

    
889
    </refsect2>
890

    
891
  </refsect1>
892

    
893
  &footer;
894

    
895
</refentry>
896

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