1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
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">
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">
25 <holder>Google Inc.</holder>
33 <refmiscinfo>ganeti 2.0</refmiscinfo>
36 <refname>&dhpackage;</refname>
38 <refpurpose>node administration</refpurpose>
42 <command>&dhpackage; </command>
44 <arg choice="req">command</arg>
45 <arg>arguments...</arg>
49 <title>DESCRIPTION</title>
52 The <command>&dhpackage;</command> is used for managing the
53 (physical) nodes in the ganeti system.
58 <title>COMMANDS</title>
64 <command>add</command>
66 <arg>-s <replaceable>secondary_ip</replaceable></arg>
67 <arg choice="req"><replaceable>nodename</replaceable></arg>
71 Adds the given node to the cluster.
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.
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
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
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
109 # gnt-node add node5.example.com
110 # gnt-node add -s 192.168.44.5 node5.example.com
116 <title>ADD-TAGS</title>
119 <command>add-tags</command>
120 <arg choice="opt">--from <replaceable>file</replaceable></arg>
121 <arg choice="req"><replaceable>nodename</replaceable></arg>
123 rep="repeat"><replaceable>tag</replaceable></arg>
127 Add tags to the given node. If any of the tags contains
128 invalid characters, the entire operation will abort.
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.
141 <title>EVACUATE</title>
144 <command>evacuate</command>
147 <arg>--iallocator <replaceable>NAME</replaceable></arg>
148 <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
150 <arg choice="req"><replaceable>node</replaceable></arg>
154 This command will move all secondary instances away from the
155 given node. It works only for instances having a drbd disk
160 The new location for the instances can be specified in two ways:
163 <simpara>as a single node for all instances, via the
164 <option>--new-secondary</option> option</simpara>
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
178 # gnt-node evacuate -I dumb node3.example.com
184 <title>FAILOVER</title>
187 <command>failover</command>
189 <arg>--ignore-consistency</arg>
190 <arg choice="req"><replaceable>node</replaceable></arg>
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.
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.
209 # gnt-node failover node1.example.com
218 <command>info</command>
219 <arg rep="repeat"><replaceable>node</replaceable></arg>
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.
233 <command>list</command>
236 <arg>--no-headers</arg>
237 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
239 <arg>--units=<replaceable>UNITS</replaceable></arg>
240 <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
242 <arg rep="repeat">node</arg>
246 Lists the nodes in the cluster.
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.
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.
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).
275 The <option>-o</option> option takes a comma-separated list of
276 output fields. The available fields and their meaning are:
281 <simpara>the node name</simpara>
285 <term>pinst_cnt</term>
287 <simpara>the number of instances having this node as
292 <term>pinst_list</term>
294 <simpara>the list of instances having this node as
295 primary, comma separated</simpara>
299 <term>sinst_cnt</term>
301 <simpara>the number of instances having this node as a
302 secondary node</simpara>
306 <term>sinst_list</term>
308 <simpara>the list of instances having this node as a
309 secondary node, comma separated</simpara>
315 <simpara>the primary ip of this node (used for cluster
316 communication)</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>
334 <simpara>total disk space in the volume group used for
335 instance disk allocations</simpara>
341 <simpara>available disk space in the volume group</simpara>
347 <simpara>total memory on the physical node</simpara>
353 <simpara>the memory used by the node itself</simpara>
359 <simpara>memory available for instance
360 allocations</simpara>
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>
375 <simpara>comma-separated list of the node's
380 <term>serial_no</term>
382 <simpara>the so called 'serial number' of the instance;
383 this is a numeric field that is incremented each time
384 the instance is modified, and it can be used to detect
385 modifications</simpara>
391 <simpara>the toal number of logical processors</simpara>
397 <simpara>the number of NUMA domains on the node, if the
398 hypervisor can export this information</simpara>
402 <term>csockets</term>
404 <simpara>the number of physical CPU sockets, if the
405 hypervisor can export this information</simpara>
409 <term>master_candidate</term>
411 <simpara>whether the node is a master candidate or not</simpara>
417 <simpara>whether the node is drained or not</simpara>
423 <simpara>whether the node is offline or not</simpara>
430 If the value of the option starts with the character
431 <constant>+</constant>, the new fields will be added to the
432 default list. This allows to quickly see the default list plus
433 a few other fields, instead of retyping the entire list of
438 Note that some of this fields are known from the configuration
439 of the cluster (e.g. <simplelist type="inline">
440 <member>name</member> <member>pinst</member>
441 <member>sinst</member> <member>pip</member>
442 <member>sip</member> </simplelist> and thus the master does
443 not need to contact the node for this data (making the listing
444 fast if only fields from this set are selected), whereas the
445 other fields are "live" fields and we need to make a query to
450 Depending on the virtualization type and implementation
451 details, the mtotal, mnode and mfree may have slighly varying
452 meanings. For example, some solutions share the node memory
453 with the pool of memory used for instances
454 (<acronym>KVM</acronym>), whereas others have separate memory
455 for the node and for the instances (Xen).
459 If no node names are given, then all nodes are
460 queried. Otherwise, only the given nodes will be listed.
465 <title>LIST-TAGS</title>
468 <command>list-tags</command>
469 <arg choice="req"><replaceable>nodename</replaceable></arg>
472 <para>List the tags of the given node.</para>
476 <title>MIGRATE</title>
478 <command>migrate</command>
480 <arg>--non-live</arg>
481 <arg choice="req"><replaceable>node</replaceable></arg>
485 This command will migrate all instances having the given
486 node as primary to their secondary nodes. This works only for
487 instances having a drbd disk template.
491 As for the <command>gnt-instance migrate</command> command,
492 the <option>--no-live</option> option can be given to do a
499 # gnt-node migrate node1.example.com
506 <title>REMOVE</title>
509 <command>remove</command>
510 <arg choice="req"><replaceable>nodename</replaceable></arg>
514 Removes a node from the cluster. Instances must be removed or
515 migrated to another cluster before.
521 # gnt-node remove node5.example.com
527 <title>REMOVE-TAGS</title>
529 <command>remove-tags</command>
530 <arg choice="opt">--from <replaceable>file</replaceable></arg>
531 <arg choice="req"><replaceable>nodename</replaceable></arg>
533 rep="repeat"><replaceable>tag</replaceable></arg>
537 Remove tags from the given node. If any of the tags are not
538 existing on the node, the entire operation will abort.
542 If the <option>--from</option> option is given, the list of
543 tags will be extended with the contents of that file (each
544 line becomes a tag). In this case, there is not need to pass
545 tags on the command line (if you do, both sources will be
546 used). A file name of - will be interpreted as stdin.
551 <title>VOLUMES</title>
554 <command>volumes</command>
555 <arg>--no-headers</arg>
556 <arg>--human-readable</arg>
557 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
558 <arg>--output=<replaceable>FIELDS</replaceable></arg>
560 <arg rep="repeat"><replaceable>node</replaceable></arg>
564 Lists all logical volumes and their physical disks from the node(s)
569 The <option>--no-headers</option> option will skip the initial
570 header line. The <option>--separator</option> option takes an
571 argument which denotes what will be used between the output
572 fields. Both these options are to help scripting.
576 The units used to display the numeric values in the output
577 varies, depending on the options given. By default, the values
578 will be formatted in the most appropriate unit. If the
579 <option>--separator</option> option is given, then the values
580 are shown in mebibytes to allow parsing by scripts. In both
581 cases, the <option>--units</option> option can be used to
582 enforce a given output unit.
586 The <option>-o</option> option takes a comma-separated list of
587 output fields. The available fields and their meaning are:
592 <simpara>the node name on which the volume exists</simpara>
598 <simpara>the physical drive (on which the LVM physical
599 volume lives)</simpara>
605 <simpara>the volume group name</simpara>
611 <simpara>the logical volume name</simpara>
617 <simpara>the logical volume size</simpara>
621 <term>instance</term>
623 <simpara>The name of the instance to which this volume
624 belongs, or (in case it's an orphan volume) the
625 character <quote>-</quote></simpara>
634 # gnt-node volumes node5.example.com
635 Node PhysDev VG Name Size Instance
636 node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128 instance1.example.com
637 node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256 instance1.example.com
648 <!-- Keep this comment at the end of the file
653 sgml-minimize-attributes:nil
654 sgml-always-quote-attributes:t
657 sgml-parent-document:nil
658 sgml-default-dtd-file:nil
659 sgml-exposed-tags:nil
660 sgml-local-catalogs:nil
661 sgml-local-ecat-files:nil