Statistics
| Branch: | Tag: | Revision:

root / man / gnt-node.sgml @ 5fbbd028

History | View | Annotate | Download (34.2 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>-g <replaceable>nodegroup</replaceable></arg>
68
        <arg choice="req"><replaceable>nodename</replaceable></arg>
69
      </cmdsynopsis>
70

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

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

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

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

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

    
107
      <para>
108
        The <option>-g</option> is used to add the new node into a specific
109
        node group, specified by uuid or name. If only one node group exists
110
        you can skip this option, otherwise it's mandatory.
111
      </para>
112

    
113
      <para>
114
        Example:
115
        <screen>
116
# gnt-node add node5.example.com
117
# gnt-node add -s 192.0.2.5 node5.example.com
118
# gnt-node add -g group2 -s 192.0.2.9 node9.group2.example.com
119
        </screen>
120
      </para>
121
    </refsect2>
122

    
123
    <refsect2>
124
      <title>ADD-TAGS</title>
125

    
126
      <cmdsynopsis>
127
        <command>add-tags</command>
128
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
129
        <arg choice="req"><replaceable>nodename</replaceable></arg>
130
        <arg choice="req"
131
        rep="repeat"><replaceable>tag</replaceable></arg>
132
      </cmdsynopsis>
133

    
134
      <para>
135
        Add tags to the given node. If any of the tags contains
136
        invalid characters, the entire operation will abort.
137
      </para>
138

    
139
      <para>
140
        If the <option>--from</option> option is given, the list of
141
        tags will be extended with the contents of that file (each
142
        line becomes a tag). In this case, there is not need to pass
143
        tags on the command line (if you do, both sources will be
144
        used). A file name of - will be interpreted as stdin.
145
      </para>
146
    </refsect2>
147

    
148
    <refsect2>
149
      <title>EVACUATE</title>
150

    
151
      <cmdsynopsis>
152
        <command>evacuate</command>
153
        <arg>-f</arg>
154
        <arg>--early-release</arg>
155
        <group>
156
          <arg>--iallocator <replaceable>NAME</replaceable></arg>
157
          <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
158
        </group>
159
        <arg choice="req" rep="repeat"><replaceable>node</replaceable></arg>
160
      </cmdsynopsis>
161

    
162
      <para>
163
        This command will move all secondary instances away from the
164
        given node(s). It works only for instances having a drbd disk
165
        template.
166
      </para>
167

    
168
      <para>
169
        The new location for the instances can be specified in two ways:
170
        <itemizedlist>
171
          <listitem>
172
            <simpara>as a single node for all instances, via the
173
            <option>--new-secondary</option> option</simpara>
174
          </listitem>
175
          <listitem>
176
            <simpara>or via the <option>--iallocator</option> option,
177
            giving a script name as parameter, so each instance will
178
            be in turn placed on the (per the script) optimal
179
            node</simpara>
180
          </listitem>
181
        </itemizedlist>
182
      </para>
183

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

    
197
      <para>
198
        Example:
199
        <screen>
200
          # gnt-node evacuate -I dumb node3.example.com
201
        </screen>
202
      </para>
203
    </refsect2>
204

    
205
    <refsect2>
206
      <title>FAILOVER</title>
207

    
208
      <cmdsynopsis>
209
        <command>failover</command>
210
        <arg>-f</arg>
211
        <arg>--ignore-consistency</arg>
212
        <arg choice="req"><replaceable>node</replaceable></arg>
213
      </cmdsynopsis>
214

    
215
      <para>
216
        This command will fail over all instances having the given
217
        node as primary to their secondary nodes. This works only for
218
        instances having a drbd disk template.
219
      </para>
220

    
221
      <para>
222
        Normally the failover will check the consistency of the disks
223
        before failing over the instance. If you are trying to migrate
224
        instances off a dead node, this will fail. Use the
225
        <option>--ignore-consistency</option> option for this purpose.
226
      </para>
227

    
228
      <para>
229
        Example:
230
        <screen>
231
          # gnt-node failover node1.example.com
232
        </screen>
233
      </para>
234
    </refsect2>
235

    
236
    <refsect2>
237
      <title>INFO</title>
238

    
239
      <cmdsynopsis>
240
        <command>info</command>
241
        <arg rep="repeat"><replaceable>node</replaceable></arg>
242
      </cmdsynopsis>
243

    
244
      <para>
245
        Show detailed information about the nodes in the cluster. If you
246
        don't give any arguments, all nodes will be shows, otherwise the
247
        output will be restricted to the given names.
248
      </para>
249
    </refsect2>
250

    
251
    <refsect2>
252
      <title>LIST</title>
253

    
254
      <cmdsynopsis>
255
        <command>list</command>
256
        <arg>--sync</arg>
257
        <sbr>
258
        <arg>--no-headers</arg>
259
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
260
        <sbr>
261
        <arg>--units=<replaceable>UNITS</replaceable></arg>
262
        <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
263
        <sbr>
264
        <arg>--roman</arg>
265
        <sbr>
266
        <arg rep="repeat">node</arg>
267
      </cmdsynopsis>
268

    
269
      <para>
270
        Lists the nodes in the cluster.
271
      </para>
272

    
273
      <para>
274
        The <option>--no-headers</option> option will skip the initial
275
        header line. The <option>--separator</option> option takes an
276
        argument which denotes what will be used between the output
277
        fields. Both these options are to help scripting.
278
      </para>
279

    
280
      <para>
281
        The units used to display the numeric values in the output
282
        varies, depending on the options given. By default, the values
283
        will be formatted in the most appropriate unit. If the
284
        <option>--separator</option> option is given, then the values
285
        are shown in mebibytes to allow parsing by scripts. In both
286
        cases, the <option>--units</option> option can be used to
287
        enforce a given output unit.
288
      </para>
289

    
290
      <para>
291
        By default, the query of nodes will be done in parallel with
292
        any running jobs. This might give inconsistent results for the
293
        free disk/memory. The <option>--sync</option> can be used to
294
        grab locks for all the nodes and ensure consistent view of the
295
        cluster (but this might stall the query for a long time).
296
      </para>
297

    
298
      <para>
299
        Passing the <option>--roman</option> option gnt-node list will try to
300
        output some of its fields in a latin-friendly way. This is not the
301
        default for backwards compatibility.
302
      </para>
303

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

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

    
530
      <para>
531
        If the value of the option starts with the character
532
        <constant>+</constant>, the new fields will be added to the
533
        default list. This allows to quickly see the default list plus
534
        a few other fields, instead of retyping the entire list of
535
        fields.
536
      </para>
537

    
538
      <para>
539
        Note that some of this fields are known from the configuration
540
        of the cluster (e.g. <simplelist type="inline">
541
        <member>name</member> <member>pinst</member>
542
        <member>sinst</member> <member>pip</member>
543
        <member>sip</member> </simplelist> and thus the master does
544
        not need to contact the node for this data (making the listing
545
        fast if only fields from this set are selected), whereas the
546
        other fields are "live" fields and we need to make a query to
547
        the cluster nodes.
548
      </para>
549

    
550
      <para>
551
        Depending on the virtualization type and implementation
552
        details, the mtotal, mnode and mfree may have slighly varying
553
        meanings. For example, some solutions share the node memory
554
        with the pool of memory used for instances
555
        (<acronym>KVM</acronym>), whereas others have separate memory
556
        for the node and for the instances (Xen).
557
      </para>
558

    
559
      <para>
560
        If no node names are given, then all nodes are
561
        queried. Otherwise, only the given nodes will be listed.
562
      </para>
563
    </refsect2>
564

    
565
    <refsect2>
566
      <title>LIST-TAGS</title>
567

    
568
      <cmdsynopsis>
569
        <command>list-tags</command>
570
        <arg choice="req"><replaceable>nodename</replaceable></arg>
571
      </cmdsynopsis>
572

    
573
      <para>List the tags of the given node.</para>
574
    </refsect2>
575

    
576
    <refsect2>
577
      <title>MIGRATE</title>
578
      <cmdsynopsis>
579
        <command>migrate</command>
580
        <arg>-f</arg>
581
        <arg>--non-live</arg>
582
        <arg>--migration-mode=live|non-live</arg>
583
        <arg choice="req"><replaceable>node</replaceable></arg>
584
      </cmdsynopsis>
585

    
586
      <para>
587
        This command will migrate all instances having the given
588
        node as primary to their secondary nodes. This works only for
589
        instances having a drbd disk template.
590
      </para>
591

    
592
      <para>
593
        As for the <command>gnt-instance migrate</command> command,
594
        the options <option>--no-live</option>
595
        and <option>--migration-mode</option> can be given to
596
        influence the migration type.
597
      </para>
598

    
599
      <para>
600
        Example:
601
        <screen>
602
          # gnt-node migrate node1.example.com
603
        </screen>
604
      </para>
605

    
606
    </refsect2>
607

    
608
    <refsect2>
609
      <title>MODIFY</title>
610
      <cmdsynopsis>
611
        <command>modify</command>
612
        <arg>-f</arg>
613
        <arg>--submit</arg>
614
        <arg>--master-candidate=<option>yes|no</option></arg>
615
        <arg>--drained=<option>yes|no</option></arg>
616
        <arg>--offline=<option>yes|no</option></arg>
617
        <arg>--auto-promote</arg>
618
        <arg choice="req"><replaceable>node</replaceable></arg>
619
      </cmdsynopsis>
620

    
621
      <para>
622
        This command changes the role of the node. Each options takes
623
        either a literal <literal>yes</literal> or
624
        <literal>no</literal>, and only one option should be given as
625
        <literal>yes</literal>. The meaning of the roles are described
626
        in the manpage <citerefentry>
627
        <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
628
        </citerefentry>.
629
      </para>
630

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

    
643
      <para>
644
        Example (setting a node offline, which will demote it from
645
        master candidate role if is in that role):
646
        <screen>
647
# gnt-node modify --offline=yes node1.example.com
648
        </screen>
649
      </para>
650

    
651
      <para>Example (setting the node back to online and master candidate):
652
        <screen>
653
# gnt-node modify --offline=no --master-candidate=yes node1.example.com
654
        </screen>
655
      </para>
656

    
657
    </refsect2>
658

    
659
    <refsect2>
660
      <title>REMOVE</title>
661

    
662
      <cmdsynopsis>
663
        <command>remove</command>
664
        <arg choice="req"><replaceable>nodename</replaceable></arg>
665
      </cmdsynopsis>
666

    
667
      <para>
668
        Removes a node from the cluster. Instances must be removed or
669
        migrated to another cluster before.
670
      </para>
671

    
672
      <para>
673
        Example:
674
        <screen>
675
# gnt-node remove node5.example.com
676
        </screen>
677
      </para>
678
    </refsect2>
679

    
680
    <refsect2>
681
      <title>REMOVE-TAGS</title>
682
      <cmdsynopsis>
683
        <command>remove-tags</command>
684
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
685
        <arg choice="req"><replaceable>nodename</replaceable></arg>
686
        <arg choice="req"
687
        rep="repeat"><replaceable>tag</replaceable></arg>
688
      </cmdsynopsis>
689

    
690
      <para>
691
        Remove tags from the given node. If any of the tags are not
692
        existing on the node, the entire operation will abort.
693
      </para>
694

    
695
      <para>
696
        If the <option>--from</option> option is given, the list of
697
        tags will be extended with the contents of that file (each
698
        line becomes a tag). In this case, there is not need to pass
699
        tags on the command line (if you do, both sources will be
700
        used). A file name of - will be interpreted as stdin.
701
      </para>
702
    </refsect2>
703

    
704
    <refsect2>
705
      <title>VOLUMES</title>
706

    
707
      <cmdsynopsis>
708
        <command>volumes</command>
709
        <arg>--no-headers</arg>
710
        <arg>--human-readable</arg>
711
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
712
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
713
        <sbr>
714
        <arg rep="repeat"><replaceable>node</replaceable></arg>
715
      </cmdsynopsis>
716

    
717
      <para>
718
        Lists all logical volumes and their physical disks from the node(s)
719
        provided.
720
      </para>
721

    
722
      <para>
723
        The <option>--no-headers</option> option will skip the initial
724
        header line. The <option>--separator</option> option takes an
725
        argument which denotes what will be used between the output
726
        fields. Both these options are to help scripting.
727
      </para>
728

    
729
      <para>
730
        The units used to display the numeric values in the output
731
        varies, depending on the options given. By default, the values
732
        will be formatted in the most appropriate unit. If the
733
        <option>--separator</option> option is given, then the values
734
        are shown in mebibytes to allow parsing by scripts. In both
735
        cases, the <option>--units</option> option can be used to
736
        enforce a given output unit.
737
      </para>
738

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

    
785
      <para>
786
        Example:
787
        <screen>
788
# gnt-node volumes node5.example.com
789
Node              PhysDev   VG    Name                                 Size Instance
790
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
791
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
792
        </screen>
793
      </para>
794
    </refsect2>
795

    
796
    <refsect2>
797
      <title>LIST-STORAGE</title>
798

    
799
      <cmdsynopsis>
800
        <command>list-storage</command>
801
        <arg>--no-headers</arg>
802
        <arg>--human-readable</arg>
803
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
804
        <arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg>
805
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
806
        <sbr>
807
        <arg rep="repeat"><replaceable>node</replaceable></arg>
808
      </cmdsynopsis>
809

    
810
      <para>
811
        Lists the available storage units and their details for the
812
        given node(s).
813
      </para>
814

    
815
      <para>
816
        The <option>--no-headers</option> option will skip the initial header
817
        line. The <option>--separator</option> option takes an argument which
818
        denotes what will be used between the output fields. Both these options
819
        are to help scripting.
820
      </para>
821

    
822
      <para>
823
        The units used to display the numeric values in the output varies,
824
        depending on the options given. By default, the values will be
825
        formatted in the most appropriate unit. If the
826
        <option>--separator</option> option is given, then the values are shown
827
        in mebibytes to allow parsing by scripts. In both cases, the
828
        <option>--units</option> option can be used to enforce a given output
829
        unit.
830
      </para>
831

    
832
      <para>
833
        The <option>--storage-type</option> option can be used to choose a
834
        storage unit type. Possible choices are <literal>lvm-pv</literal>,
835
        <literal>lvm-vg</literal> or <literal>file</literal>.
836
      </para>
837

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

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

    
912
      <para>
913
        Example:
914
        <screen>
915
node1# gnt-node list-storage node2
916
Node  Type   Name        Size Used   Free Allocatable
917
node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y
918
node2 lvm-pv /dev/sdb1 698.6G   0M 698.6G Y
919
        </screen>
920
      </para>
921
    </refsect2>
922

    
923
    <refsect2>
924
      <title>MODIFY-STORAGE</title>
925

    
926
      <cmdsynopsis>
927
        <command>modify-storage</command>
928
        <arg><option>--allocatable=yes|no</option></arg>
929
        <sbr>
930
        <arg choice="req"><replaceable>node</replaceable></arg>
931
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
932
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
933
      </cmdsynopsis>
934

    
935
      <para>
936
        Modifies storage volumes on a node. Only LVM physical volumes
937
        can be modified at the moment. They have a storage type
938
        of <quote>lvm-pv</quote>.
939
      </para>
940

    
941
      <para>
942
        Example:
943
        <screen>
944
# gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
945
        </screen>
946
      </para>
947
    </refsect2>
948

    
949
    <refsect2>
950
      <title>REPAIR-STORAGE</title>
951

    
952
      <cmdsynopsis>
953
        <command>repair-storage</command>
954
        <arg>--ignore-consistency</arg>
955
        <arg choice="req"><replaceable>node</replaceable></arg>
956
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
957
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
958
      </cmdsynopsis>
959

    
960
      <para>
961
        Repairs a storage volume on a node. Only LVM volume groups can
962
        be repaired at this time. They have the storage type
963
        <quote>lvm-vg</quote>.
964
      </para>
965

    
966
      <para>
967
        On LVM volume groups, <command>repair-storage</command> runs
968
        <quote>vgreduce --removemissing</quote>.
969
      </para>
970

    
971
      <caution>
972
        <para>
973
          Running this command can lead to data loss. Use it with care.
974
        </para>
975
      </caution>
976

    
977
      <para>
978
        The <option>--ignore-consistency</option> option will ignore
979
        any inconsistent disks (on the nodes paired with this
980
        one). Use of this option is most likely to lead to data-loss.
981
      </para>
982

    
983
      <para>
984
        Example:
985
        <screen>
986
# gnt-node repair-storage node5.example.com lvm-vg xenvg
987
        </screen>
988
      </para>
989
    </refsect2>
990

    
991
    <refsect2>
992
      <title>POWERCYCLE</title>
993

    
994
      <cmdsynopsis>
995
        <command>powercycle</command>
996
        <arg><option>--yes</option></arg>
997
        <arg><option>--force</option></arg>
998
        <arg choice="req"><replaceable>node</replaceable></arg>
999
      </cmdsynopsis>
1000

    
1001
      <para>
1002
        This commands (tries to) forcefully reboot a node. It is a
1003
        command that can be used if the node environemnt is broken,
1004
        such that the admin can no longer login over ssh, but the
1005
        Ganeti node daemon is still working.
1006
      </para>
1007

    
1008
      <para>
1009
        Note that this command is not guaranteed to work; it depends
1010
        on the hypervisor how effective is the reboot attempt. For
1011
        Linux, this command require that the kernel option
1012
        <literal>CONFIG_MAGIC_SYSRQ</literal> is enabled.
1013
      </para>
1014

    
1015
      <para>
1016
        The <option>--yes</option> option can be used to skip
1017
        confirmation, while the <option>--force</option> option is
1018
        needed if the target node is the master node.
1019
      </para>
1020

    
1021
  </refsect1>
1022

    
1023
  &footer;
1024

    
1025
</refentry>
1026

    
1027
<!-- Keep this comment at the end of the file
1028
Local variables:
1029
mode: sgml
1030
sgml-omittag:t
1031
sgml-shorttag:t
1032
sgml-minimize-attributes:nil
1033
sgml-always-quote-attributes:t
1034
sgml-indent-step:2
1035
sgml-indent-data:t
1036
sgml-parent-document:nil
1037
sgml-default-dtd-file:nil
1038
sgml-exposed-tags:nil
1039
sgml-local-catalogs:nil
1040
sgml-local-ecat-files:nil
1041
End:
1042
-->