Statistics
| Branch: | Tag: | Revision:

root / man / gnt-node.sgml @ 9b94905f

History | View | Annotate | Download (31.3 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
        <group>
147
          <arg>--iallocator <replaceable>NAME</replaceable></arg>
148
          <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
149
        </group>
150
        <arg choice="req"><replaceable>node</replaceable></arg>
151
      </cmdsynopsis>
152

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

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

    
175
      <para>
176
        Example:
177
        <screen>
178
          # gnt-node evacuate -I dumb node3.example.com
179
        </screen>
180
      </para>
181
    </refsect2>
182

    
183
    <refsect2>
184
      <title>FAILOVER</title>
185

    
186
      <cmdsynopsis>
187
        <command>failover</command>
188
        <arg>-f</arg>
189
        <arg>--ignore-consistency</arg>
190
        <arg choice="req"><replaceable>node</replaceable></arg>
191
      </cmdsynopsis>
192

    
193
      <para>
194
        This command will fail over all instances having the given
195
        node as primary to their secondary nodes. This works only for
196
        instances having a drbd disk template.
197
      </para>
198

    
199
      <para>
200
        Normally the failover will check the consistency of the disks
201
        before failing over the instance. If you are trying to migrate
202
        instances off a dead node, this will fail. Use the
203
        <option>--ignore-consistency</option> option for this purpose.
204
      </para>
205

    
206
      <para>
207
        Example:
208
        <screen>
209
          # gnt-node failover node1.example.com
210
        </screen>
211
      </para>
212
    </refsect2>
213

    
214
    <refsect2>
215
      <title>INFO</title>
216

    
217
      <cmdsynopsis>
218
        <command>info</command>
219
        <arg rep="repeat"><replaceable>node</replaceable></arg>
220
      </cmdsynopsis>
221

    
222
      <para>
223
        Show detailed information about the nodes in the cluster. If you
224
        don't give any arguments, all nodes will be shows, otherwise the
225
        output will be restricted to the given names.
226
      </para>
227
    </refsect2>
228

    
229
    <refsect2>
230
      <title>LIST</title>
231

    
232
      <cmdsynopsis>
233
        <command>list</command>
234
        <arg>--sync</arg>
235
        <sbr>
236
        <arg>--no-headers</arg>
237
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
238
        <sbr>
239
        <arg>--units=<replaceable>UNITS</replaceable></arg>
240
        <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
241
        <sbr>
242
        <arg rep="repeat">node</arg>
243
      </cmdsynopsis>
244

    
245
      <para>
246
        Lists the nodes in the cluster.
247
      </para>
248

    
249
      <para>
250
        The <option>--no-headers</option> option will skip the initial
251
        header line. The <option>--separator</option> option takes an
252
        argument which denotes what will be used between the output
253
        fields. Both these options are to help scripting.
254
      </para>
255

    
256
      <para>
257
        The units used to display the numeric values in the output
258
        varies, depending on the options given. By default, the values
259
        will be formatted in the most appropriate unit. If the
260
        <option>--separator</option> option is given, then the values
261
        are shown in mebibytes to allow parsing by scripts. In both
262
        cases, the <option>--units</option> option can be used to
263
        enforce a given output unit.
264
      </para>
265

    
266
      <para>
267
        By default, the query of nodes will be done in parallel with
268
        any running jobs. This might give inconsistent results for the
269
        free disk/memory. The <option>--sync</option> can be used to
270
        grab locks for all the nodes and ensure consistent view of the
271
        cluster (but this might stall the query for a long time).
272
      </para>
273

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

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

    
500
      <para>
501
        If the value of the option starts with the character
502
        <constant>+</constant>, the new fields will be added to the
503
        default list. This allows to quickly see the default list plus
504
        a few other fields, instead of retyping the entire list of
505
        fields.
506
      </para>
507

    
508
      <para>
509
        Note that some of this fields are known from the configuration
510
        of the cluster (e.g. <simplelist type="inline">
511
        <member>name</member> <member>pinst</member>
512
        <member>sinst</member> <member>pip</member>
513
        <member>sip</member> </simplelist> and thus the master does
514
        not need to contact the node for this data (making the listing
515
        fast if only fields from this set are selected), whereas the
516
        other fields are "live" fields and we need to make a query to
517
        the cluster nodes.
518
      </para>
519

    
520
      <para>
521
        Depending on the virtualization type and implementation
522
        details, the mtotal, mnode and mfree may have slighly varying
523
        meanings. For example, some solutions share the node memory
524
        with the pool of memory used for instances
525
        (<acronym>KVM</acronym>), whereas others have separate memory
526
        for the node and for the instances (Xen).
527
      </para>
528

    
529
      <para>
530
        If no node names are given, then all nodes are
531
        queried. Otherwise, only the given nodes will be listed.
532
      </para>
533
    </refsect2>
534

    
535
    <refsect2>
536
      <title>LIST-TAGS</title>
537

    
538
      <cmdsynopsis>
539
        <command>list-tags</command>
540
        <arg choice="req"><replaceable>nodename</replaceable></arg>
541
      </cmdsynopsis>
542

    
543
      <para>List the tags of the given node.</para>
544
    </refsect2>
545

    
546
    <refsect2>
547
      <title>MIGRATE</title>
548
      <cmdsynopsis>
549
        <command>migrate</command>
550
        <arg>-f</arg>
551
        <arg>--non-live</arg>
552
        <arg choice="req"><replaceable>node</replaceable></arg>
553
      </cmdsynopsis>
554

    
555
      <para>
556
        This command will migrate all instances having the given
557
        node as primary to their secondary nodes. This works only for
558
        instances having a drbd disk template.
559
      </para>
560

    
561
      <para>
562
        As for the <command>gnt-instance migrate</command> command,
563
        the <option>--no-live</option> option can be given to do a
564
        non-live migration.
565
      </para>
566

    
567
      <para>
568
        Example:
569
        <screen>
570
          # gnt-node migrate node1.example.com
571
        </screen>
572
      </para>
573

    
574
    </refsect2>
575

    
576
    <refsect2>
577
      <title>MODIFY</title>
578
      <cmdsynopsis>
579
        <command>modify</command>
580
        <arg>-f</arg>
581
        <arg>--submit</arg>
582
        <arg>--master-candidate=<option>yes|no</option></arg>
583
        <arg>--drained=<option>yes|no</option></arg>
584
        <arg>--offline=<option>yes|no</option></arg>
585
        <arg choice="req"><replaceable>node</replaceable></arg>
586
      </cmdsynopsis>
587

    
588
      <para>
589
        This command changes the role of the node. Each options takes
590
        either a literal <literal>yes</literal> or
591
        <literal>no</literal>, and only one option should be given as
592
        <literal>yes</literal>. The meaning of the roles are described
593
        in the manpage <citerefentry>
594
        <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
595
        </citerefentry>.
596
      </para>
597

    
598
      <para>
599
        In case a node is demoted from the master candidate role, but
600
        there are not enough new nodes for this case, the operation
601
        will be refused. To override this check, pass the
602
        <option>--force</option> option.
603
      </para>
604

    
605
      <para>
606
        Example (setting a node offline, which will demote it from
607
        master candidate role if is in that role):
608
        <screen>
609
# gnt-node modify --offline=yes node1.example.com
610
        </screen>
611
      </para>
612

    
613
      <para>Example (setting the node back to online and master candidate):
614
        <screen>
615
# gnt-node modify --offline=no --master-candidate=yes node1.example.com
616
        </screen>
617
      </para>
618

    
619
    </refsect2>
620

    
621
    <refsect2>
622
      <title>REMOVE</title>
623

    
624
      <cmdsynopsis>
625
        <command>remove</command>
626
        <arg choice="req"><replaceable>nodename</replaceable></arg>
627
      </cmdsynopsis>
628

    
629
      <para>
630
        Removes a node from the cluster. Instances must be removed or
631
        migrated to another cluster before.
632
      </para>
633

    
634
      <para>
635
        Example:
636
        <screen>
637
# gnt-node remove node5.example.com
638
        </screen>
639
      </para>
640
    </refsect2>
641

    
642
    <refsect2>
643
      <title>REMOVE-TAGS</title>
644
      <cmdsynopsis>
645
        <command>remove-tags</command>
646
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
647
        <arg choice="req"><replaceable>nodename</replaceable></arg>
648
        <arg choice="req"
649
        rep="repeat"><replaceable>tag</replaceable></arg>
650
      </cmdsynopsis>
651

    
652
      <para>
653
        Remove tags from the given node. If any of the tags are not
654
        existing on the node, the entire operation will abort.
655
      </para>
656

    
657
      <para>
658
        If the <option>--from</option> option is given, the list of
659
        tags will be extended with the contents of that file (each
660
        line becomes a tag). In this case, there is not need to pass
661
        tags on the command line (if you do, both sources will be
662
        used). A file name of - will be interpreted as stdin.
663
      </para>
664
    </refsect2>
665

    
666
    <refsect2>
667
      <title>VOLUMES</title>
668

    
669
      <cmdsynopsis>
670
        <command>volumes</command>
671
        <arg>--no-headers</arg>
672
        <arg>--human-readable</arg>
673
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
674
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
675
        <sbr>
676
        <arg rep="repeat"><replaceable>node</replaceable></arg>
677
      </cmdsynopsis>
678

    
679
      <para>
680
        Lists all logical volumes and their physical disks from the node(s)
681
        provided.
682
      </para>
683

    
684
      <para>
685
        The <option>--no-headers</option> option will skip the initial
686
        header line. The <option>--separator</option> option takes an
687
        argument which denotes what will be used between the output
688
        fields. Both these options are to help scripting.
689
      </para>
690

    
691
      <para>
692
        The units used to display the numeric values in the output
693
        varies, depending on the options given. By default, the values
694
        will be formatted in the most appropriate unit. If the
695
        <option>--separator</option> option is given, then the values
696
        are shown in mebibytes to allow parsing by scripts. In both
697
        cases, the <option>--units</option> option can be used to
698
        enforce a given output unit.
699
      </para>
700

    
701
      <para>
702
        The <option>-o</option> option takes a comma-separated list of
703
        output fields. The available fields and their meaning are:
704
        <variablelist>
705
          <varlistentry>
706
            <term>node</term>
707
            <listitem>
708
              <simpara>the node name on which the volume exists</simpara>
709
            </listitem>
710
          </varlistentry>
711
          <varlistentry>
712
            <term>phys</term>
713
            <listitem>
714
              <simpara>the physical drive (on which the LVM physical
715
              volume lives)</simpara>
716
            </listitem>
717
          </varlistentry>
718
          <varlistentry>
719
            <term>vg</term>
720
            <listitem>
721
              <simpara>the volume group name</simpara>
722
            </listitem>
723
          </varlistentry>
724
          <varlistentry>
725
            <term>name</term>
726
            <listitem>
727
              <simpara>the logical volume name</simpara>
728
            </listitem>
729
          </varlistentry>
730
          <varlistentry>
731
            <term>size</term>
732
            <listitem>
733
              <simpara>the logical volume size</simpara>
734
            </listitem>
735
          </varlistentry>
736
          <varlistentry>
737
            <term>instance</term>
738
            <listitem>
739
              <simpara>The name of the instance to which this volume
740
              belongs, or (in case it's an orphan volume) the
741
              character <quote>-</quote></simpara>
742
            </listitem>
743
          </varlistentry>
744
        </variablelist>
745
      </para>
746

    
747
      <para>
748
        Example:
749
        <screen>
750
# gnt-node volumes node5.example.com
751
Node              PhysDev   VG    Name                                 Size Instance
752
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
753
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
754
        </screen>
755
      </para>
756
    </refsect2>
757

    
758
    <refsect2>
759
      <title>LIST-STORAGE</title>
760

    
761
      <cmdsynopsis>
762
        <command>list-storage</command>
763
        <arg>--no-headers</arg>
764
        <arg>--human-readable</arg>
765
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
766
        <arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg>
767
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
768
        <sbr>
769
        <arg rep="repeat"><replaceable>node</replaceable></arg>
770
      </cmdsynopsis>
771

    
772
      <para>
773
        Lists the available storage units and their details for the
774
        given node(s).
775
      </para>
776

    
777
      <para>
778
        The <option>--no-headers</option> option will skip the initial header
779
        line. The <option>--separator</option> option takes an argument which
780
        denotes what will be used between the output fields. Both these options
781
        are to help scripting.
782
      </para>
783

    
784
      <para>
785
        The units used to display the numeric values in the output varies,
786
        depending on the options given. By default, the values will be
787
        formatted in the most appropriate unit. If the
788
        <option>--separator</option> option is given, then the values are shown
789
        in mebibytes to allow parsing by scripts. In both cases, the
790
        <option>--units</option> option can be used to enforce a given output
791
        unit.
792
      </para>
793

    
794
      <para>
795
        The <option>--storage-type</option> option can be used to choose a
796
        storage unit type. Possible choices are <literal>lvm-pv</literal>,
797
        <literal>lvm-vg</literal> or <literal>file</literal>. Depending on the
798
        storage type, the available output fields change.
799
      </para>
800

    
801
      <para>
802
        The <option>-o</option> option takes a comma-separated list of
803
        output fields. The available fields and their meaning are:
804
        <variablelist>
805
          <varlistentry>
806
            <term>node</term>
807
            <listitem>
808
              <simpara>the node name on which the volume exists</simpara>
809
            </listitem>
810
          </varlistentry>
811
          <varlistentry>
812
            <term>name</term>
813
            <listitem>
814
              <simpara>the physical drive name</simpara>
815
            </listitem>
816
          </varlistentry>
817
          <varlistentry>
818
            <term>size</term>
819
            <listitem>
820
              <simpara>
821
                the physical drive size
822
                (<literal>lvm-pv</literal> and <literal>lvm-vg</literal> only)
823
              </simpara>
824
            </listitem>
825
          </varlistentry>
826
          <varlistentry>
827
            <term>used</term>
828
            <listitem>
829
              <simpara>
830
                used disk space
831
                (<literal>lvm-pv</literal> and <literal>file</literal> only)
832
              </simpara>
833
            </listitem>
834
          </varlistentry>
835
          <varlistentry>
836
            <term>free</term>
837
            <listitem>
838
              <simpara>
839
                available disk space
840
                (<literal>lvm-pv</literal> and <literal>file</literal> only)
841
              </simpara>
842
            </listitem>
843
          </varlistentry>
844
          <varlistentry>
845
            <term>allocatable</term>
846
            <listitem>
847
              <simpara>
848
                whether physical volume is allocatable
849
                (<literal>lvm-pv</literal> only)
850
              </simpara>
851
            </listitem>
852
          </varlistentry>
853
        </variablelist>
854
      </para>
855

    
856
      <para>
857
        Example:
858
        <screen>
859
# gnt-node list-storage node5.example.com
860
Node              Name        Size Used   Free
861
node5.example.com /dev/sda7 673.8G   0M 673.8G
862
node5.example.com /dev/sdb1 698.6G 1.3G 697.4G
863
        </screen>
864
      </para>
865
    </refsect2>
866

    
867
    <refsect2>
868
      <title>MODIFY-STORAGE</title>
869

    
870
      <cmdsynopsis>
871
        <command>modify-storage</command>
872
        <arg><option>--allocatable=yes|no</option></arg>
873
        <sbr>
874
        <arg><replaceable>node</replaceable></arg>
875
        <arg><replaceable>storage-type</replaceable></arg>
876
        <arg><replaceable>volume-name</replaceable></arg>
877
      </cmdsynopsis>
878

    
879
      <para>
880
        Modifies storage volumes on a node. Only LVM physical volumes
881
        can be modified at the moment. They have a storage type
882
        of <quote>lvm-pv</quote>.
883
      </para>
884

    
885
      <para>
886
        Example:
887
        <screen>
888
# gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
889
        </screen>
890
      </para>
891
    </refsect2>
892

    
893
    <refsect2>
894
      <title>REPAIR-STORAGE</title>
895

    
896
      <cmdsynopsis>
897
        <command>repair-storage</command>
898
        <arg><replaceable>node</replaceable></arg>
899
        <arg><replaceable>storage-type</replaceable></arg>
900
        <arg><replaceable>volume-name</replaceable></arg>
901
      </cmdsynopsis>
902

    
903
      <para>
904
        Repairs a storage volume on a node. Only LVM volume groups can
905
        be repaired at this time. They have the storage type
906
        <quote>lvm-vg</quote>.
907
      </para>
908

    
909
      <para>
910
        On LVM volume groups, <command>repair-volume</command> runs
911
        <quote>vgreduce --removemissing</quote>.
912
      </para>
913

    
914
      <caution>
915
        <para>
916
          Running this command can lead to data loss. Use it with care.
917
        </para>
918
      </caution>
919

    
920
      <para>
921
        Example:
922
        <screen>
923
# gnt-node repair-storage node5.example.com lvm-vg xenvg
924
        </screen>
925
      </para>
926
    </refsect2>
927

    
928
    <refsect2>
929
      <title>POWERCYCLE</title>
930

    
931
      <cmdsynopsis>
932
        <command>powercycle</command>
933
        <arg><option>--confirm</option></arg>
934
        <arg><option>--force</option></arg>
935
        <arg choice="req"><replaceable>node</replaceable></arg>
936
      </cmdsynopsis>
937

    
938
      <para>
939
        This commands (tries to) forcefully reboot a node. It is a
940
        command that can be used if the node environemnt is broken,
941
        such that the admin can no longer login over ssh, but the
942
        ganeti node daemon is still working.
943
      </para>
944

    
945
      <para>
946
        Note that this command is not guaranteed to work; it depends
947
        on the hypervisor how effective is the reboot attempt. For
948
        Linux, this command require that the kernel option
949
        <literal>CONFIG_MAGIC_SYSRQ</literal> is enabled.
950
      </para>
951

    
952
      <para>
953
        The <option>--yes</option> option can be used to skip
954
        confirmation, while the <option>--force</option> option is
955
        needed if the target node is the master node.
956
      </para>
957

    
958
  </refsect1>
959

    
960
  &footer;
961

    
962
</refentry>
963

    
964
<!-- Keep this comment at the end of the file
965
Local variables:
966
mode: sgml
967
sgml-omittag:t
968
sgml-shorttag:t
969
sgml-minimize-attributes:nil
970
sgml-always-quote-attributes:t
971
sgml-indent-step:2
972
sgml-indent-data:t
973
sgml-parent-document:nil
974
sgml-default-dtd-file:nil
975
sgml-exposed-tags:nil
976
sgml-local-catalogs:nil
977
sgml-local-ecat-files:nil
978
End:
979
-->