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>December 12, 2007</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-cluster</refentrytitle>">
10 <!ENTITY dhpackage "gnt-cluster">
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">
23 <holder>Google Inc.</holder>
31 <refmiscinfo>ganeti 1.2</refmiscinfo>
34 <refname>&dhpackage;</refname>
36 <refpurpose>ganeti administration, cluster-wide</refpurpose>
40 <command>&dhpackage; </command>
42 <arg choice="req">command</arg>
43 <arg>arguments...</arg>
47 <title>DESCRIPTION</title>
50 The <command>&dhpackage;</command> is used for cluster-wide
51 administration in the ganeti system.
56 <title>COMMANDS</title>
59 <title>ADD-TAGS</title>
62 <command>add-tags</command>
63 <arg choice="opt">--from <replaceable>file</replaceable></arg>
65 rep="repeat"><replaceable>tag</replaceable></arg>
69 Add tags to the cluster. If any of the tags contains invalid
70 characters, the entire operation will abort.
74 If the <option>--from</option> option is given, the list of
75 tags will be extended with the contents of that file (each
76 line becomes a tag). In this case, there is not need to pass
77 tags on the command line (if you do, both sources will be
78 used). A file name of - will be interpreted as stdin.
83 <title>COMMAND</title>
86 <command>command</command>
87 <arg>-n <replaceable>node</replaceable></arg>
88 <arg choice="req"><replaceable>command</replaceable></arg>
92 Executes a command on all nodes. If the option
93 <option>-n</option> is not given, the command will be executed
94 on all nodes, otherwise it will be executed only on the
95 node(s) specified. Use the option multiple times for running
96 it on multiple nodes, like:
99 # gnt-cluster command -n node1.example.com -n node2.example.com date
105 The command is executed serially on the selected nodes. If the
106 master node is present in the list, the command will be
107 executed last on the master. Regarding the other nodes, the
108 execution order is somewhat alphabetic (it's smarter so that
109 node2.example.com will be earlier than node10.example.com but
110 after node1.example.com).
114 So given the node names node1, node2, node3, node10, node11,
115 with node3 being the master, the order will be: node1, node2,
116 node10, node11, node3.
120 The command is constructed by concatenating all other command
121 line arguments. For example, to list the contents of the
122 <filename class="directory">/etc</filename> directory on all
126 # gnt-cluster command ls -l /etc
129 and the command which will be executed will be
130 <computeroutput>"ls -l /etc"</computeroutput>
135 <title>COPYFILE</title>
138 <command>copyfile</command>
139 <arg>-n <replaceable>node</replaceable></arg>
140 <arg choice="req"><replaceable>file</replaceable></arg>
144 Copies a file to all or to some nodes. The argument specifies
145 the source file (on the current system), the
146 <option>-n</option> argument specifies the target node, or
147 nodes if the option is given multiple times. If
148 <option>-n</option> is not given at all, the file will be
153 # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
156 This will copy the file <filename>/tmp/test</filename> from
157 the current node to the two named nodes.
162 <title>DESTROY</title>
165 <command>destroy</command>
166 <arg choice="req">--yes-do-it</arg>
170 Remove all configuration files related to the cluster, so that
171 a <command>gnt-cluster init</command> can be done again
176 Since this is a dangerous command, you are required to pass
177 the argument <replaceable>--yes-do-it.</replaceable>
182 <title>GETMASTER</title>
185 <command>getmaster</command>
189 Displays the current master node.
197 <command>info</command>
201 Shows runtime cluster information: cluster name, architecture
202 (32 or 64 bit), master node, node list and instance list.
210 <command>init</command>
211 <arg>-s <replaceable>secondary_ip</replaceable></arg>
212 <arg>-b <replaceable>bridge</replaceable></arg>
213 <arg>-g <replaceable>vg-name</replaceable></arg>
214 <arg>--master-netdev <replaceable>vg-name</replaceable></arg>
215 <arg>-m <replaceable>mac-prefix</replaceable></arg>
216 <arg>--no-lvm-storage</arg>
217 <arg>--file-storage-dir <replaceable>dir</replaceable></arg>
218 <arg>--enabled-hypervisors <replaceable>hypervisors</replaceable></arg>
219 <arg>-t <replaceable>hypervisor name</replaceable></arg>
220 <arg>--hypervisor-parameters <replaceable>hv-params</replaceable></arg>
221 <arg>--backend-parameters <replaceable>be-params</replaceable></arg>
222 <arg choice="req"><replaceable>clustername</replaceable></arg>
226 This commands is only run once initially on the first node of
227 the cluster. It will initialize the cluster configuration and
228 setup ssh-keys and more.
232 Note that the <replaceable>clustername</replaceable> is not
233 any random name. It has to be resolvable to an IP address
234 using DNS, and it is best if you give the fully-qualified
235 domain name. This hostname must resolve to an IP address
236 reserved exclusively for this purpose.
240 The cluster can run in two modes: single-home or
241 dual-homed. In the first case, all traffic (both public
242 traffic, inter-node traffic and data replication traffic) goes
243 over the same interface. In the dual-homed case, the data
244 replication traffic goes over the second network. The
245 <option>-s</option> option here marks the cluster as
246 dual-homed and its parameter represents this node's address on
247 the second network. If you initialise the cluster with
248 <option>-s</option>, all nodes added must have a secondary IP
253 Note that for Ganeti it doesn't matter if the secondary
254 network is actually a separate physical network, or is done
255 using tunneling, etc. For performance reasons, it's
256 recommended to use a separate network, of course.
260 The <option>-b</option> option specifies the default bridge
265 The <option>-g</option> option will let you specify a volume group
266 different than 'xenvg' for ganeti to use when creating instance disks.
267 This volume group must have the same name on all nodes. Once the
268 cluster is initialized this can be altered by using the
269 <command>modify</command> command. If you don't want to use lvm
270 storage at all use the <option>--no-lvm-storage</option> option.
271 Once the cluster is initialized you can change this setup with the
272 <command>modify</command> command.
276 The <option>--master-netdev</option> option is useful for specifying a
277 different interface on which the master will activate its IP address.
278 It's important that all nodes have this interface because you'll need
279 it for a master failover.
283 The <option>-m</option> option will let you specify a three byte prefix
284 under which the virtual MAC addresses of your instances will be
285 generated. The prefix must be specified in the format XX:XX:XX and the
290 The <option>--no-lvm-storage</option> allows you to initialize the
291 cluster without lvm support. This means that only instances using
292 files as storage backend will be possible to create. Once the cluster
293 is initialized you can change this setup with the
294 <command>modify</command> command.
298 The <option>--file-storage-dir</option> option allows you
299 set the directory to use for storing the instance disk
300 files when using file storage as backend for instance disks.
304 The <option>--enabled-hypervisors</option> option allows you
305 to set the list of hypervisors that will be enabled for
306 this cluster. Instance hypervisors can only be choosen from
307 the list of enabled hypervisors. Currently, the following
308 hypervisors are available:
341 fake hypervisor for development/testing
349 Either a single hypervisor name or a comma-separated list of
350 hypervisor names can be specified. If this option is not
351 specified, only the xen-pvm hypervisor is enabled by default.
355 With the <option>-t</option> option, the default hypervisor
356 can be set. It has to be a member of the list of enabled
357 hypervisors. If not specified, the first entry on the list of
358 enabled hypervisors will be used by default.
362 The <option>--backend</option> option allows you to set
363 the default backend parameters for the cluster. The parameter
364 format is a comma-separated list of key=value pairs with the
365 following supported keys:
374 Number of VCPUs to set for an instance by default, must
375 be an integer, will be set to 1 if no specified.
383 Amount of memory to allocate for an instance by default,
384 can be either an integer or an integer followed by a
385 unit (M for mebibytes and G for gibibytes are
386 supported), will be set to 128M if not specified.
391 <term>auto_balance</term>
394 Value of the auto_balance flag for instances to use by
395 default, will be set to true if not specified.
403 The <option>--hypervisor-parameters</option> option allows you
404 to set default hypervisor specific parameters for the
405 cluster. The format of this option is the name of the
406 hypervisor, followed by a colon and a comma-separated list of
407 key=value pairs with the following keys:
422 Sets the path to the instance kernel, if not
423 specified, the value /boot/vmlinuz-2.6-xenU will
434 Sets the path to the instance initrd, if not
435 specified, no initrd will be used.
452 Boot device order for instances. Several single
453 letter device entries can be combined together
454 without a separator. If not specified, the value
455 cd will be used. Available boot device entries are:
499 Sets the path to the file Xen uses to
500 emulate a virtual CDROM drive for
501 instances. Valid values are either an absolute
502 path to an existing file or the value None,
503 which disables virtual CDROM support. If not
504 specified, the value None will be used.
514 Sets the NIC type Xen should use for this
515 HVM instance. Valid choices are rtl8139,
516 ne2k_pci, ne2k_isa and paravirtual. The
517 paravirtual setting is intended for use with the
518 GPL PV drivers inside HVM Windows instances. If
519 not specified, the value rtl8139 will be used.
529 Sets the disk type Xen should use for the
530 HVM instance. Valid choices are ioemu and
531 paravirtual. The paravirtual setting is intended
532 for use with the GPL PV drivers inside HVM
533 Windows instances. If not specified, the value
544 Sets the address that the VNC listener for
545 this instance should bind to. Valid values
546 are IPv4 addresses. Use the address 0.0.0.0 to
547 bind to all available interfaces or specify the
548 address of one of the interfaces on the node to
549 restrict listening to that interface. If not
550 specified, the value 0.0.0.0 will be used.
560 Sets if Xen should enable ACPI support for
561 HVM instances. Valid values are true or
562 false. If not specified, the value true will be
573 Sets if Xen should enabled PAE support for
574 this HVM instance. Valid values are true or
575 false. If not specified, the value true will be
593 Sets the path to the instance kernel, if not
594 specified, the valee /boot/vmlinuz-2.6-xenU will
605 Sets the path to the instance initrd, if not
606 specified, no initrd will be used.
617 There are currently no parameters for the fake
628 <title>LIST-TAGS</title>
631 <command>list-tags</command>
634 <para>List the tags of the cluster.</para>
638 <title>MASTERFAILOVER</title>
641 <command>masterfailover</command>
645 Failover the master role to the current node.
650 <title>MODIFY</title>
653 <command>modify</command>
654 <arg choice="opt">-g <replaceable>vg-name</replaceable></arg>
655 <arg choice="opt">--no-lvm-storage</arg>
656 <arg choice="opt">--enabled-hypervisors
657 <replaceable>hypervisors</replaceable></arg>
658 <arg choice="opt">--hypervisor-parameters
659 <replaceable>hv-params</replaceable></arg>
660 <arg choice="opt">--backend-parameters
661 <replaceable>be-params</replaceable></arg>
666 Modify the options for the cluster.
670 The <option>-g</option>, <option>--no-lvm-storarge</option>,
671 <option>--enabled-hypervisors</option>,
672 <option>--hypervisor-parameters</option> and
673 <option>--backend-parameters</option> options are
674 described in the <command>init</command> command.
682 <command>queue</command>
683 <arg choice="opt">drain</arg>
684 <arg choice="opt">undrain</arg>
685 <arg choice="opt">info</arg>
690 Change job queue properties.
694 The <option>drain</option> option sets the drain flag on the
695 job queue. No new jobs will be accepted, but jobs already in
696 the queue will be processed.
700 The <option>undrain</option> will unset the drain flag on the
701 job queue. New jobs will be accepted.
705 The <option>info</option> option shows the properties of the
711 <title>REMOVE-TAGS</title>
714 <command>remove-tags</command>
715 <arg choice="opt">--from <replaceable>file</replaceable></arg>
717 rep="repeat"><replaceable>tag</replaceable></arg>
721 Remove tags from the cluster. If any of the tags are not
722 existing on the cluster, the entire operation will abort.
726 If the <option>--from</option> option is given, the list of
727 tags will be extended with the contents of that file (each
728 line becomes a tag). In this case, there is not need to pass
729 tags on the command line (if you do, both sources will be
730 used). A file name of - will be interpreted as stdin.
735 <title>RENAME</title>
738 <command>rename</command>
740 <arg choice="req"><replaceable>name</replaceable></arg>
744 Renames the cluster and in the process updates the master IP
745 address to the one the new name resolves to. At least one of
746 either the name or the IP address must be different, otherwise
747 the operation will be aborted.
751 Note that since this command can be dangerous (especially when
752 run over SSH), the command will require confirmation unless
753 run with the <option>-f</option> option.
758 <title>SEARCH-TAGS</title>
761 <command>search-tags</command>
762 <arg choice="req"><replaceable>pattern</replaceable></arg>
766 Searches the tags on all objects in the cluster (the cluster
767 itself, the nodes and the instances) for a given pattern. The
768 pattern is interpreted as a regular expression and a search
769 will be done on it (i.e. the given pattern is not anchored to
770 the beggining of the string; if you want that, prefix the
771 pattern with <literal>^</literal>).
775 If no tags are matching the pattern, the exit code of the
776 command will be one. If there is at least one match, the exit
777 code will be zero. Each match is listed on one line, the
778 object and the tag separated by a space. The cluster will be
779 listed as <filename>/cluster</filename>, a node will be listed
781 <filename>/nodes/<replaceable>name</replaceable></filename>,
783 <filename>/instances/<replaceable>name</replaceable></filename>.
787 # gnt-cluster search time
788 /cluster ctime:2007-09-01
789 /nodes/node1.example.com mtime:2007-10-04
794 <title>VERIFY</title>
797 <command>verify</command>
798 <arg choice="opt">--no-nplus1-mem</arg>
802 Verify correctness of cluster configuration. This is safe with
803 respect to running instances, and incurs no downtime of the
808 If the <option>--no-nplus1-mem</option> option is given, ganeti won't
809 check whether if it loses a node it can restart all the instances on
810 their secondaries (and report an error otherwise).
815 <title>VERIFY-DISKS</title>
818 <command>verify-disks</command>
822 The command checks which instances have degraded DRBD disks
823 and activates the disks of those instances.
827 This command is run from the <command>ganeti-watcher</command>
828 tool, which also has a different, complementary algorithm for
829 doing this check. Together, these two should ensure that DRBD
830 disks are kept consistent.
835 <title>VERSION</title>
838 <command>version</command>
842 Show the cluster version.
852 <!-- Keep this comment at the end of the file
857 sgml-minimize-attributes:nil
858 sgml-always-quote-attributes:t
861 sgml-parent-document:nil
862 sgml-default-dtd-file:nil
863 sgml-exposed-tags:nil
864 sgml-local-catalogs:nil
865 sgml-local-ecat-files:nil