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>June 08, 2010</date>">
6 <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7 allowed: see man(7), man(1). -->
8 <!ENTITY dhsection "<manvolnum>8</manvolnum>">
9 <!ENTITY dhucpackage "<refentrytitle>gnt-node</refentrytitle>">
10 <!ENTITY dhpackage "gnt-node">
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.2</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>-g <replaceable>nodegroup</replaceable></arg>
68 <arg choice="req"><replaceable>nodename</replaceable></arg>
72 Adds the given node to the cluster.
76 This command is used to join a new node to the cluster. You
77 will have to provide the password for root of the node to be
78 able to add the node in the cluster. The command needs to be
79 run on the Ganeti master.
83 Note that the command is potentially destructive, as it will
84 forcibly join the specified host the cluster, not paying
85 attention to its current status (it could be already in a
90 The <option>-s</option> is used in dual-home clusters and
91 specifies the new node's IP in the secondary network. See the
92 discussion in <citerefentry>
93 <refentrytitle>gnt-cluster</refentrytitle>
94 <manvolnum>8</manvolnum> </citerefentry> for more
99 In case you're readding a node after hardware failure, you can
100 use the <option>--readd</option> parameter. In this case, you
101 don't need to pass the secondary IP again, it will reused from
102 the cluster. Also, the <literal>drained</literal> and
103 <literal>offline</literal> flags of the node will be cleared
108 The <option>-g</option> is used to add the new node into a specific
109 node group, specified by uuid or name. If only one node group exists
110 you can skip this option, otherwise it's mandatory.
116 # gnt-node add node5.example.com
117 # gnt-node add -s 192.0.2.5 node5.example.com
118 # gnt-node add -g group2 -s 192.0.2.9 node9.group2.example.com
124 <title>ADD-TAGS</title>
127 <command>add-tags</command>
128 <arg choice="opt">--from <replaceable>file</replaceable></arg>
129 <arg choice="req"><replaceable>nodename</replaceable></arg>
131 rep="repeat"><replaceable>tag</replaceable></arg>
135 Add tags to the given node. If any of the tags contains
136 invalid characters, the entire operation will abort.
140 If the <option>--from</option> option is given, the list of
141 tags will be extended with the contents of that file (each
142 line becomes a tag). In this case, there is not need to pass
143 tags on the command line (if you do, both sources will be
144 used). A file name of - will be interpreted as stdin.
149 <title>EVACUATE</title>
152 <command>evacuate</command>
154 <arg>--early-release</arg>
156 <arg>--iallocator <replaceable>NAME</replaceable></arg>
157 <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
159 <arg choice="req" rep="repeat"><replaceable>node</replaceable></arg>
163 This command will move all secondary instances away from the
164 given node(s). It works only for instances having a drbd disk
169 The new location for the instances can be specified in two ways:
172 <simpara>as a single node for all instances, via the
173 <option>--new-secondary</option> option</simpara>
176 <simpara>or via the <option>--iallocator</option> option,
177 giving a script name as parameter, so each instance will
178 be in turn placed on the (per the script) optimal
185 The <option>--early-release</option> changes the code so that
186 the old storage on node being evacuated is removed early
187 (before the resync is completed) and the internal Ganeti locks
188 are also released for both the current secondary and the new
189 secondary, thus allowing more parallelism in the cluster
190 operation. This should be used only when recovering from a
191 disk failure on the current secondary (thus the old storage is
192 already broken) or when the storage on the primary node is
193 known to be fine (thus we won't need the old storage for
200 # gnt-node evacuate -I dumb node3.example.com
206 <title>FAILOVER</title>
209 <command>failover</command>
211 <arg>--ignore-consistency</arg>
212 <arg choice="req"><replaceable>node</replaceable></arg>
216 This command will fail over all instances having the given
217 node as primary to their secondary nodes. This works only for
218 instances having a drbd disk template.
222 Normally the failover will check the consistency of the disks
223 before failing over the instance. If you are trying to migrate
224 instances off a dead node, this will fail. Use the
225 <option>--ignore-consistency</option> option for this purpose.
231 # gnt-node failover node1.example.com
240 <command>info</command>
241 <arg rep="repeat"><replaceable>node</replaceable></arg>
245 Show detailed information about the nodes in the cluster. If you
246 don't give any arguments, all nodes will be shows, otherwise the
247 output will be restricted to the given names.
255 <command>list</command>
258 <arg>--no-headers</arg>
259 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
261 <arg>--units=<replaceable>UNITS</replaceable></arg>
262 <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
266 <arg rep="repeat">node</arg>
270 Lists the nodes in the cluster.
274 The <option>--no-headers</option> option will skip the initial
275 header line. The <option>--separator</option> option takes an
276 argument which denotes what will be used between the output
277 fields. Both these options are to help scripting.
281 The units used to display the numeric values in the output
282 varies, depending on the options given. By default, the values
283 will be formatted in the most appropriate unit. If the
284 <option>--separator</option> option is given, then the values
285 are shown in mebibytes to allow parsing by scripts. In both
286 cases, the <option>--units</option> option can be used to
287 enforce a given output unit.
291 By default, the query of nodes will be done in parallel with
292 any running jobs. This might give inconsistent results for the
293 free disk/memory. The <option>--sync</option> can be used to
294 grab locks for all the nodes and ensure consistent view of the
295 cluster (but this might stall the query for a long time).
299 Passing the <option>--roman</option> option gnt-node list will try to
300 output some of its fields in a latin-friendly way. This is not the
301 default for backwards compatibility.
305 The <option>-o</option> option takes a comma-separated list of
306 output fields. The available fields and their meaning are:
311 <simpara>the node name</simpara>
315 <term>pinst_cnt</term>
317 <simpara>the number of instances having this node as
322 <term>pinst_list</term>
324 <simpara>the list of instances having this node as
325 primary, comma separated</simpara>
329 <term>sinst_cnt</term>
331 <simpara>the number of instances having this node as a
332 secondary node</simpara>
336 <term>sinst_list</term>
338 <simpara>the list of instances having this node as a
339 secondary node, comma separated</simpara>
345 <simpara>the primary ip of this node (used for cluster
346 communication)</simpara>
353 the secondary ip of this node (used for data
354 replication in dual-ip clusters, see <citerefentry>
355 <refentrytitle>gnt-cluster</refentrytitle>
356 <manvolnum>8</manvolnum>
364 <simpara>total disk space in the volume group used for
365 instance disk allocations</simpara>
371 <simpara>available disk space in the volume group</simpara>
377 <simpara>total memory on the physical node</simpara>
383 <simpara>the memory used by the node itself</simpara>
389 <simpara>memory available for instance
390 allocations</simpara>
396 <simpara>the node bootid value; this is a linux specific
397 feature that assigns a new UUID to the node at each boot
398 and can be use to detect node reboots (by tracking
399 changes in this value)</simpara>
405 <simpara>comma-separated list of the node's
410 <term>serial_no</term>
412 <simpara>the so called 'serial number' of the node;
413 this is a numeric field that is incremented each time
414 the node is modified, and it can be used to detect
415 modifications</simpara>
422 the creation time of the node; note that this field
423 contains spaces and as such it's harder to parse
426 if this attribute is not present (e.g. when upgrading
427 from older versions), then "N/A" will be shown instead
435 the last modification time of the node; note that this
436 field contains spaces and as such it's harder to parse
439 if this attribute is not present (e.g. when upgrading
440 from older versions), then "N/A" will be shown instead
447 <simpara>Show the UUID of the node (generated
448 automatically by Ganeti)</simpara>
455 <simpara>the toal number of logical processors</simpara>
461 <simpara>the number of NUMA domains on the node, if the
462 hypervisor can export this information</simpara>
466 <term>csockets</term>
468 <simpara>the number of physical CPU sockets, if the
469 hypervisor can export this information</simpara>
473 <term>master_candidate</term>
475 <simpara>whether the node is a master candidate or not</simpara>
481 <simpara>whether the node is drained or not; the cluster
482 still communicates with drained nodes but excludes them
483 from allocation operations</simpara>
489 <simpara>whether the node is offline or not; if offline,
490 the cluster does not communicate with offline nodes;
491 useful for nodes that are not reachable in order to
492 avoid delays</simpara>
499 A condensed version of the node flags; this field will
500 output a one-character field, with the following
504 <simpara><emphasis>M</emphasis> for the master
508 <simpara><emphasis>C</emphasis> for a master
512 <simpara><emphasis>R</emphasis> for a regular
516 <simpara><emphasis>D</emphasis> for a drained
520 <simpara><emphasis>O</emphasis> for an offline
531 If the value of the option starts with the character
532 <constant>+</constant>, the new fields will be added to the
533 default list. This allows to quickly see the default list plus
534 a few other fields, instead of retyping the entire list of
539 Note that some of this fields are known from the configuration
540 of the cluster (e.g. <simplelist type="inline">
541 <member>name</member> <member>pinst</member>
542 <member>sinst</member> <member>pip</member>
543 <member>sip</member> </simplelist> and thus the master does
544 not need to contact the node for this data (making the listing
545 fast if only fields from this set are selected), whereas the
546 other fields are "live" fields and we need to make a query to
551 Depending on the virtualization type and implementation
552 details, the mtotal, mnode and mfree may have slighly varying
553 meanings. For example, some solutions share the node memory
554 with the pool of memory used for instances
555 (<acronym>KVM</acronym>), whereas others have separate memory
556 for the node and for the instances (Xen).
560 If no node names are given, then all nodes are
561 queried. Otherwise, only the given nodes will be listed.
566 <title>LIST-TAGS</title>
569 <command>list-tags</command>
570 <arg choice="req"><replaceable>nodename</replaceable></arg>
573 <para>List the tags of the given node.</para>
577 <title>MIGRATE</title>
579 <command>migrate</command>
581 <arg>--non-live</arg>
582 <arg>--migration-mode=live|non-live</arg>
583 <arg choice="req"><replaceable>node</replaceable></arg>
587 This command will migrate all instances having the given
588 node as primary to their secondary nodes. This works only for
589 instances having a drbd disk template.
593 As for the <command>gnt-instance migrate</command> command,
594 the options <option>--no-live</option>
595 and <option>--migration-mode</option> can be given to
596 influence the migration type.
602 # gnt-node migrate node1.example.com
609 <title>MODIFY</title>
611 <command>modify</command>
614 <arg>--master-candidate=<option>yes|no</option></arg>
615 <arg>--drained=<option>yes|no</option></arg>
616 <arg>--offline=<option>yes|no</option></arg>
617 <arg>--auto-promote</arg>
618 <arg choice="req"><replaceable>node</replaceable></arg>
622 This command changes the role of the node. Each options takes
623 either a literal <literal>yes</literal> or
624 <literal>no</literal>, and only one option should be given as
625 <literal>yes</literal>. The meaning of the roles are described
626 in the manpage <citerefentry>
627 <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
632 In case a node is demoted from the master candidate role, the
633 operation will be refused unless you pass
634 the <option>--auto-promote</option> option. This option will
635 cause the operation to lock all cluster nodes (thus it will
636 not be able to run in parallel with most other jobs), but it
637 allows automated maintenance of the cluster candidate pool. If
638 locking all cluster node is too expensive, another option is
639 to promote manually another node to master candidate before
640 demoting the current one.
644 Example (setting a node offline, which will demote it from
645 master candidate role if is in that role):
647 # gnt-node modify --offline=yes node1.example.com
651 <para>Example (setting the node back to online and master candidate):
653 # gnt-node modify --offline=no --master-candidate=yes node1.example.com
660 <title>REMOVE</title>
663 <command>remove</command>
664 <arg choice="req"><replaceable>nodename</replaceable></arg>
668 Removes a node from the cluster. Instances must be removed or
669 migrated to another cluster before.
675 # gnt-node remove node5.example.com
681 <title>REMOVE-TAGS</title>
683 <command>remove-tags</command>
684 <arg choice="opt">--from <replaceable>file</replaceable></arg>
685 <arg choice="req"><replaceable>nodename</replaceable></arg>
687 rep="repeat"><replaceable>tag</replaceable></arg>
691 Remove tags from the given node. If any of the tags are not
692 existing on the node, the entire operation will abort.
696 If the <option>--from</option> option is given, the list of
697 tags will be extended with the contents of that file (each
698 line becomes a tag). In this case, there is not need to pass
699 tags on the command line (if you do, both sources will be
700 used). A file name of - will be interpreted as stdin.
705 <title>VOLUMES</title>
708 <command>volumes</command>
709 <arg>--no-headers</arg>
710 <arg>--human-readable</arg>
711 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
712 <arg>--output=<replaceable>FIELDS</replaceable></arg>
714 <arg rep="repeat"><replaceable>node</replaceable></arg>
718 Lists all logical volumes and their physical disks from the node(s)
723 The <option>--no-headers</option> option will skip the initial
724 header line. The <option>--separator</option> option takes an
725 argument which denotes what will be used between the output
726 fields. Both these options are to help scripting.
730 The units used to display the numeric values in the output
731 varies, depending on the options given. By default, the values
732 will be formatted in the most appropriate unit. If the
733 <option>--separator</option> option is given, then the values
734 are shown in mebibytes to allow parsing by scripts. In both
735 cases, the <option>--units</option> option can be used to
736 enforce a given output unit.
740 The <option>-o</option> option takes a comma-separated list of
741 output fields. The available fields and their meaning are:
746 <simpara>the node name on which the volume exists</simpara>
752 <simpara>the physical drive (on which the LVM physical
753 volume lives)</simpara>
759 <simpara>the volume group name</simpara>
765 <simpara>the logical volume name</simpara>
771 <simpara>the logical volume size</simpara>
775 <term>instance</term>
777 <simpara>The name of the instance to which this volume
778 belongs, or (in case it's an orphan volume) the
779 character <quote>-</quote></simpara>
788 # gnt-node volumes node5.example.com
789 Node PhysDev VG Name Size Instance
790 node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128 instance1.example.com
791 node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256 instance1.example.com
797 <title>LIST-STORAGE</title>
800 <command>list-storage</command>
801 <arg>--no-headers</arg>
802 <arg>--human-readable</arg>
803 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
804 <arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg>
805 <arg>--output=<replaceable>FIELDS</replaceable></arg>
807 <arg rep="repeat"><replaceable>node</replaceable></arg>
811 Lists the available storage units and their details for the
816 The <option>--no-headers</option> option will skip the initial header
817 line. The <option>--separator</option> option takes an argument which
818 denotes what will be used between the output fields. Both these options
819 are to help scripting.
823 The units used to display the numeric values in the output varies,
824 depending on the options given. By default, the values will be
825 formatted in the most appropriate unit. If the
826 <option>--separator</option> option is given, then the values are shown
827 in mebibytes to allow parsing by scripts. In both cases, the
828 <option>--units</option> option can be used to enforce a given output
833 The <option>--storage-type</option> option can be used to choose a
834 storage unit type. Possible choices are <literal>lvm-pv</literal>,
835 <literal>lvm-vg</literal> or <literal>file</literal>.
839 The <option>-o</option> option takes a comma-separated list of
840 output fields. The available fields and their meaning are:
845 <simpara>the node name on which the volume exists</simpara>
851 <simpara>the type of the storage unit (currently just
852 what is passed in via
853 <option>--storage-type</option>)</simpara>
859 <simpara>the path/identifier of the storage unit</simpara>
866 total size of the unit; for the file type see a note below
874 used space in the unit; for the file type see a note below
887 <term>allocatable</term>
890 whether we the unit is available for allocation
891 (only <literal>lvm-pv</literal> can change this
892 setting, the other types always report true)
900 Note that for the <quote>file</quote> type, the total disk
901 space might not equal to the sum of used and free, due to the
902 method Ganeti uses to compute each of them. The total and free
903 values are computed as the total and free space values for the
904 filesystem to which the directory belongs, but the used space
905 is computed from the used space under that directory
906 <emphasis>only</emphasis>, which might not be necessarily the
907 root of the filesystem, and as such there could be files
908 outside the file storage directory using disk space and
909 causing a mismatch in the values.
915 node1# gnt-node list-storage node2
916 Node Type Name Size Used Free Allocatable
917 node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y
918 node2 lvm-pv /dev/sdb1 698.6G 0M 698.6G Y
924 <title>MODIFY-STORAGE</title>
927 <command>modify-storage</command>
928 <arg><option>--allocatable=yes|no</option></arg>
930 <arg choice="req"><replaceable>node</replaceable></arg>
931 <arg choice="req"><replaceable>storage-type</replaceable></arg>
932 <arg choice="req"><replaceable>volume-name</replaceable></arg>
936 Modifies storage volumes on a node. Only LVM physical volumes
937 can be modified at the moment. They have a storage type
938 of <quote>lvm-pv</quote>.
944 # gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
950 <title>REPAIR-STORAGE</title>
953 <command>repair-storage</command>
954 <arg>--ignore-consistency</arg>
955 <arg choice="req"><replaceable>node</replaceable></arg>
956 <arg choice="req"><replaceable>storage-type</replaceable></arg>
957 <arg choice="req"><replaceable>volume-name</replaceable></arg>
961 Repairs a storage volume on a node. Only LVM volume groups can
962 be repaired at this time. They have the storage type
963 <quote>lvm-vg</quote>.
967 On LVM volume groups, <command>repair-storage</command> runs
968 <quote>vgreduce --removemissing</quote>.
973 Running this command can lead to data loss. Use it with care.
978 The <option>--ignore-consistency</option> option will ignore
979 any inconsistent disks (on the nodes paired with this
980 one). Use of this option is most likely to lead to data-loss.
986 # gnt-node repair-storage node5.example.com lvm-vg xenvg
992 <title>POWERCYCLE</title>
995 <command>powercycle</command>
996 <arg><option>--yes</option></arg>
997 <arg><option>--force</option></arg>
998 <arg choice="req"><replaceable>node</replaceable></arg>
1002 This commands (tries to) forcefully reboot a node. It is a
1003 command that can be used if the node environemnt is broken,
1004 such that the admin can no longer login over ssh, but the
1005 Ganeti node daemon is still working.
1009 Note that this command is not guaranteed to work; it depends
1010 on the hypervisor how effective is the reboot attempt. For
1011 Linux, this command require that the kernel option
1012 <literal>CONFIG_MAGIC_SYSRQ</literal> is enabled.
1016 The <option>--yes</option> option can be used to skip
1017 confirmation, while the <option>--force</option> option is
1018 needed if the target node is the master node.
1027 <!-- Keep this comment at the end of the file
1032 sgml-minimize-attributes:nil
1033 sgml-always-quote-attributes:t
1036 sgml-parent-document:nil
1037 sgml-default-dtd-file:nil
1038 sgml-exposed-tags:nil
1039 sgml-local-catalogs:nil
1040 sgml-local-ecat-files:nil