Statistics
| Branch: | Tag: | Revision:

root / man / gnt-node.sgml @ 7ea7bcf6

History | View | Annotate | Download (33.1 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>February 12, 2009</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.0</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.168.44.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"><replaceable>node</replaceable></arg>
152
      </cmdsynopsis>
153

    
154
      <para>
155
        This command will move all secondary instances away from the
156
        given node. 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 rep="repeat">node</arg>
257
      </cmdsynopsis>
258

    
259
      <para>
260
        Lists the nodes in the cluster.
261
      </para>
262

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

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

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

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

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

    
514
      <para>
515
        If the value of the option starts with the character
516
        <constant>+</constant>, the new fields will be added to the
517
        default list. This allows to quickly see the default list plus
518
        a few other fields, instead of retyping the entire list of
519
        fields.
520
      </para>
521

    
522
      <para>
523
        Note that some of this fields are known from the configuration
524
        of the cluster (e.g. <simplelist type="inline">
525
        <member>name</member> <member>pinst</member>
526
        <member>sinst</member> <member>pip</member>
527
        <member>sip</member> </simplelist> and thus the master does
528
        not need to contact the node for this data (making the listing
529
        fast if only fields from this set are selected), whereas the
530
        other fields are "live" fields and we need to make a query to
531
        the cluster nodes.
532
      </para>
533

    
534
      <para>
535
        Depending on the virtualization type and implementation
536
        details, the mtotal, mnode and mfree may have slighly varying
537
        meanings. For example, some solutions share the node memory
538
        with the pool of memory used for instances
539
        (<acronym>KVM</acronym>), whereas others have separate memory
540
        for the node and for the instances (Xen).
541
      </para>
542

    
543
      <para>
544
        If no node names are given, then all nodes are
545
        queried. Otherwise, only the given nodes will be listed.
546
      </para>
547
    </refsect2>
548

    
549
    <refsect2>
550
      <title>LIST-TAGS</title>
551

    
552
      <cmdsynopsis>
553
        <command>list-tags</command>
554
        <arg choice="req"><replaceable>nodename</replaceable></arg>
555
      </cmdsynopsis>
556

    
557
      <para>List the tags of the given node.</para>
558
    </refsect2>
559

    
560
    <refsect2>
561
      <title>MIGRATE</title>
562
      <cmdsynopsis>
563
        <command>migrate</command>
564
        <arg>-f</arg>
565
        <arg>--non-live</arg>
566
        <arg choice="req"><replaceable>node</replaceable></arg>
567
      </cmdsynopsis>
568

    
569
      <para>
570
        This command will migrate all instances having the given
571
        node as primary to their secondary nodes. This works only for
572
        instances having a drbd disk template.
573
      </para>
574

    
575
      <para>
576
        As for the <command>gnt-instance migrate</command> command,
577
        the <option>--no-live</option> option can be given to do a
578
        non-live migration.
579
      </para>
580

    
581
      <para>
582
        Example:
583
        <screen>
584
          # gnt-node migrate node1.example.com
585
        </screen>
586
      </para>
587

    
588
    </refsect2>
589

    
590
    <refsect2>
591
      <title>MODIFY</title>
592
      <cmdsynopsis>
593
        <command>modify</command>
594
        <arg>-f</arg>
595
        <arg>--submit</arg>
596
        <arg>--master-candidate=<option>yes|no</option></arg>
597
        <arg>--drained=<option>yes|no</option></arg>
598
        <arg>--offline=<option>yes|no</option></arg>
599
        <arg choice="req"><replaceable>node</replaceable></arg>
600
      </cmdsynopsis>
601

    
602
      <para>
603
        This command changes the role of the node. Each options takes
604
        either a literal <literal>yes</literal> or
605
        <literal>no</literal>, and only one option should be given as
606
        <literal>yes</literal>. The meaning of the roles are described
607
        in the manpage <citerefentry>
608
        <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
609
        </citerefentry>.
610
      </para>
611

    
612
      <para>
613
        In case a node is demoted from the master candidate role, but
614
        there are not enough new nodes for this case, the operation
615
        will be refused. To override this check, pass the
616
        <option>--force</option> option.
617
      </para>
618

    
619
      <para>
620
        Example (setting a node offline, which will demote it from
621
        master candidate role if is in that role):
622
        <screen>
623
# gnt-node modify --offline=yes node1.example.com
624
        </screen>
625
      </para>
626

    
627
      <para>Example (setting the node back to online and master candidate):
628
        <screen>
629
# gnt-node modify --offline=no --master-candidate=yes node1.example.com
630
        </screen>
631
      </para>
632

    
633
    </refsect2>
634

    
635
    <refsect2>
636
      <title>REMOVE</title>
637

    
638
      <cmdsynopsis>
639
        <command>remove</command>
640
        <arg choice="req"><replaceable>nodename</replaceable></arg>
641
      </cmdsynopsis>
642

    
643
      <para>
644
        Removes a node from the cluster. Instances must be removed or
645
        migrated to another cluster before.
646
      </para>
647

    
648
      <para>
649
        Example:
650
        <screen>
651
# gnt-node remove node5.example.com
652
        </screen>
653
      </para>
654
    </refsect2>
655

    
656
    <refsect2>
657
      <title>REMOVE-TAGS</title>
658
      <cmdsynopsis>
659
        <command>remove-tags</command>
660
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
661
        <arg choice="req"><replaceable>nodename</replaceable></arg>
662
        <arg choice="req"
663
        rep="repeat"><replaceable>tag</replaceable></arg>
664
      </cmdsynopsis>
665

    
666
      <para>
667
        Remove tags from the given node. If any of the tags are not
668
        existing on the node, the entire operation will abort.
669
      </para>
670

    
671
      <para>
672
        If the <option>--from</option> option is given, the list of
673
        tags will be extended with the contents of that file (each
674
        line becomes a tag). In this case, there is not need to pass
675
        tags on the command line (if you do, both sources will be
676
        used). A file name of - will be interpreted as stdin.
677
      </para>
678
    </refsect2>
679

    
680
    <refsect2>
681
      <title>VOLUMES</title>
682

    
683
      <cmdsynopsis>
684
        <command>volumes</command>
685
        <arg>--no-headers</arg>
686
        <arg>--human-readable</arg>
687
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
688
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
689
        <sbr>
690
        <arg rep="repeat"><replaceable>node</replaceable></arg>
691
      </cmdsynopsis>
692

    
693
      <para>
694
        Lists all logical volumes and their physical disks from the node(s)
695
        provided.
696
      </para>
697

    
698
      <para>
699
        The <option>--no-headers</option> option will skip the initial
700
        header line. The <option>--separator</option> option takes an
701
        argument which denotes what will be used between the output
702
        fields. Both these options are to help scripting.
703
      </para>
704

    
705
      <para>
706
        The units used to display the numeric values in the output
707
        varies, depending on the options given. By default, the values
708
        will be formatted in the most appropriate unit. If the
709
        <option>--separator</option> option is given, then the values
710
        are shown in mebibytes to allow parsing by scripts. In both
711
        cases, the <option>--units</option> option can be used to
712
        enforce a given output unit.
713
      </para>
714

    
715
      <para>
716
        The <option>-o</option> option takes a comma-separated list of
717
        output fields. The available fields and their meaning are:
718
        <variablelist>
719
          <varlistentry>
720
            <term>node</term>
721
            <listitem>
722
              <simpara>the node name on which the volume exists</simpara>
723
            </listitem>
724
          </varlistentry>
725
          <varlistentry>
726
            <term>phys</term>
727
            <listitem>
728
              <simpara>the physical drive (on which the LVM physical
729
              volume lives)</simpara>
730
            </listitem>
731
          </varlistentry>
732
          <varlistentry>
733
            <term>vg</term>
734
            <listitem>
735
              <simpara>the volume group name</simpara>
736
            </listitem>
737
          </varlistentry>
738
          <varlistentry>
739
            <term>name</term>
740
            <listitem>
741
              <simpara>the logical volume name</simpara>
742
            </listitem>
743
          </varlistentry>
744
          <varlistentry>
745
            <term>size</term>
746
            <listitem>
747
              <simpara>the logical volume size</simpara>
748
            </listitem>
749
          </varlistentry>
750
          <varlistentry>
751
            <term>instance</term>
752
            <listitem>
753
              <simpara>The name of the instance to which this volume
754
              belongs, or (in case it's an orphan volume) the
755
              character <quote>-</quote></simpara>
756
            </listitem>
757
          </varlistentry>
758
        </variablelist>
759
      </para>
760

    
761
      <para>
762
        Example:
763
        <screen>
764
# gnt-node volumes node5.example.com
765
Node              PhysDev   VG    Name                                 Size Instance
766
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
767
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
768
        </screen>
769
      </para>
770
    </refsect2>
771

    
772
    <refsect2>
773
      <title>LIST-STORAGE</title>
774

    
775
      <cmdsynopsis>
776
        <command>list-storage</command>
777
        <arg>--no-headers</arg>
778
        <arg>--human-readable</arg>
779
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
780
        <arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg>
781
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
782
        <sbr>
783
        <arg rep="repeat"><replaceable>node</replaceable></arg>
784
      </cmdsynopsis>
785

    
786
      <para>
787
        Lists the available storage units and their details for the
788
        given node(s).
789
      </para>
790

    
791
      <para>
792
        The <option>--no-headers</option> option will skip the initial header
793
        line. The <option>--separator</option> option takes an argument which
794
        denotes what will be used between the output fields. Both these options
795
        are to help scripting.
796
      </para>
797

    
798
      <para>
799
        The units used to display the numeric values in the output varies,
800
        depending on the options given. By default, the values will be
801
        formatted in the most appropriate unit. If the
802
        <option>--separator</option> option is given, then the values are shown
803
        in mebibytes to allow parsing by scripts. In both cases, the
804
        <option>--units</option> option can be used to enforce a given output
805
        unit.
806
      </para>
807

    
808
      <para>
809
        The <option>--storage-type</option> option can be used to choose a
810
        storage unit type. Possible choices are <literal>lvm-pv</literal>,
811
        <literal>lvm-vg</literal> or <literal>file</literal>.
812
      </para>
813

    
814
      <para>
815
        The <option>-o</option> option takes a comma-separated list of
816
        output fields. The available fields and their meaning are:
817
        <variablelist>
818
          <varlistentry>
819
            <term>node</term>
820
            <listitem>
821
              <simpara>the node name on which the volume exists</simpara>
822
            </listitem>
823
          </varlistentry>
824
          <varlistentry>
825
            <term>type</term>
826
            <listitem>
827
              <simpara>the type of the storage unit (currently just
828
              what is passed in via
829
              <option>--storage-type</option>)</simpara>
830
            </listitem>
831
          </varlistentry>
832
          <varlistentry>
833
            <term>name</term>
834
            <listitem>
835
              <simpara>the path/identifier of the storage unit</simpara>
836
            </listitem>
837
          </varlistentry>
838
          <varlistentry>
839
            <term>size</term>
840
            <listitem>
841
              <simpara>
842
                total size of the unit; for the file type see a note below
843
              </simpara>
844
            </listitem>
845
          </varlistentry>
846
          <varlistentry>
847
            <term>used</term>
848
            <listitem>
849
              <simpara>
850
                used space in the unit; for the file type see a note below
851
              </simpara>
852
            </listitem>
853
          </varlistentry>
854
          <varlistentry>
855
            <term>free</term>
856
            <listitem>
857
              <simpara>
858
                available disk space
859
              </simpara>
860
            </listitem>
861
          </varlistentry>
862
          <varlistentry>
863
            <term>allocatable</term>
864
            <listitem>
865
              <simpara>
866
                whether we the unit is available for allocation
867
                (only <literal>lvm-pv</literal> can change this
868
                setting, the other types always report true)
869
              </simpara>
870
            </listitem>
871
          </varlistentry>
872
        </variablelist>
873
      </para>
874

    
875
      <para>
876
        Note that for the <quote>file</quote> type, the total disk
877
        space might not equal to the sum of used and free, due to the
878
        method Ganeti uses to compute each of them. The total and free
879
        values are computed as the total and free space values for the
880
        filesystem to which the directory belongs, but the used space
881
        is computed from the used space under that directory
882
        <emphasis>only</emphasis>, which might not be necessarily the
883
        root of the filesystem, and as such there could be files
884
        outside the file storage directory using disk space and
885
        causing a mismatch in the values.
886
      </para>
887

    
888
      <para>
889
        Example:
890
        <screen>
891
node1# gnt-node list-storage node2
892
Node  Type   Name        Size Used   Free Allocatable
893
node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y
894
node2 lvm-pv /dev/sdb1 698.6G   0M 698.6G Y
895
        </screen>
896
      </para>
897
    </refsect2>
898

    
899
    <refsect2>
900
      <title>MODIFY-STORAGE</title>
901

    
902
      <cmdsynopsis>
903
        <command>modify-storage</command>
904
        <arg><option>--allocatable=yes|no</option></arg>
905
        <sbr>
906
        <arg choice="req"><replaceable>node</replaceable></arg>
907
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
908
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
909
      </cmdsynopsis>
910

    
911
      <para>
912
        Modifies storage volumes on a node. Only LVM physical volumes
913
        can be modified at the moment. They have a storage type
914
        of <quote>lvm-pv</quote>.
915
      </para>
916

    
917
      <para>
918
        Example:
919
        <screen>
920
# gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
921
        </screen>
922
      </para>
923
    </refsect2>
924

    
925
    <refsect2>
926
      <title>REPAIR-STORAGE</title>
927

    
928
      <cmdsynopsis>
929
        <command>repair-storage</command>
930
        <arg>--ignore-consistency</arg>
931
        <arg choice="req"><replaceable>node</replaceable></arg>
932
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
933
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
934
      </cmdsynopsis>
935

    
936
      <para>
937
        Repairs a storage volume on a node. Only LVM volume groups can
938
        be repaired at this time. They have the storage type
939
        <quote>lvm-vg</quote>.
940
      </para>
941

    
942
      <para>
943
        On LVM volume groups, <command>repair-storage</command> runs
944
        <quote>vgreduce --removemissing</quote>.
945
      </para>
946

    
947
      <caution>
948
        <para>
949
          Running this command can lead to data loss. Use it with care.
950
        </para>
951
      </caution>
952

    
953
      <para>
954
        The <option>--ignore-consistency</option> option will ignore
955
        any inconsistent disks (on the nodes paired with this
956
        one). Use of this option is most likely to lead to data-loss.
957
      </para>
958

    
959
      <para>
960
        Example:
961
        <screen>
962
# gnt-node repair-storage node5.example.com lvm-vg xenvg
963
        </screen>
964
      </para>
965
    </refsect2>
966

    
967
    <refsect2>
968
      <title>POWERCYCLE</title>
969

    
970
      <cmdsynopsis>
971
        <command>powercycle</command>
972
        <arg><option>--confirm</option></arg>
973
        <arg><option>--force</option></arg>
974
        <arg choice="req"><replaceable>node</replaceable></arg>
975
      </cmdsynopsis>
976

    
977
      <para>
978
        This commands (tries to) forcefully reboot a node. It is a
979
        command that can be used if the node environemnt is broken,
980
        such that the admin can no longer login over ssh, but the
981
        ganeti node daemon is still working.
982
      </para>
983

    
984
      <para>
985
        Note that this command is not guaranteed to work; it depends
986
        on the hypervisor how effective is the reboot attempt. For
987
        Linux, this command require that the kernel option
988
        <literal>CONFIG_MAGIC_SYSRQ</literal> is enabled.
989
      </para>
990

    
991
      <para>
992
        The <option>--yes</option> option can be used to skip
993
        confirmation, while the <option>--force</option> option is
994
        needed if the target node is the master node.
995
      </para>
996

    
997
  </refsect1>
998

    
999
  &footer;
1000

    
1001
</refentry>
1002

    
1003
<!-- Keep this comment at the end of the file
1004
Local variables:
1005
mode: sgml
1006
sgml-omittag:t
1007
sgml-shorttag:t
1008
sgml-minimize-attributes:nil
1009
sgml-always-quote-attributes:t
1010
sgml-indent-step:2
1011
sgml-indent-data:t
1012
sgml-parent-document:nil
1013
sgml-default-dtd-file:nil
1014
sgml-exposed-tags:nil
1015
sgml-local-catalogs:nil
1016
sgml-local-ecat-files:nil
1017
End:
1018
-->