gnt-node.sgml 15.7 KB
Newer Older
Iustin Pop's avatar
Iustin Pop committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [

  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
  <!-- Please adjust the date whenever revising the manpage. -->
  <!ENTITY dhdate      "<date>June 20, 2007</date>">
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
       allowed: see man(7), man(1). -->
  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
  <!ENTITY dhucpackage "<refentrytitle>gnt-node</refentrytitle>">
  <!ENTITY dhpackage   "gnt-node">

  <!ENTITY debian      "<productname>Debian</productname>">
  <!ENTITY gnu         "<acronym>GNU</acronym>">
  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
  <!ENTITY footer SYSTEM "footer.sgml">
]>

<refentry>
  <refentryinfo>
    <copyright>
      <year>2006</year>
      <year>2007</year>
23
      <year>2008</year>
Iustin Pop's avatar
Iustin Pop committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
      <holder>Google Inc.</holder>
    </copyright>
    &dhdate;
  </refentryinfo>
  <refmeta>
    &dhucpackage;

    &dhsection;
    <refmiscinfo>ganeti 1.2</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>&dhpackage;</refname>

    <refpurpose>node administration</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dhpackage; </command>

      <arg choice="req">command</arg>
      <arg>arguments...</arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>

    <para>
      The <command>&dhpackage;</command> is used for managing the
      (physical) nodes in the ganeti system.
    </para>

  </refsect1>
  <refsect1>
    <title>COMMANDS</title>

    <refsect2>
      <title>ADD</title>

      <cmdsynopsis>
        <command>add</command>
64
        <arg>--readd</arg>
Iustin Pop's avatar
Iustin Pop committed
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
        <arg>-s <replaceable>secondary_ip</replaceable></arg>
        <arg choice="req"><replaceable>nodename</replaceable></arg>
      </cmdsynopsis>

      <para>
        Adds the given node to the cluster.
      </para>

      <para>
        This command is used to join a new node to the cluster. You
        will have to provide the password for root of the node to be
        able to add the node in the cluster. The command needs to be
        run on the ganeti master.
      </para>

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

      <para>
        The <option>-s</option> is used in dual-home clusters and
        specifies the new node's IP in the secondary network. See the
        discussion in <citerefentry>
        <refentrytitle>gnt-cluster</refentrytitle>
        <manvolnum>8</manvolnum> </citerefentry> for more
        informations.
      </para>

96 97 98 99 100
      <para>
        In case you're readding a node after hardware failure, you
        can use the <option>--readd</option> parameter.
      </para>

Iustin Pop's avatar
Iustin Pop committed
101 102 103 104 105 106 107 108 109
      <para>
        Example:
        <screen>
# gnt-node add node5.example.com
# gnt-node add -s 192.168.44.5 node5.example.com
        </screen>
      </para>
    </refsect2>

110 111 112 113 114
    <refsect2>
      <title>ADD-TAGS</title>

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

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

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

Iustin Pop's avatar
Iustin Pop committed
135 136 137 138 139 140 141 142 143 144 145 146 147 148
    <refsect2>
      <title>EVACUATE</title>

      <cmdsynopsis>
        <command>evacuate</command>
        <arg>-f</arg>
        <arg choice="req"><replaceable>source_node</replaceable></arg>
        <arg choice="req"><replaceable>destination_node</replaceable></arg>
      </cmdsynopsis>

      <para>
        This command will change the secondary node from the source
        node to the destination node for all instances having the
        source node as secondary. It works only for instances having
149
        a remote_raid1 or drbd disk layout.
Iustin Pop's avatar
Iustin Pop committed
150 151 152 153 154 155 156 157 158 159
      </para>

      <para>
        Example:
        <screen>
          # gnt-node evacuate node1.example.com node2.example.com
        </screen>
      </para>
    </refsect2>

Iustin Pop's avatar
Iustin Pop committed
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
    <refsect2>
      <title>FAILOVER</title>

      <cmdsynopsis>
        <command>failover</command>
        <arg>-f</arg>
        <arg>--ignore-consistency</arg>
        <arg choice="req"><replaceable>node</replaceable></arg>
      </cmdsynopsis>

      <para>
        This command will fail over all instances having the given
        node as primary to their secondary nodes. This works only for
        instances having a remote raid disk layout.
      </para>

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

      <para>
        Example:
        <screen>
          # gnt-node failover node1.example.com
        </screen>
      </para>
    </refsect2>

Iustin Pop's avatar
Iustin Pop committed
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
    <refsect2>
      <title>INFO</title>

      <cmdsynopsis>
        <command>info</command>
        <arg rep="repeat"><replaceable>node</replaceable></arg>
      </cmdsynopsis>

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

    <refsect2>
      <title>LIST</title>

      <cmdsynopsis>
        <command>list</command>
        <arg>--no-headers</arg>
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
        <arg>-o <replaceable>FIELD,...</replaceable></arg>
      </cmdsynopsis>

      <para>
        Lists the nodes in the cluster. If you give the
        <option>--ip-info</option> option, the output contains just
        the node name, primary ip and secondary ip. In case the
        secondary ip is the same as the primary one, it will be listed
        as <emphasis>"-"</emphasis>.
      </para>

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

      <para>
        The <option>-o</option> option takes a comma-separated list of
        output fields. The available fields and their meaning are:
        <variablelist>
          <varlistentry>
            <term>name</term>
            <listitem>
              <simpara>the node name</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
242
            <term>pinst_cnt</term>
Iustin Pop's avatar
Iustin Pop committed
243 244 245 246 247 248
            <listitem>
              <simpara>the number of instances having this node as
              primary</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
249 250 251 252 253 254 255 256
            <term>pinst_list</term>
            <listitem>
              <simpara>the list of instances having this node as
              primary, comma separated</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>sinst_cnt</term>
Iustin Pop's avatar
Iustin Pop committed
257 258 259 260 261
            <listitem>
              <simpara>the number of instances having this node as a
              secondary node</simpara>
            </listitem>
          </varlistentry>
262 263 264 265 266 267 268
          <varlistentry>
            <term>sinst_list</term>
            <listitem>
              <simpara>the list of instances having this node as a
              secondary node, comma separated</simpara>
            </listitem>
          </varlistentry>
Iustin Pop's avatar
Iustin Pop committed
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
          <varlistentry>
            <term>pip</term>
            <listitem>
              <simpara>the primary ip of this node (used for cluster
              communication)</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>sip</term>
            <listitem>
              <simpara>
                the secondary ip of this node (used for data
                replication in dual-ip clusters, see <citerefentry>
                <refentrytitle>gnt-cluster</refentrytitle>
                <manvolnum>8</manvolnum>
                </citerefentry>
              </simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>dtotal</term>
            <listitem>
              <simpara>total disk space in the volume group used for
              instance disk allocations</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>dfree</term>
            <listitem>
              <simpara>available disk space in the volume group</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>mtotal</term>
            <listitem>
              <simpara>total memory on the physical node</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>mnode</term>
            <listitem>
              <simpara>the memory used by the node itself</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>mfree</term>
            <listitem>
              <simpara>memory available for instance
              allocations</simpara>
            </listitem>
          </varlistentry>
320 321 322 323 324 325 326 327 328
          <varlistentry>
            <term>bootid</term>
            <listitem>
              <simpara>the node bootid value; this is a linux specific
              feature that assigns a new UUID to the node at each boot
              and can be use to detect node reboots (by tracking
              changes in this value)</simpara>
            </listitem>
          </varlistentry>
Iustin Pop's avatar
Iustin Pop committed
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
        </variablelist>
      </para>

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

      <para>
        Depending on the virtualization type and implementation
        details, the mtotal, mnode and mfree may have slighly varying
        meanings. For example, some solutions share the node memory
        with the pool of memory used for instances
        (<acronym>UML</acronym>), whereas others have separate memory
        for the node and for the instances (Xen).
      </para>
    </refsect2>

354 355 356 357 358 359 360 361 362 363 364
    <refsect2>
      <title>LIST-TAGS</title>

      <cmdsynopsis>
        <command>list-tags</command>
        <arg choice="req"><replaceable>nodename</replaceable></arg>
      </cmdsynopsis>

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

Iustin Pop's avatar
Iustin Pop committed
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385
    <refsect2>
      <title>REMOVE</title>

      <cmdsynopsis>
        <command>remove</command>
        <arg choice="req"><replaceable>nodename</replaceable></arg>
      </cmdsynopsis>

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

      <para>
        Example:
        <screen>
# gnt-node remove node5.example.com
        </screen>
      </para>
    </refsect2>

386 387 388 389
    <refsect2>
      <title>REMOVE-TAGS</title>
      <cmdsynopsis>
        <command>remove-tags</command>
390
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
391 392 393 394 395 396 397 398 399
        <arg choice="req"><replaceable>nodename</replaceable></arg>
        <arg choice="req"
        rep="repeat"><replaceable>tag</replaceable></arg>
      </cmdsynopsis>

      <para>
        Remove tags from the given node. If any of the tags are not
        existing on the node, the entire operation will abort.
      </para>
400 401 402 403 404 405 406 407

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

410 411 412 413 414
    <refsect2>
      <title>VOLUMES</title>

      <cmdsynopsis>
        <command>volumes</command>
Iustin Pop's avatar
Iustin Pop committed
415 416 417 418 419
        <arg>--no-headers</arg>
        <arg>--human-readable</arg>
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
        <sbr>
420 421 422 423 424 425 426 427
        <arg rep="repeat"><replaceable>node</replaceable></arg>
      </cmdsynopsis>

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

Iustin Pop's avatar
Iustin Pop committed
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
      <para>
        The <option>--no-headers</option> option will skip the initial
        header line. The <option>--separator</option> option takes an
        argument which denotes what will be used between the output
        fields. Both these options are to help scripting.
      </para>

      <para>
        The <option>-o</option> option takes a comma-separated list of
        output fields. The available fields and their meaning are:
        <variablelist>
          <varlistentry>
            <term>node</term>
            <listitem>
              <simpara>the node name on which the volume exists</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>phys</term>
            <listitem>
              <simpara>the physical drive (on which the LVM physical
              volume lives)</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>vg</term>
            <listitem>
              <simpara>the volume group name</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>name</term>
            <listitem>
              <simpara>the logical volume name</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>size</term>
            <listitem>
              <simpara>the logical volume size</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>instance</term>
            <listitem>
              <simpara>The name of the instance to which this volume
              belongs, or (in case it's an orphan volume) the
              character <quote>-</quote></simpara>
            </listitem>
          </varlistentry>
        </variablelist>
      </para>

481 482 483 484 485 486 487 488 489 490 491
      <para>
        Example:
        <screen>
# gnt-node volumes node5.example.com
Node              PhysDev   VG    Name                                 Size Instance
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
        </screen>
      </para>
    </refsect2>

Iustin Pop's avatar
Iustin Pop committed
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
  </refsect1>

  &footer;

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->