Statistics
| Branch: | Tag: | Revision:

root / man / gnt-node.sgml @ e71b9ef4

History | View | Annotate | Download (33.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>June 08, 2010</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-node</refentrytitle>">
10
  <!ENTITY dhpackage   "gnt-node">
11

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

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

    
32
    &dhsection;
33
    <refmiscinfo>Ganeti 2.2</refmiscinfo>
34
  </refmeta>
35
  <refnamediv>
36
    <refname>&dhpackage;</refname>
37

    
38
    <refpurpose>Node administration</refpurpose>
39
  </refnamediv>
40
  <refsynopsisdiv>
41
    <cmdsynopsis>
42
      <command>&dhpackage; </command>
43

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

    
51
    <para>
52
      The <command>&dhpackage;</command> is used for managing the
53
      (physical) nodes in the Ganeti system.
54
    </para>
55

    
56
  </refsect1>
57
  <refsect1>
58
    <title>COMMANDS</title>
59

    
60
    <refsect2>
61
      <title>ADD</title>
62

    
63
      <cmdsynopsis>
64
        <command>add</command>
65
        <arg>--readd</arg>
66
        <arg>-s <replaceable>secondary_ip</replaceable></arg>
67
        <arg choice="req"><replaceable>nodename</replaceable></arg>
68
      </cmdsynopsis>
69

    
70
      <para>
71
        Adds the given node to the cluster.
72
      </para>
73

    
74
      <para>
75
        This command is used to join a new node to the cluster. You
76
        will have to provide the password for root of the node to be
77
        able to add the node in the cluster. The command needs to be
78
        run on the Ganeti master.
79
      </para>
80

    
81
      <para>
82
        Note that the command is potentially destructive, as it will
83
        forcibly join the specified host the cluster, not paying
84
        attention to its current status (it could be already in a
85
        cluster, etc.)
86
      </para>
87

    
88
      <para>
89
        The <option>-s</option> is used in dual-home clusters and
90
        specifies the new node's IP in the secondary network. See the
91
        discussion in <citerefentry>
92
        <refentrytitle>gnt-cluster</refentrytitle>
93
        <manvolnum>8</manvolnum> </citerefentry> for more
94
        information.
95
      </para>
96

    
97
      <para>
98
        In case you're readding a node after hardware failure, you can
99
        use the <option>--readd</option> parameter. In this case, you
100
        don't need to pass the secondary IP again, it will reused from
101
        the cluster. Also, the <literal>drained</literal> and
102
        <literal>offline</literal> flags of the node will be cleared
103
        before re-adding it.
104
      </para>
105

    
106
      <para>
107
        Example:
108
        <screen>
109
# gnt-node add node5.example.com
110
# gnt-node add -s 192.0.2.5 node5.example.com
111
        </screen>
112
      </para>
113
    </refsect2>
114

    
115
    <refsect2>
116
      <title>ADD-TAGS</title>
117

    
118
      <cmdsynopsis>
119
        <command>add-tags</command>
120
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
121
        <arg choice="req"><replaceable>nodename</replaceable></arg>
122
        <arg choice="req"
123
        rep="repeat"><replaceable>tag</replaceable></arg>
124
      </cmdsynopsis>
125

    
126
      <para>
127
        Add tags to the given node. If any of the tags contains
128
        invalid characters, the entire operation will abort.
129
      </para>
130

    
131
      <para>
132
        If the <option>--from</option> option is given, the list of
133
        tags will be extended with the contents of that file (each
134
        line becomes a tag). In this case, there is not need to pass
135
        tags on the command line (if you do, both sources will be
136
        used). A file name of - will be interpreted as stdin.
137
      </para>
138
    </refsect2>
139

    
140
    <refsect2>
141
      <title>EVACUATE</title>
142

    
143
      <cmdsynopsis>
144
        <command>evacuate</command>
145
        <arg>-f</arg>
146
        <arg>--early-release</arg>
147
        <group>
148
          <arg>--iallocator <replaceable>NAME</replaceable></arg>
149
          <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
150
        </group>
151
        <arg choice="req" rep="repeat"><replaceable>node</replaceable></arg>
152
      </cmdsynopsis>
153

    
154
      <para>
155
        This command will move all secondary instances away from the
156
        given node(s). It works only for instances having a drbd disk
157
        template.
158
      </para>
159

    
160
      <para>
161
        The new location for the instances can be specified in two ways:
162
        <itemizedlist>
163
          <listitem>
164
            <simpara>as a single node for all instances, via the
165
            <option>--new-secondary</option> option</simpara>
166
          </listitem>
167
          <listitem>
168
            <simpara>or via the <option>--iallocator</option> option,
169
            giving a script name as parameter, so each instance will
170
            be in turn placed on the (per the script) optimal
171
            node</simpara>
172
          </listitem>
173
        </itemizedlist>
174
      </para>
175

    
176
      <para>
177
        The <option>--early-release</option> changes the code so that
178
        the old storage on node being evacuated is removed early
179
        (before the resync is completed) and the internal Ganeti locks
180
        are also released for both the current secondary and the new
181
        secondary, thus allowing more parallelism in the cluster
182
        operation. This should be used only when recovering from a
183
        disk failure on the current secondary (thus the old storage is
184
        already broken) or when the storage on the primary node is
185
        known to be fine (thus we won't need the old storage for
186
        potential recovery).
187
      </para>
188

    
189
      <para>
190
        Example:
191
        <screen>
192
          # gnt-node evacuate -I dumb node3.example.com
193
        </screen>
194
      </para>
195
    </refsect2>
196

    
197
    <refsect2>
198
      <title>FAILOVER</title>
199

    
200
      <cmdsynopsis>
201
        <command>failover</command>
202
        <arg>-f</arg>
203
        <arg>--ignore-consistency</arg>
204
        <arg choice="req"><replaceable>node</replaceable></arg>
205
      </cmdsynopsis>
206

    
207
      <para>
208
        This command will fail over all instances having the given
209
        node as primary to their secondary nodes. This works only for
210
        instances having a drbd disk template.
211
      </para>
212

    
213
      <para>
214
        Normally the failover will check the consistency of the disks
215
        before failing over the instance. If you are trying to migrate
216
        instances off a dead node, this will fail. Use the
217
        <option>--ignore-consistency</option> option for this purpose.
218
      </para>
219

    
220
      <para>
221
        Example:
222
        <screen>
223
          # gnt-node failover node1.example.com
224
        </screen>
225
      </para>
226
    </refsect2>
227

    
228
    <refsect2>
229
      <title>INFO</title>
230

    
231
      <cmdsynopsis>
232
        <command>info</command>
233
        <arg rep="repeat"><replaceable>node</replaceable></arg>
234
      </cmdsynopsis>
235

    
236
      <para>
237
        Show detailed information about the nodes in the cluster. If you
238
        don't give any arguments, all nodes will be shows, otherwise the
239
        output will be restricted to the given names.
240
      </para>
241
    </refsect2>
242

    
243
    <refsect2>
244
      <title>LIST</title>
245

    
246
      <cmdsynopsis>
247
        <command>list</command>
248
        <arg>--sync</arg>
249
        <sbr>
250
        <arg>--no-headers</arg>
251
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
252
        <sbr>
253
        <arg>--units=<replaceable>UNITS</replaceable></arg>
254
        <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
255
        <sbr>
256
        <arg>--roman</arg>
257
        <sbr>
258
        <arg rep="repeat">node</arg>
259
      </cmdsynopsis>
260

    
261
      <para>
262
        Lists the nodes in the cluster.
263
      </para>
264

    
265
      <para>
266
        The <option>--no-headers</option> option will skip the initial
267
        header line. The <option>--separator</option> option takes an
268
        argument which denotes what will be used between the output
269
        fields. Both these options are to help scripting.
270
      </para>
271

    
272
      <para>
273
        The units used to display the numeric values in the output
274
        varies, depending on the options given. By default, the values
275
        will be formatted in the most appropriate unit. If the
276
        <option>--separator</option> option is given, then the values
277
        are shown in mebibytes to allow parsing by scripts. In both
278
        cases, the <option>--units</option> option can be used to
279
        enforce a given output unit.
280
      </para>
281

    
282
      <para>
283
        By default, the query of nodes will be done in parallel with
284
        any running jobs. This might give inconsistent results for the
285
        free disk/memory. The <option>--sync</option> can be used to
286
        grab locks for all the nodes and ensure consistent view of the
287
        cluster (but this might stall the query for a long time).
288
      </para>
289

    
290
      <para>
291
        Passing the <option>--roman</option> option gnt-node list will try to
292
        output some of its fields in a latin-friendly way. This is not the
293
        default for backwards compatibility.
294
      </para>
295

    
296
      <para>
297
        The <option>-o</option> option takes a comma-separated list of
298
        output fields. The available fields and their meaning are:
299
        <variablelist>
300
          <varlistentry>
301
            <term>name</term>
302
            <listitem>
303
              <simpara>the node name</simpara>
304
            </listitem>
305
          </varlistentry>
306
          <varlistentry>
307
            <term>pinst_cnt</term>
308
            <listitem>
309
              <simpara>the number of instances having this node as
310
              primary</simpara>
311
            </listitem>
312
          </varlistentry>
313
          <varlistentry>
314
            <term>pinst_list</term>
315
            <listitem>
316
              <simpara>the list of instances having this node as
317
              primary, comma separated</simpara>
318
            </listitem>
319
          </varlistentry>
320
          <varlistentry>
321
            <term>sinst_cnt</term>
322
            <listitem>
323
              <simpara>the number of instances having this node as a
324
              secondary node</simpara>
325
            </listitem>
326
          </varlistentry>
327
          <varlistentry>
328
            <term>sinst_list</term>
329
            <listitem>
330
              <simpara>the list of instances having this node as a
331
              secondary node, comma separated</simpara>
332
            </listitem>
333
          </varlistentry>
334
          <varlistentry>
335
            <term>pip</term>
336
            <listitem>
337
              <simpara>the primary ip of this node (used for cluster
338
              communication)</simpara>
339
            </listitem>
340
          </varlistentry>
341
          <varlistentry>
342
            <term>sip</term>
343
            <listitem>
344
              <simpara>
345
                the secondary ip of this node (used for data
346
                replication in dual-ip clusters, see <citerefentry>
347
                <refentrytitle>gnt-cluster</refentrytitle>
348
                <manvolnum>8</manvolnum>
349
                </citerefentry>
350
              </simpara>
351
            </listitem>
352
          </varlistentry>
353
          <varlistentry>
354
            <term>dtotal</term>
355
            <listitem>
356
              <simpara>total disk space in the volume group used for
357
              instance disk allocations</simpara>
358
            </listitem>
359
          </varlistentry>
360
          <varlistentry>
361
            <term>dfree</term>
362
            <listitem>
363
              <simpara>available disk space in the volume group</simpara>
364
            </listitem>
365
          </varlistentry>
366
          <varlistentry>
367
            <term>mtotal</term>
368
            <listitem>
369
              <simpara>total memory on the physical node</simpara>
370
            </listitem>
371
          </varlistentry>
372
          <varlistentry>
373
            <term>mnode</term>
374
            <listitem>
375
              <simpara>the memory used by the node itself</simpara>
376
            </listitem>
377
          </varlistentry>
378
          <varlistentry>
379
            <term>mfree</term>
380
            <listitem>
381
              <simpara>memory available for instance
382
              allocations</simpara>
383
            </listitem>
384
          </varlistentry>
385
          <varlistentry>
386
            <term>bootid</term>
387
            <listitem>
388
              <simpara>the node bootid value; this is a linux specific
389
              feature that assigns a new UUID to the node at each boot
390
              and can be use to detect node reboots (by tracking
391
              changes in this value)</simpara>
392
            </listitem>
393
          </varlistentry>
394
          <varlistentry>
395
            <term>tags</term>
396
            <listitem>
397
              <simpara>comma-separated list of the node's
398
              tags</simpara>
399
            </listitem>
400
          </varlistentry>
401
          <varlistentry>
402
            <term>serial_no</term>
403
            <listitem>
404
              <simpara>the so called 'serial number' of the node;
405
              this is a numeric field that is incremented each time
406
              the node is modified, and it can be used to detect
407
              modifications</simpara>
408
            </listitem>
409
          </varlistentry>
410
          <varlistentry>
411
            <term>ctime</term>
412
            <listitem>
413
              <para>
414
                the creation time of the node; note that this field
415
                contains spaces and as such it's harder to parse
416
              </para>
417
              <para>
418
                if this attribute is not present (e.g. when upgrading
419
                from older versions), then "N/A" will be shown instead
420
              </para>
421
            </listitem>
422
          </varlistentry>
423
          <varlistentry>
424
            <term>mtime</term>
425
            <listitem>
426
              <para>
427
                the last modification time of the node; note that this
428
                field contains spaces and as such it's harder to parse
429
              </para>
430
              <para>
431
                if this attribute is not present (e.g. when upgrading
432
                from older versions), then "N/A" will be shown instead
433
              </para>
434
            </listitem>
435
          </varlistentry>
436
          <varlistentry>
437
            <term>uuid</term>
438
            <listitem>
439
              <simpara>Show the UUID of the node (generated
440
                automatically by Ganeti)</simpara>
441
            </listitem>
442
          </varlistentry>
443

    
444
          <varlistentry>
445
            <term>ctotal</term>
446
            <listitem>
447
              <simpara>the toal number of logical processors</simpara>
448
            </listitem>
449
          </varlistentry>
450
          <varlistentry>
451
            <term>cnodes</term>
452
            <listitem>
453
              <simpara>the number of NUMA domains on the node, if the
454
              hypervisor can export this information</simpara>
455
            </listitem>
456
          </varlistentry>
457
          <varlistentry>
458
            <term>csockets</term>
459
            <listitem>
460
              <simpara>the number of physical CPU sockets, if the
461
              hypervisor can export this information</simpara>
462
            </listitem>
463
          </varlistentry>
464
          <varlistentry>
465
            <term>master_candidate</term>
466
            <listitem>
467
              <simpara>whether the node is a master candidate or not</simpara>
468
            </listitem>
469
          </varlistentry>
470
          <varlistentry>
471
            <term>drained</term>
472
            <listitem>
473
              <simpara>whether the node is drained or not; the cluster
474
              still communicates with drained nodes but excludes them
475
              from allocation operations</simpara>
476
            </listitem>
477
          </varlistentry>
478
          <varlistentry>
479
            <term>offline</term>
480
            <listitem>
481
              <simpara>whether the node is offline or not; if offline,
482
              the cluster does not communicate with offline nodes;
483
              useful for nodes that are not reachable in order to
484
              avoid delays</simpara>
485
            </listitem>
486
          </varlistentry>
487
          <varlistentry>
488
            <term>role</term>
489
            <listitem>
490
              <para>
491
                A condensed version of the node flags; this field will
492
                output a one-character field, with the following
493
                possible values:
494
                <itemizedlist>
495
                  <listitem>
496
                    <simpara><emphasis>M</emphasis> for the master
497
                    node</simpara>
498
                  </listitem>
499
                  <listitem>
500
                    <simpara><emphasis>C</emphasis> for a master
501
                    candidate</simpara>
502
                  </listitem>
503
                  <listitem>
504
                    <simpara><emphasis>R</emphasis> for a regular
505
                    node</simpara>
506
                  </listitem>
507
                  <listitem>
508
                    <simpara><emphasis>D</emphasis> for a drained
509
                    node</simpara>
510
                  </listitem>
511
                  <listitem>
512
                    <simpara><emphasis>O</emphasis> for an offline
513
                    node</simpara>
514
                  </listitem>
515
                </itemizedlist>
516
              </para>
517
            </listitem>
518
          </varlistentry>
519
        </variablelist>
520
      </para>
521

    
522
      <para>
523
        If the value of the option starts with the character
524
        <constant>+</constant>, the new fields will be added to the
525
        default list. This allows to quickly see the default list plus
526
        a few other fields, instead of retyping the entire list of
527
        fields.
528
      </para>
529

    
530
      <para>
531
        Note that some of this fields are known from the configuration
532
        of the cluster (e.g. <simplelist type="inline">
533
        <member>name</member> <member>pinst</member>
534
        <member>sinst</member> <member>pip</member>
535
        <member>sip</member> </simplelist> and thus the master does
536
        not need to contact the node for this data (making the listing
537
        fast if only fields from this set are selected), whereas the
538
        other fields are "live" fields and we need to make a query to
539
        the cluster nodes.
540
      </para>
541

    
542
      <para>
543
        Depending on the virtualization type and implementation
544
        details, the mtotal, mnode and mfree may have slighly varying
545
        meanings. For example, some solutions share the node memory
546
        with the pool of memory used for instances
547
        (<acronym>KVM</acronym>), whereas others have separate memory
548
        for the node and for the instances (Xen).
549
      </para>
550

    
551
      <para>
552
        If no node names are given, then all nodes are
553
        queried. Otherwise, only the given nodes will be listed.
554
      </para>
555
    </refsect2>
556

    
557
    <refsect2>
558
      <title>LIST-TAGS</title>
559

    
560
      <cmdsynopsis>
561
        <command>list-tags</command>
562
        <arg choice="req"><replaceable>nodename</replaceable></arg>
563
      </cmdsynopsis>
564

    
565
      <para>List the tags of the given node.</para>
566
    </refsect2>
567

    
568
    <refsect2>
569
      <title>MIGRATE</title>
570
      <cmdsynopsis>
571
        <command>migrate</command>
572
        <arg>-f</arg>
573
        <arg>--non-live</arg>
574
        <arg>--migration-type=live|non-live</arg>
575
        <arg choice="req"><replaceable>node</replaceable></arg>
576
      </cmdsynopsis>
577

    
578
      <para>
579
        This command will migrate all instances having the given
580
        node as primary to their secondary nodes. This works only for
581
        instances having a drbd disk template.
582
      </para>
583

    
584
      <para>
585
        As for the <command>gnt-instance migrate</command> command,
586
        the options <option>--no-live</option>
587
        and <option>--migration-type</option> can be given to
588
        influence the migration type.
589
      </para>
590

    
591
      <para>
592
        Example:
593
        <screen>
594
          # gnt-node migrate node1.example.com
595
        </screen>
596
      </para>
597

    
598
    </refsect2>
599

    
600
    <refsect2>
601
      <title>MODIFY</title>
602
      <cmdsynopsis>
603
        <command>modify</command>
604
        <arg>-f</arg>
605
        <arg>--submit</arg>
606
        <arg>--master-candidate=<option>yes|no</option></arg>
607
        <arg>--drained=<option>yes|no</option></arg>
608
        <arg>--offline=<option>yes|no</option></arg>
609
        <arg>--auto-promote</arg>
610
        <arg choice="req"><replaceable>node</replaceable></arg>
611
      </cmdsynopsis>
612

    
613
      <para>
614
        This command changes the role of the node. Each options takes
615
        either a literal <literal>yes</literal> or
616
        <literal>no</literal>, and only one option should be given as
617
        <literal>yes</literal>. The meaning of the roles are described
618
        in the manpage <citerefentry>
619
        <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
620
        </citerefentry>.
621
      </para>
622

    
623
      <para>
624
        In case a node is demoted from the master candidate role, the
625
        operation will be refused unless you pass
626
        the <option>--auto-promote</option> option. This option will
627
        cause the operation to lock all cluster nodes (thus it will
628
        not be able to run in parallel with most other jobs), but it
629
        allows automated maintenance of the cluster candidate pool. If
630
        locking all cluster node is too expensive, another option is
631
        to promote manually another node to master candidate before
632
        demoting the current one.
633
      </para>
634

    
635
      <para>
636
        Example (setting a node offline, which will demote it from
637
        master candidate role if is in that role):
638
        <screen>
639
# gnt-node modify --offline=yes node1.example.com
640
        </screen>
641
      </para>
642

    
643
      <para>Example (setting the node back to online and master candidate):
644
        <screen>
645
# gnt-node modify --offline=no --master-candidate=yes node1.example.com
646
        </screen>
647
      </para>
648

    
649
    </refsect2>
650

    
651
    <refsect2>
652
      <title>REMOVE</title>
653

    
654
      <cmdsynopsis>
655
        <command>remove</command>
656
        <arg choice="req"><replaceable>nodename</replaceable></arg>
657
      </cmdsynopsis>
658

    
659
      <para>
660
        Removes a node from the cluster. Instances must be removed or
661
        migrated to another cluster before.
662
      </para>
663

    
664
      <para>
665
        Example:
666
        <screen>
667
# gnt-node remove node5.example.com
668
        </screen>
669
      </para>
670
    </refsect2>
671

    
672
    <refsect2>
673
      <title>REMOVE-TAGS</title>
674
      <cmdsynopsis>
675
        <command>remove-tags</command>
676
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
677
        <arg choice="req"><replaceable>nodename</replaceable></arg>
678
        <arg choice="req"
679
        rep="repeat"><replaceable>tag</replaceable></arg>
680
      </cmdsynopsis>
681

    
682
      <para>
683
        Remove tags from the given node. If any of the tags are not
684
        existing on the node, the entire operation will abort.
685
      </para>
686

    
687
      <para>
688
        If the <option>--from</option> option is given, the list of
689
        tags will be extended with the contents of that file (each
690
        line becomes a tag). In this case, there is not need to pass
691
        tags on the command line (if you do, both sources will be
692
        used). A file name of - will be interpreted as stdin.
693
      </para>
694
    </refsect2>
695

    
696
    <refsect2>
697
      <title>VOLUMES</title>
698

    
699
      <cmdsynopsis>
700
        <command>volumes</command>
701
        <arg>--no-headers</arg>
702
        <arg>--human-readable</arg>
703
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
704
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
705
        <sbr>
706
        <arg rep="repeat"><replaceable>node</replaceable></arg>
707
      </cmdsynopsis>
708

    
709
      <para>
710
        Lists all logical volumes and their physical disks from the node(s)
711
        provided.
712
      </para>
713

    
714
      <para>
715
        The <option>--no-headers</option> option will skip the initial
716
        header line. The <option>--separator</option> option takes an
717
        argument which denotes what will be used between the output
718
        fields. Both these options are to help scripting.
719
      </para>
720

    
721
      <para>
722
        The units used to display the numeric values in the output
723
        varies, depending on the options given. By default, the values
724
        will be formatted in the most appropriate unit. If the
725
        <option>--separator</option> option is given, then the values
726
        are shown in mebibytes to allow parsing by scripts. In both
727
        cases, the <option>--units</option> option can be used to
728
        enforce a given output unit.
729
      </para>
730

    
731
      <para>
732
        The <option>-o</option> option takes a comma-separated list of
733
        output fields. The available fields and their meaning are:
734
        <variablelist>
735
          <varlistentry>
736
            <term>node</term>
737
            <listitem>
738
              <simpara>the node name on which the volume exists</simpara>
739
            </listitem>
740
          </varlistentry>
741
          <varlistentry>
742
            <term>phys</term>
743
            <listitem>
744
              <simpara>the physical drive (on which the LVM physical
745
              volume lives)</simpara>
746
            </listitem>
747
          </varlistentry>
748
          <varlistentry>
749
            <term>vg</term>
750
            <listitem>
751
              <simpara>the volume group name</simpara>
752
            </listitem>
753
          </varlistentry>
754
          <varlistentry>
755
            <term>name</term>
756
            <listitem>
757
              <simpara>the logical volume name</simpara>
758
            </listitem>
759
          </varlistentry>
760
          <varlistentry>
761
            <term>size</term>
762
            <listitem>
763
              <simpara>the logical volume size</simpara>
764
            </listitem>
765
          </varlistentry>
766
          <varlistentry>
767
            <term>instance</term>
768
            <listitem>
769
              <simpara>The name of the instance to which this volume
770
              belongs, or (in case it's an orphan volume) the
771
              character <quote>-</quote></simpara>
772
            </listitem>
773
          </varlistentry>
774
        </variablelist>
775
      </para>
776

    
777
      <para>
778
        Example:
779
        <screen>
780
# gnt-node volumes node5.example.com
781
Node              PhysDev   VG    Name                                 Size Instance
782
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
783
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
784
        </screen>
785
      </para>
786
    </refsect2>
787

    
788
    <refsect2>
789
      <title>LIST-STORAGE</title>
790

    
791
      <cmdsynopsis>
792
        <command>list-storage</command>
793
        <arg>--no-headers</arg>
794
        <arg>--human-readable</arg>
795
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
796
        <arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg>
797
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
798
        <sbr>
799
        <arg rep="repeat"><replaceable>node</replaceable></arg>
800
      </cmdsynopsis>
801

    
802
      <para>
803
        Lists the available storage units and their details for the
804
        given node(s).
805
      </para>
806

    
807
      <para>
808
        The <option>--no-headers</option> option will skip the initial header
809
        line. The <option>--separator</option> option takes an argument which
810
        denotes what will be used between the output fields. Both these options
811
        are to help scripting.
812
      </para>
813

    
814
      <para>
815
        The units used to display the numeric values in the output varies,
816
        depending on the options given. By default, the values will be
817
        formatted in the most appropriate unit. If the
818
        <option>--separator</option> option is given, then the values are shown
819
        in mebibytes to allow parsing by scripts. In both cases, the
820
        <option>--units</option> option can be used to enforce a given output
821
        unit.
822
      </para>
823

    
824
      <para>
825
        The <option>--storage-type</option> option can be used to choose a
826
        storage unit type. Possible choices are <literal>lvm-pv</literal>,
827
        <literal>lvm-vg</literal> or <literal>file</literal>.
828
      </para>
829

    
830
      <para>
831
        The <option>-o</option> option takes a comma-separated list of
832
        output fields. The available fields and their meaning are:
833
        <variablelist>
834
          <varlistentry>
835
            <term>node</term>
836
            <listitem>
837
              <simpara>the node name on which the volume exists</simpara>
838
            </listitem>
839
          </varlistentry>
840
          <varlistentry>
841
            <term>type</term>
842
            <listitem>
843
              <simpara>the type of the storage unit (currently just
844
              what is passed in via
845
              <option>--storage-type</option>)</simpara>
846
            </listitem>
847
          </varlistentry>
848
          <varlistentry>
849
            <term>name</term>
850
            <listitem>
851
              <simpara>the path/identifier of the storage unit</simpara>
852
            </listitem>
853
          </varlistentry>
854
          <varlistentry>
855
            <term>size</term>
856
            <listitem>
857
              <simpara>
858
                total size of the unit; for the file type see a note below
859
              </simpara>
860
            </listitem>
861
          </varlistentry>
862
          <varlistentry>
863
            <term>used</term>
864
            <listitem>
865
              <simpara>
866
                used space in the unit; for the file type see a note below
867
              </simpara>
868
            </listitem>
869
          </varlistentry>
870
          <varlistentry>
871
            <term>free</term>
872
            <listitem>
873
              <simpara>
874
                available disk space
875
              </simpara>
876
            </listitem>
877
          </varlistentry>
878
          <varlistentry>
879
            <term>allocatable</term>
880
            <listitem>
881
              <simpara>
882
                whether we the unit is available for allocation
883
                (only <literal>lvm-pv</literal> can change this
884
                setting, the other types always report true)
885
              </simpara>
886
            </listitem>
887
          </varlistentry>
888
        </variablelist>
889
      </para>
890

    
891
      <para>
892
        Note that for the <quote>file</quote> type, the total disk
893
        space might not equal to the sum of used and free, due to the
894
        method Ganeti uses to compute each of them. The total and free
895
        values are computed as the total and free space values for the
896
        filesystem to which the directory belongs, but the used space
897
        is computed from the used space under that directory
898
        <emphasis>only</emphasis>, which might not be necessarily the
899
        root of the filesystem, and as such there could be files
900
        outside the file storage directory using disk space and
901
        causing a mismatch in the values.
902
      </para>
903

    
904
      <para>
905
        Example:
906
        <screen>
907
node1# gnt-node list-storage node2
908
Node  Type   Name        Size Used   Free Allocatable
909
node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y
910
node2 lvm-pv /dev/sdb1 698.6G   0M 698.6G Y
911
        </screen>
912
      </para>
913
    </refsect2>
914

    
915
    <refsect2>
916
      <title>MODIFY-STORAGE</title>
917

    
918
      <cmdsynopsis>
919
        <command>modify-storage</command>
920
        <arg><option>--allocatable=yes|no</option></arg>
921
        <sbr>
922
        <arg choice="req"><replaceable>node</replaceable></arg>
923
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
924
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
925
      </cmdsynopsis>
926

    
927
      <para>
928
        Modifies storage volumes on a node. Only LVM physical volumes
929
        can be modified at the moment. They have a storage type
930
        of <quote>lvm-pv</quote>.
931
      </para>
932

    
933
      <para>
934
        Example:
935
        <screen>
936
# gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
937
        </screen>
938
      </para>
939
    </refsect2>
940

    
941
    <refsect2>
942
      <title>REPAIR-STORAGE</title>
943

    
944
      <cmdsynopsis>
945
        <command>repair-storage</command>
946
        <arg>--ignore-consistency</arg>
947
        <arg choice="req"><replaceable>node</replaceable></arg>
948
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
949
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
950
      </cmdsynopsis>
951

    
952
      <para>
953
        Repairs a storage volume on a node. Only LVM volume groups can
954
        be repaired at this time. They have the storage type
955
        <quote>lvm-vg</quote>.
956
      </para>
957

    
958
      <para>
959
        On LVM volume groups, <command>repair-storage</command> runs
960
        <quote>vgreduce --removemissing</quote>.
961
      </para>
962

    
963
      <caution>
964
        <para>
965
          Running this command can lead to data loss. Use it with care.
966
        </para>
967
      </caution>
968

    
969
      <para>
970
        The <option>--ignore-consistency</option> option will ignore
971
        any inconsistent disks (on the nodes paired with this
972
        one). Use of this option is most likely to lead to data-loss.
973
      </para>
974

    
975
      <para>
976
        Example:
977
        <screen>
978
# gnt-node repair-storage node5.example.com lvm-vg xenvg
979
        </screen>
980
      </para>
981
    </refsect2>
982

    
983
    <refsect2>
984
      <title>POWERCYCLE</title>
985

    
986
      <cmdsynopsis>
987
        <command>powercycle</command>
988
        <arg><option>--yes</option></arg>
989
        <arg><option>--force</option></arg>
990
        <arg choice="req"><replaceable>node</replaceable></arg>
991
      </cmdsynopsis>
992

    
993
      <para>
994
        This commands (tries to) forcefully reboot a node. It is a
995
        command that can be used if the node environemnt is broken,
996
        such that the admin can no longer login over ssh, but the
997
        Ganeti node daemon is still working.
998
      </para>
999

    
1000
      <para>
1001
        Note that this command is not guaranteed to work; it depends
1002
        on the hypervisor how effective is the reboot attempt. For
1003
        Linux, this command require that the kernel option
1004
        <literal>CONFIG_MAGIC_SYSRQ</literal> is enabled.
1005
      </para>
1006

    
1007
      <para>
1008
        The <option>--yes</option> option can be used to skip
1009
        confirmation, while the <option>--force</option> option is
1010
        needed if the target node is the master node.
1011
      </para>
1012

    
1013
  </refsect1>
1014

    
1015
  &footer;
1016

    
1017
</refentry>
1018

    
1019
<!-- Keep this comment at the end of the file
1020
Local variables:
1021
mode: sgml
1022
sgml-omittag:t
1023
sgml-shorttag:t
1024
sgml-minimize-attributes:nil
1025
sgml-always-quote-attributes:t
1026
sgml-indent-step:2
1027
sgml-indent-data:t
1028
sgml-parent-document:nil
1029
sgml-default-dtd-file:nil
1030
sgml-exposed-tags:nil
1031
sgml-local-catalogs:nil
1032
sgml-local-ecat-files:nil
1033
End:
1034
-->