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>July 01, 2008</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-instance</refentrytitle>">
10 <!ENTITY dhpackage "gnt-instance">
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">
24 <holder>Google Inc.</holder>
32 <refmiscinfo>ganeti 1.2</refmiscinfo>
35 <refname>&dhpackage;</refname>
37 <refpurpose>ganeti instance administration</refpurpose>
41 <command>&dhpackage; </command>
43 <arg choice="req">command</arg>
44 <arg>arguments...</arg>
48 <title>DESCRIPTION</title>
51 The <command>&dhpackage;</command> is used for instance
52 administration in the ganeti system.
57 <title>COMMANDS</title>
60 <title>Creation/removal/querying</title>
65 <command>add</command>
66 <arg>-s <replaceable>disksize</replaceable></arg>
67 <arg>--swap-size <replaceable>disksize</replaceable></arg>
68 <arg>-m <replaceable>memsize</replaceable></arg>
71 <arg>-b <replaceable>bridge</replaceable></arg>
72 <arg>--mac <replaceable>MAC-address</replaceable></arg>
75 <arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg>
76 <arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg>
79 <arg>--hvm-pae <replaceable>PAE-support</replaceable></arg>
82 <arg>--hvm-cdrom-image-path
83 <replaceable>cdrom-image-path</replaceable></arg>
86 <arg>--hvm-nic-type <replaceable>NICTYPE</replacable></arg>
90 <replaceale>DISKTYPE</replaceable></arg>
93 <arg>--vnc-bind-address
94 <replaceable>vnc-bind-address</replaceable></arg>
97 <arg>--kernel<group choice="req">
99 <arg><replaceable>kernel_path</replaceable></arg>
103 <arg>--initrd<group choice="req">
106 <arg><replaceable>initrd_path</replaceable></arg>
110 <arg>--cpu <replaceable>vcpus</replaceable></arg>
111 <arg>--ip<group choice="req">
114 <arg><replaceable>ip-address</replaceable></arg>
118 <arg>--no-wait-for-sync</arg>
119 <arg>--no-start</arg>
120 <arg>--no-ip-check</arg>
123 <arg choice="req">-t<group choice="req">
126 <arg>local_raid1</arg>
127 <arg>remote_raid1</arg>
133 <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
134 <arg>--iallocator <replaceable>name</replaceable></arg>
138 <arg choice="req">-o <replaceable>os-type</replaceable></arg>
141 <arg choice="req"><replaceable>instance</replaceable></arg>
145 Creates a new instance on the specified
146 host. <replaceable>instance</replaceable> must be in DNS and
147 resolve to a IP in the same network as the nodes in the
152 The <option>-s</option> option specifies the disk size for
153 the instance, in mebibytes (defaults to
154 <constant>20480MiB</constant> =
155 <constant>20GiB</constant>). You can also use one of the
156 suffixes <literal>m</literal>, <literal>g</literal> or
157 <literal>t</literal> to specificy the exact the units used;
158 these suffixes map to mebibytes, gibibytes and tebibytes.
162 The <option>--swap-size</option> option specifies the swap
163 disk size (in mebibytes) for the instance (the one presented
164 as <filename class="devicefile">/dev/sdb</filename>). The
165 default is <constant>4096MiB</constant>. As for the disk
166 size, you can specify other suffixes.
170 The <option>-m</option> option specifies the memory size for
171 the instance, in mebibytes (defaults to 128 MiB). Again, you
172 can use other suffixes (e.g. <userinput>2g</userinput>).
176 The <option>-o</option> options specifies the operating
177 system to be installed. The available operating systems can
178 be listed with <command>gnt-os list</command>.
182 The <option>-b</option> option specifies the bridge to which the
183 instance will be connected. (defaults to the cluster-wide default
184 bridge specified at cluster initialization time).
188 The <option>--mac</option> option specifies the MAC address
189 of the ethernet interface for the instance. If this option
190 is not specified, a new MAC address is generated randomly with
191 the configured MAC prefix. The randomly generated MAC
192 address is guaranteed to be unique among the instances of
197 The <option>--hvm-boot-order</option> option specifies the
198 boot device order for Xen HVM instances. The boot order is a
199 string of letters listing the boot devices, with valid
200 device letters being:
241 The default is not to set an HVM boot order which is
242 interpreted as 'dc'. This option, like all options starting
243 with 'hvm', is only relevant for Xen HVM instances and
244 ignored by all other instance types.
248 The <option>--hvm-acpi</option> option specifies if Xen
249 should enable ACPI support for this HVM instance. Valid
250 values are true or false. The default value is false,
251 disabling ACPI support for this instance.
255 The <option>--hvm-pae</option> option specifies if Xen
256 should enabled PAE support for this HVM instance. Valid
257 values are true or false. The default is false, disabling
258 PAE support for this instance.
262 The <option>--hvm-cdrom-image-path</option> option specifies the
263 path to the file Xen uses to emulate a virtual CDROM drive
264 for this HVM instance. Valid values are either an
265 absolute path to an existing file or None, which disables
266 virtual CDROM support for this instance. The default is
267 None, disabling virtual CDROM support.
271 The <option>--hvm-nic-type</option> specifies the NIC type
272 Xen should use for this HVM instance. Valid choices are
273 rtl8139, ne2k_pci, ne2k_isa and paravirtual with rtl8139
274 as the default. The paravirtual setting is intended for use
275 with the GPL PV drivers inside HVM Windows instances.
279 The <option>--hvm-disk-type</option> specifies the disk type
280 Xen should use for the HVM instance. Valid choices are ioemu
281 and paravirtual with ioemu as the default. The paravirtual
282 setting is intended for use with the GPL PV drivers inside
283 HVM Windows instances.
287 The <option>--vnc-bind-address</option> option specifies the
288 address that the VNC listener for this instance should bind
289 to. Valid values are IPv4 addresses. Use the address 0.0.0.0
290 to bind to all available interfaces (this is the default)
291 or specify the address of one of the interfaces on the node
292 to restrict listing to that interface.
296 The <option>--iallocator</option> option specifies the instance
297 allocator plugin to use. If you pass in this option the allocator
298 will select nodes for this instance automatically, so you don't need
299 to pass them with the <option>-n</option> option. For more
300 information please refer to the instance allocator documentation.
304 The <option>--kernel</option> option allows the instance to
305 use a custom kernel (if a filename is passed) or to use the
306 default kernel (<filename>@CUSTOM_XEN_KERNEL@</filename>), if the
307 string <constant>default</constant> is passed.
311 The <option>--initrd</option> option is similar: it allows
312 the instance to use a custom initrd (if a filename is
313 passed) or to use the default initrd
314 (<filename>@CUSTOM_XEN_INITRD@</filename>), if the string
315 <constant>default</constant> is passed, or to disable the
316 use of an initrd, if the string <constant>none</constant> is
317 passed. Note that in the case the instance is set to use the
318 default initrd and it doesn't exist, it will be silently
319 ignored; if the instance is set to use a custom initrd and
320 it doesn't exist, this will be treated as an error and will
321 prevent the startup of the instance.
325 The <option>-t</option> options specifies the disk layout type for
326 the instance. The available choices are:
329 <term>diskless</term>
332 This creates an instance with no disks. Its useful for
333 testing only (or other special cases).
340 <para>Disk devices will be logical volumes.</para>
344 <term>local_raid1</term>
347 Disk devices will be md raid1 arrays over two local
353 <term>remote_raid1</term>
356 Disk devices will be md raid1 arrays with one
357 component (so it's not actually raid1): a drbd
358 (0.7.x) device between the instance's primary node
359 and the node given by the second value of the
360 <option>--node</option> option.
368 Disk devices will be drbd (version 8.x) on top of
369 lvm volumes. They are equivalent in functionality to
370 <replaceable>remote_raid1</replaceable>, but are
371 recommended for new instances (if you have drbd 8.x
380 The optional second value of the <option>--node</option> is used for
381 the remote raid template type and specifies the remote node.
385 If you do not want gnt-instance to wait for the disk mirror
386 to be synced, use the <option>--no-wait-for-sync</option>
391 Use the <option>--cpu</option> option to set the number of virtual
396 To pass an IPv4 address to the hypervisor, specify the
397 <option>--ip</option> option. Note that this IP address will not be
398 used by the OS scripts and changing it later will change the address
399 that the instance will actually use.
403 In case you don't want the new instance to be automatically started,
404 specify the <option>--no-start</option> option.
408 Ganeti will not check whether an instance's IP address is already
409 alive if the <option>--no-ip-check</option> option is specified.
415 # gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
416 -n node1.example.com instance1.example.com
417 # gnt-instance add -t remote_raid1 -s 30g -m 512 -o debian-etch \
418 -n node1.example.com:node2.example.com instance2.example.com
424 <title>REMOVE</title>
427 <command>remove</command>
428 <arg>--ignore-failures</arg>
429 <arg choice="req"><replaceable>instance</replaceable></arg>
433 Remove an instance. This will remove all data from the
434 instance and there is <emphasis>no way back</emphasis>. If
435 you are not sure if you use an instance again, use
436 <command>shutdown</command> first and leave it in the
437 shutdown state for a while.
442 The <option>--ignore-failures</option> option will cause the
443 removal to proceed even in the presence of errors during the
444 removal of the instance (e.g. during the shutdown or the
445 disk removal). If this option is not given, the command will
446 stop at the first error.
452 # gnt-instance remove instance1.example.com
461 <command>list</command>
462 <arg>--no-headers</arg>
463 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
464 <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
468 Shows the currently configured instances with memory usage,
469 disk usage, the node they are running on, and the CPU time,
470 counted in seconds, used by each instance since its latest
475 The <option>--no-headers</option> option will skip the
476 initial header line. The <option>--separator</option> option
477 takes an argument which denotes what will be used between
478 the output fields. Both these options are to help scripting.
482 The <option>-o</option> option takes a comma-separated list
483 of output fields. The available fields and their meaning
489 <simpara>the instance name</simpara>
495 <simpara>the OS of the instance</simpara>
501 <simpara>the primary node of the instance</simpara>
507 <simpara>comma-separated list of secondary nodes for the
508 instance; usually this will be just one node</simpara>
512 <term>admin_state</term>
514 <simpara>the desired state of the instance (either "yes"
515 or "no" denoting the instance should run or
520 <term>admin_ram</term>
522 <simpara>the desired memory for the instance</simpara>
526 <term>disk_template</term>
528 <simpara>the disk template of the instance</simpara>
532 <term>oper_state</term>
534 <simpara>the actual state of the instance; can be
535 one of the values "running", "stopped", "(node
542 <simpara>combined form of admin_state and oper_stat;
544 <computeroutput>ERROR_nodedown</computeroutput> if the
545 node of the instance is down,
546 <computeroutput>ERROR_down</computeroutput> if the
547 instance should run but is down,
548 <computeroutput>ERROR_up</computeroutput> if the
549 instance should be stopped but is actually running,
550 <computeroutput>ADMIN_down</computeroutput> if the
551 instance has been stopped (and is stopped) and
552 <computeroutput>running</computeroutput> if the
553 instance is set to be running (and is
558 <term>oper_ram</term>
560 <simpara>the actual memory usage of the instance as seen
561 by the hypervisor</simpara>
567 <simpara>the ip address ganeti recognizes as associated with
568 the instance interface</simpara>
574 <simpara>the instance interface MAC address</simpara>
580 <simpara>bridge the instance is connected to
585 <term>sda_size</term>
587 <simpara>the size of the instance's first disk</simpara>
591 <term>sdb_size</term>
593 <simpara>the size of the instance's second disk</simpara>
599 <simpara>the number of VCPUs allocated to the
606 <simpara>comma-separated list of the instances's
614 If the value of the option starts with the character
615 <constant>+</constant>, the new fields will be added to the
616 default list. This allows to quickly see the default list
617 plus a few other fields, instead of retyping the entire list
622 There is a subtle grouping about the available output
623 fields: all fields except for <option>oper_state</option>,
624 <option>oper_ram</option> and <option>status</option> are
625 configuration value and not run-time values. So if you don't
626 select any of the these fields, the query will be satisfied
627 instantly from the cluster configuration, without having to
628 ask the remote nodes for the data. This can be helpful for
629 big clusters when you only want some data and it makes sense
630 to specify a reduced set of output fields.
633 <para>The default output field list is:
634 <simplelist type="inline">
635 <member>name</member>
637 <member>pnode</member>
638 <member>admin_state</member>
639 <member>oper_state</member>
640 <member>oper_ram</member>
649 <command>info</command>
650 <arg rep="repeat"><replaceable>instance</replaceable></arg>
654 Show detailed information about the (given) instances. This
655 is different from <command>list</command> as it shows
656 detailed data about the instance's disks (especially useful
657 for remote raid templates).
662 <title>MODIFY</title>
665 <command>modify</command>
666 <arg choice="opt">-m <replaceable>memsize</replaceable></arg>
667 <arg choice="opt">-p <replaceable>vcpus</replaceable></arg>
668 <arg choice="opt">-i <replaceable>ip</replaceable></arg>
669 <arg choice="opt">-b <replaceable>bridge</replaceable></arg>
670 <arg choice="opt">--mac <replaceable>MAC-address</replaceable></arg>
671 <arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg>
672 <arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg>
673 <arg>--hvm-pae <replaceable>PAE-support</replaceable></arg>
674 <arg>--hvm-cdrom-image-path
675 <replaceable>cdrom-image-path</replaceable></arg>
676 <arg>--hvm-nic-type <replaceable>NICTYPE</replaceable></arg>
677 <arg>--hvm-disk-type <replaceable>DISKTYPE</replaceable></arg>
678 <arg>--vnc-bind-address
679 <replaceable>vnc-bind-address</replaceable></arg>
682 <arg>--kernel <group choice="req">
684 <arg><replaceable>kernel_path</replaceable></arg>
687 <arg>--initrd <group choice="req">
690 <arg><replaceable>initrd_path</replaceable></arg>
693 <arg choice="req"><replaceable>instance</replaceable></arg>
697 Modify the memory size, number of vcpus, ip address, MAC
698 address and/or bridge for an instance.
702 The memory size is given in MiB. Note that you need to give
703 at least one of the arguments, otherwise the command
708 The <option>--kernel</option>, <option>--initrd</option>
709 and <option>--hvm-boot-order</option>
710 options are described in the <command>add</command> command.
714 Additionally, the HVM boot order can be reset to the default
715 values by using <option>--hvm-boot-order=default</option>.
719 The <option>--hvm-acpi</option> option specifies if Xen
720 should enable ACPI support for this HVM instance. Valid
721 values are true or false.
725 The <option>--hvm-pae</option> option specifies if Xen
726 should enabled PAE support for this HVM instance. Valid
727 values are true or false.
731 The <option>--hvm-cdrom-image-path</option> specifies the
732 path to the file xen uses to emulate a virtual CDROM drive
733 for this HVM instance. Valid values are either an
734 absolute path to an existing file or None, which disables
735 virtual CDROM support for this instance.
739 The <option>--hvm-nic-type</option> specifies the NIC type
740 Xen should use for this HVM instance. Valid choices are
741 rtl8139, ne2k_pci, ne2k_isa and paravirtual with rtl8139
742 as the default. The paravirtual setting is intended for use
743 with the GPL PV drivers inside HVM Windows instances.
747 The <option>--hvm-disk-type</option> specifies the disk type
748 Xen should use for the HVM instance. Valid choices are ioemu
749 and paravirtual with ioemu as the default. The paravirtual
750 setting is intended for use with the GPL PV drivers inside
751 HVM Windows instances.
755 The <option>--vnc-bind-address</option> specifies the
756 address that the VNC listener for this instance should bind
757 to. Valid values are IPv4 addresses. Use the address 0.0.0.0
758 to bind to all available interfaces.
762 All the changes take effect at the next restart. If the
763 instance is running, there is no effect on the instance.
768 <title>REINSTALL</title>
771 <command>reinstall</command>
772 <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
773 <arg choice="opt">-f <replaceable>force</replaceable></arg>
774 <arg>--interactive</arg>
775 <arg choice="req"><replaceable>instance</replaceable></arg>
779 Reinstalls the operating system on the given instance. The instance
780 must be stopped when running this command. If the
781 <option>--os-type</option> is specified, the operating system is
786 The <option>--interactive</option> option switches to an
787 interactive reinstall. The user is prompted to select the OS
788 template from the list of available OS templates.
793 <title>RENAME</title>
796 <command>rename</command>
797 <arg>--no-ip-check</arg>
798 <arg choice="req"><replaceable>instance</replaceable></arg>
799 <arg choice="req"><replaceable>new_name</replaceable></arg>
803 Renames the given instance. The instance must be stopped
804 when running this command. The requirements for the new name
805 are the same as for adding an instance: the new name must be
806 resolvable and the IP it resolves to must not be reachable
807 (in order to prevent duplicate IPs the next time the
808 instance is started). The IP test can be skipped if the
809 <option>--no-ip-check</option> option is passed.
816 <title>Starting/stopping/connecting to console</title>
819 <title>STARTUP</title>
822 <command>startup</command>
823 <arg>--extra=<replaceable>PARAMS</replaceable></arg>
827 <arg>--instance</arg>
830 <arg>--secondary</arg>
835 rep="repeat"><replaceable>name</replaceable></arg>
839 Starts one or more instances, depending on the following
840 options. The four available modes are:
843 <term><option>--instance</option></term>
845 <simpara>will start the instances given as arguments
846 (at least one argument required); this is the default
853 <simpara>will start the instances who have the given
854 node as either primary or secondary</simpara>
858 <term><option>--primary</option></term>
860 <simpara>will start all instances whose primary node
861 is in the list of nodes passed as arguments (at least
862 one node required)</simpara>
866 <term><option>--secondary</option></term>
868 <simpara>will start all instances whose secondary node
869 is in the list of nodes passed as arguments (at least
870 one node required)</simpara>
876 <simpara>will start all instances in the cluster (no
877 arguments accepted)</simpara>
884 Note that although you can pass more than one selection
885 option, the last one wins, so in order to guarantee the
886 desired result, don't pass more than one such option.
890 The <option>--extra</option> option is used to pass
891 additional argument to the instance's kernel for this start
892 only. Currently there is no way to specify a persistent set
893 of arguments (beside the one hardcoded). Note that this may
894 not apply to all virtualization types.
898 Use <option>--force</option> to start even if secondary disks are
905 # gnt-instance start instance1.example.com
906 # gnt-instance start --extra single test1.example.com
907 # gnt-instance start --node node1.example.com node2.example.com
908 # gnt-instance start --all
914 <title>SHUTDOWN</title>
917 <command>shutdown</command>
920 <arg>--instance</arg>
923 <arg>--secondary</arg>
929 rep="repeat"><replaceable>name</replaceable></arg>
933 Stops one or more instances. If the instance cannot be
934 cleanly stopped during a hardcoded interval (currently 2
935 minutes), it will forcibly stop the instance (equivalent to
936 switching off the power on a physical machine).
940 The <option>--instance</option>, <option>--node</option>,
941 <option>--primary</option>, <option>--secondary</option> and
942 <option>--all</option> options are similar as for the
943 <command>startup</command> command and they influence the
944 actual instances being shutdown.
950 # gnt-instance shutdown instance1.example.com
951 # gnt-instance shutdown --all
957 <title>REBOOT</title>
960 <command>reboot</command>
962 <arg>--extra=<replaceable>PARAMS</replaceable></arg>
964 <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
966 <arg>--ignore-secondaries</arg>
968 <arg>--force-multiple</arg>
971 <arg>--instance</arg>
974 <arg>--secondary</arg>
980 rep="repeat"><replaceable>name</replaceable></arg>
984 Reboots one or more instances. The type of reboot depends on
985 the value of <option>--type</option>. A soft reboot does a
986 hypervisor reboot, a hard reboot does a instance stop,
987 recreates the hypervisor config for the instance and
988 starts the instance. A full reboot does the equivalent
989 of <command>gnt-instance shutdown && gnt-instance
990 startup</command>. The default is soft reboot.
994 For the hard reboot the option
995 <option>--ignore-secondaries</option> ignores errors for the
996 secondary node while re-assembling the instance disks.
1000 The <option>--instance</option>, <option>--node</option>,
1001 <option>--primary</option>, <option>--secondary</option> and
1002 <option>--all</option> options are similar as for the
1003 <command>startup</command> command and they influence the
1004 actual instances being rebooted.
1008 Use the <option>--force-multiple</option> option to keep
1009 gnt-instance from asking for confirmation when more than one
1010 instance is affected.
1016 # gnt-instance reboot instance1.example.com
1017 # gnt-instance reboot --type=full instance1.example.com
1023 <title>CONSOLE</title>
1025 <command>console</command>
1026 <arg choice="req"><replaceable>instance</replaceable></arg>
1030 Connects to the console of the given instance. If the instance
1031 is not up, an error is returned.
1037 # gnt-instance console instance1.example.com
1045 <title>Disk management</title>
1048 <title>REPLACE-DISKS</title>
1051 <command>replace-disks</command>
1053 <group choice="req">
1054 <arg>--new-secondary <replaceable>NODE</replaceable></arg>
1055 <arg>--iallocator <replaceable>name</replaceable></arg>
1058 <arg choice="req"><replaceable>instance</replaceable></arg>
1062 <command>replace-disks</command>
1064 <group choice="req">
1065 <arg>--iallocator <replaceable>name</replaceable></arg>
1066 <arg>--new-secondary <replaceable>NODE</replaceable></arg>
1070 <arg choice="opt">-s</arg>
1071 <arg choice="req"><replaceable>instance</replaceable></arg>
1075 <command>replace-disks</command>
1078 <arg choice="req">-s</arg>
1079 <arg choice="req">-p</arg>
1081 <arg choice="req"><replaceable>instance</replaceable></arg>
1085 This command is a generalized form for adding and replacing
1090 The first form is usable with the
1091 <literal>remote_raid1</literal> disk template. This will
1092 replace the disks on both the primary and secondary node,
1093 and optionally will change the secondary node to a new one
1094 if you pass the <option>--new-secondary</option> option.
1098 The second and third forms are usable with the
1099 <literal>drbd</literal> disk template. The second form will
1100 do a secondary replacement, but as opposed to the
1101 <literal>remote_raid1</literal> will not replace the disks
1102 on the primary, therefore it will execute faster. The third
1103 form will replace the disks on either the primary
1104 (<option>-p</option>) or the secondary (<option>-s</option>)
1105 node of the instance only, without changing the node.
1109 Specifying <option>--iallocator</option> enables secondary node
1110 replacement and and makes the new secondary be selected automatically
1111 by the specified allocator plugin.
1116 <title>ADD-MIRROR</title>
1118 <command>add-mirror</command>
1119 <arg choice="req">-b <replaceable>sdX</replaceable></arg>
1120 <arg choice="req">-n <replaceable>node</replaceable></arg>
1121 <arg choice="req"><replaceable>instance</replaceable></arg>
1124 Adds a new mirror to the disk layout of the instance, if the
1125 instance has a remote raid disk layout.
1127 The new mirror member will be between the instance's primary
1128 node and the node given with the <option>-n</option> option.
1133 <title>REMOVE-MIRROR</title>
1136 <command>removemirror</command>
1137 <arg choice="req">-b <replaceable>sdX</replaceable></arg>
1138 <arg choice="req">-p <replaceable>id</replaceable></arg>
1139 <arg choice="req"><replaceable>instance</replaceable></arg>
1142 Removes a mirror componenent from the disk layout of the
1143 instance, if the instance has a remote raid disk layout.
1147 You need to specifiy on which disk to act on using the
1148 <option>-b</option> option (either <filename>sda</filename>
1149 or <filename>sdb</filename>) and the mirror component, which
1150 is identified by the <option>-p</option> option. You can
1151 find the list of valid identifiers with the
1152 <command>info</command> command.
1156 <title>ACTIVATE-DISKS</title>
1159 <command>activate-disks</command>
1160 <arg choice="req"><replaceable>instance</replaceable></arg>
1163 Activates the block devices of the given instance. If
1164 successful, the command will show the location and name of
1167 node1.example.com:sda:/dev/md0
1168 node1.example.com:sdb:/dev/md1
1171 In this example, <emphasis>node1.example.com</emphasis> is
1172 the name of the node on which the devices have been
1173 activated. The <emphasis>sda</emphasis> and
1174 <emphasis>sdb</emphasis> are the names of the block devices
1175 inside the instance. <emphasis>/dev/md0</emphasis> and
1176 <emphasis>/dev/md1</emphasis> are the names of the block
1177 devices as visible on the node.
1181 Note that it is safe to run this command while the instance
1187 <title>DEACTIVATE-DISKS</title>
1190 <command>deactivate-disks</command>
1191 <arg choice="req"><replaceable>instance</replaceable></arg>
1194 De-activates the block devices of the given instance. Note
1195 that if you run this command for a remote raid instance
1196 type, while it is running, it will not be able to shutdown
1197 the block devices on the primary node, but it will shutdown
1198 the block devices on the secondary nodes, thus breaking the
1205 <title>GROW-DISK</title>
1207 <command>grow-disk</command>
1208 <arg>--no-wait-for-sync</arg>
1209 <arg choice="req"><replaceable>instance</replaceable></arg>
1210 <arg choice="req"><replaceable>disk</replaceable></arg>
1211 <arg choice="req"><replaceable>amount</replaceable></arg>
1215 Grows an instance's disk. This is only possible for
1216 instances having a <literal>plain</literal> or
1217 <literal>drbd</literal> disk template.
1221 Note that this command only change the block device size; it
1222 will not grow the actual filesystems, partitions, etc. that
1223 live on that disk. Usually, you will need to:
1226 <simpara>use <command>gnt-instance grow-disk</command></simpara>
1229 <simpara>reboot the instance (later, at a convenient
1233 <simpara>use a filesystem resizer, such as
1234 <citerefentry> <refentrytitle>ext2online</refentrytitle>
1235 <manvolnum>8</manvolnum> </citerefentry> or
1236 <citerefentry> <refentrytitle>xfs_growfs</refentrytitle>
1237 <manvolnum>8</manvolnum> </citerefentry> to resize the
1238 filesystem, or use <citerefentry>
1239 <refentrytitle>fdisk</refentrytitle>
1240 <manvolnum>8</manvolnum> </citerefentry> to change the
1241 partition table on the disk
1249 The <replaceable>disk</replaceable> argument is either
1250 <literal>sda</literal> or <literal>sdb</literal>. The
1251 <replaceable>amount</replaceable> argument is given either
1252 as a number (and it represents the amount to increase the
1253 disk with in mebibytes) or can be given similar to the
1254 arguments in the create instance operation, with a suffix
1259 Note that the disk grow operation might complete on one node
1260 but fail on the other; this will leave the instance with
1261 different-sized LVs on the two nodes, but this will not
1262 create problems (except for unused space).
1266 If you do not want gnt-instance to wait for the new disk
1267 region to be synced, use the
1268 <option>--no-wait-for-sync</option> option.
1272 <para>Example (increase sda for instance1 by 16GiB):
1274 # gnt-instance grow-disk instance1.example.com sda 16g
1279 Also note that disk shrinking will not be supported; use
1280 <command>gnt-backup export</command> and then
1281 <command>gnt-backup import</command> to reduce the disk size
1289 <title>Recovery</title>
1292 <title>FAILOVER</title>
1295 <command>failover</command>
1297 <arg>--ignore-consistency</arg>
1298 <arg choice="req"><replaceable>instance</replaceable></arg>
1302 Failover will fail the instance over its secondary
1303 node. This works only for instances having a remote raid
1308 Normally the failover will check the consistency of the
1309 disks before failing over the instance. If you are trying to
1310 migrate instances off a dead node, this will fail. Use the
1311 <option>--ignore-consistency</option> option for this
1312 purpose. Note that this option can be dangerous as errors in
1313 shutting down the instance will be ignored, resulting in
1314 possibly having the instance running on two machines in
1315 parallel (on disconnected DRBD drives).
1321 # gnt-instance failover instance1.example.com
1327 <title>MIGRATE</title>
1330 <command>migrate</command>
1332 <arg choice="req">--cleanup</arg>
1333 <arg choice="req"><replaceable>instance</replaceable></arg>
1337 <command>migrate</command>
1339 <arg>--non-live</arg>
1340 <arg choice="req"><replaceable>instance</replaceable></arg>
1344 Migrate will move the instance to its secondary node without
1345 shutdown. It only works for instances having the drbd8 disk
1350 The migration command needs a perfectly healthy instance, as
1351 we rely on the dual-master capability of drbd8 and the disks
1352 of the instance are not allowed to be degraded.
1356 The <option>--non-live</option> option will switch (for the
1357 hypervisors that support it) between a "fully live"
1358 (i.e. the interruption is as minimal as possible) migration
1359 and one in which the instance is frozen, its state saved and
1360 transported to the remote node, and then resumed there. This
1361 all depends on the hypervisor support for two different
1362 methods. In any case, it is not an error to pass this
1363 parameter (it will just be ignored if the hypervisor doesn't
1368 If the <option>--cleanup</option> option is passed, the
1369 operation changes from migration to attempting recovery from
1370 a failed previous migration. In this mode, ganeti checks if
1371 the instance runs on the correct node (and updates its
1372 configuration if not) and ensures the instances's disks are
1373 configured correctly. In this mode, the
1374 <option>--non-live</option> option is ignored.
1378 The option <option>-f</option> will skip the prompting for
1383 Example (and expected output):
1385 # gnt-instance migrate instance1
1386 Migrate will happen to the instance instance1. Note that migration is
1387 **experimental** in this version. This might impact the instance if
1388 anything goes wrong. Continue?
1390 * checking disk consistency between source and target
1391 * ensuring the target is in secondary mode
1392 * changing disks into dual-master mode
1393 - INFO: Waiting for instance instance1 to sync disks.
1394 - INFO: Instance instance1's disks are in sync.
1395 * migrating instance to node2.example.com
1396 * changing the instance's disks on source node to secondary
1397 - INFO: Waiting for instance instance1 to sync disks.
1398 - INFO: Instance instance1's disks are in sync.
1399 * changing the instance's disks to single-master
1411 <title>ADD-TAGS</title>
1414 <command>add-tags</command>
1415 <arg choice="opt">--from <replaceable>file</replaceable></arg>
1416 <arg choice="req"><replaceable>instancename</replaceable></arg>
1418 rep="repeat"><replaceable>tag</replaceable></arg>
1422 Add tags to the given instance. If any of the tags contains
1423 invalid characters, the entire operation will abort.
1426 If the <option>--from</option> option is given, the list of
1427 tags will be extended with the contents of that file (each
1428 line becomes a tag). In this case, there is not need to pass
1429 tags on the command line (if you do, both sources will be
1430 used). A file name of - will be interpreted as stdin.
1435 <title>LIST-TAGS</title>
1438 <command>list-tags</command>
1439 <arg choice="req"><replaceable>instancename</replaceable></arg>
1442 <para>List the tags of the given instance.</para>
1446 <title>REMOVE-TAGS</title>
1448 <command>remove-tags</command>
1449 <arg choice="opt">--from <replaceable>file</replaceable></arg>
1450 <arg choice="req"><replaceable>instancename</replaceable></arg>
1452 rep="repeat"><replaceable>tag</replaceable></arg>
1456 Remove tags from the given instance. If any of the tags are
1457 not existing on the node, the entire operation will abort.
1461 If the <option>--from</option> option is given, the list of
1462 tags will be extended with the contents of that file (each
1463 line becomes a tag). In this case, there is not need to pass
1464 tags on the command line (if you do, both sources will be
1465 used). A file name of - will be interpreted as stdin.
1477 <!-- Keep this comment at the end of the file
1482 sgml-minimize-attributes:nil
1483 sgml-always-quote-attributes:t
1486 sgml-parent-document:nil
1487 sgml-default-dtd-file:nil
1488 sgml-exposed-tags:nil
1489 sgml-local-catalogs:nil
1490 sgml-local-ecat-files:nil