<arg>plain</arg>
<arg>local_raid1</arg>
<arg>remote_raid1</arg>
+ <arg>drbd</arg>
</group>
</arg>
<sbr>
- <arg choice="req">-n <replaceable>node</replaceable></arg>
+ <arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
<para>
<listitem>
<para>
Disk devices will be md raid1 arrays with one
- component (so it's not actually raid1): a drbd device
- between the instance's primary node and the node given
- by the option <option>--secondary-node</option>.
+ component (so it's not actually raid1): a drbd
+ (0.7.x) device between the instance's primary node
+ and the node given by the second value of the
+ <option>--node</option> option.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>drbd</term>
+ <listitem>
+ <para>
+ Disk devices will be drbd (version 8.x) on top of
+ lvm volumes. They are equivalent in functionality to
+ <replaceable>remote_raid1</replaceable>, but are
+ recommended for new instances (if you have drbd 8.x
+ installed).
</para>
</listitem>
</varlistentry>
</para>
<para>
- The <option>--secondary-node</option> option is used with
- the remote raid disk template type and specifies the remote
- node.
+ The optional second value of the <option>--node</option> is used for
+ the remote raid template type and specifies the remote node.
</para>
<para>
option.
</para>
-
<para>
Example:
<screen>
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
-n node1.example.com instance1.example.com
-# gnt-instance add -t remote_raid1 --secondary-node node3.example.com \
- -s 30g -m 512 -o debian-etch \
- -n node1.example.com instance2.example.com
+# gnt-instance add -t remote_raid1 -s 30g -m 512 -o debian-etch \
+ -n node1.example.com:node2.example.com instance2.example.com
</screen>
</para>
-
</refsect3>
<refsect3>
<cmdsynopsis>
<command>remove</command>
+ <arg>--ignore-failures</arg>
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
you are not sure if you use an instance again, use
<command>shutdown</command> first and leave it in the
shutdown state for a while.
+
+ </para>
+
+ <para>
+ The <option>--ignore-failures</option> option will cause the
+ removal to proceed even in the presence of errors during the
+ removal of the instance (e.g. during the shutdown or the
+ disk removal). If this option is not given, the command will
+ stop at the first error.
</para>
<para>
<varlistentry>
<term>snodes</term>
<listitem>
- <simpara>comma-separated list of secondary-nodes for the
+ <simpara>comma-separated list of secondary nodes for the
instance; usually this will be just one node</simpara>
</listitem>
</varlistentry>
</para>
</refsect3>
+ <refsect3>
+ <title>RENAME</title>
+
+ <cmdsynopsis>
+ <command>rename</command>
+ <arg>--no-ip-check</arg>
+ <arg choice="req"><replaceable>instance</replaceable></arg>
+ <arg choice="req"><replaceable>new_name</replaceable></arg>
+ </cmdsynopsis>
+
+ <para>
+ Renames the given instance. The instance must be stopped
+ when running this command. The requirements for the new name
+ are the same as for adding an instance: the new name must be
+ resolvable and the IP it resolves to must not be reachable
+ (in order to prevent duplicate IPs the next time the
+ instance is started). The IP test can be skipped if the
+ <option>--no-ip-check</option> option is passed.
+ </para>
+ </refsect3>
+
</refsect2>
<refsect2>
</cmdsynopsis>
<para>
- Starts one or more instances, depending on the
- <option>--by-*</option> mode. The four available modes are:
+ Starts one or more instances, depending on the following
+ options. The four available modes are:
<variablelist>
<varlistentry>
<term><option>--instance</option></term>
</para>
<para>
- Note that although you can pass more than one
- <option>--by-</option> option, the last one wins, so in
- order to guarantee the desired result, don't pass more than
- one such option.
+ Note that although you can pass more than one selection
+ option, the last one wins, so in order to guarantee the
+ desired result, don't pass more than one such option.
</para>
<para>
<screen>
# gnt-instance start instance1.example.com
# gnt-instance start --extra single test1.example.com
-# gnt-instance start --by-node node1.example.com node2.example.com
-# gnt-instance start --by-cluster
+# gnt-instance start --node node1.example.com node2.example.com
+# gnt-instance start --all
</screen>
</para>
</refsect3>
<option>--primary</option>, <option>--secondary</option> and
<option>--all</option> options are similar as for the
<command>startup</command> command and they influence the
- actual instances being shutodnw.
+ actual instances being shutdown.
</para>
<para>
Example:
<screen>
# gnt-instance shutdown instance1.example.com
-# gnt-instance shutdown --by-cluster
+# gnt-instance shutdown --all
+ </screen>
+ </para>
+ </refsect3>
+
+ <refsect3>
+ <title>REBOOT</title>
+
+ <cmdsynopsis>
+ <command>reboot</command>
+ <sbr>
+ <arg>--extra=<replaceable>PARAMS</replaceable></arg>
+ <sbr>
+ <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
+ <sbr>
+ <arg>--ignore-secondaries</arg>
+ <sbr>
+ <arg>--force-multiple</arg>
+ <sbr>
+ <group choice="opt">
+ <arg>--instance</arg>
+ <arg>--node</arg>
+ <arg>--primary</arg>
+ <arg>--secondary</arg>
+ <arg>--all</arg>
+ </group>
+ <sbr>
+
+ <arg choice="opt"
+ rep="repeat"><replaceable>name</replaceable></arg>
+ </cmdsynopsis>
+
+ <para>
+ Reboots one or more instances. The type of reboot depends on
+ the value of <option>--type</option>. A soft reboot does a
+ hypervisor reboot, a hard reboot does a instance stop,
+ recreates the hypervisor config for the instance and
+ starts the instance. A full reboot does the equivalent
+ of <command>gnt-instance shutdown && gnt-instance
+ startup</command>. The default is soft reboot.
+ </para>
+
+ <para>
+ For the hard reboot the option
+ <option>--ignore-secondaries</option> ignores errors for the
+ secondary node while re-assembling the instance disks.
+ </para>
+
+ <para>
+ The <option>--instance</option>, <option>--node</option>,
+ <option>--primary</option>, <option>--secondary</option> and
+ <option>--all</option> options are similar as for the
+ <command>startup</command> command and they influence the
+ actual instances being rebooted.
+ </para>
+
+ <para>
+ Use the <option>--force-multiple</option> to keep
+ gnt-instance from asking for confirmation when more than one
+ instance is affected.
+ </para>
+
+ <para>
+ Example:
+ <screen>
+# gnt-instance reboot instance1.example.com
+# gnt-instance reboot --type=full instance1.example.com
</screen>
</para>
</refsect3>
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.
+ purpose. Note that this option can be dangerous as errors in
+ shutting down the instance will be ignored, resulting in
+ possibly having the instance running on two machines in
+ parallel (on disconnected DRBD drives).
</para>
<para>
</refsect2>
+ <refsect2>
+ <title>TAGS</title>
+
+ <refsect3>
+ <title>ADD-TAGS</title>
+
+ <cmdsynopsis>
+ <command>add-tags</command>
+ <arg choice="opt">--from <replaceable>file</replaceable></arg>
+ <arg choice="req"><replaceable>instancename</replaceable></arg>
+ <arg choice="req"
+ rep="repeat"><replaceable>tag</replaceable></arg>
+ </cmdsynopsis>
+
+ <para>
+ Add tags to the given instance. If any of the tags contains
+ invalid characters, the entire operation will abort.
+ </para>
+ <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>
+ </refsect3>
+
+ <refsect3>
+ <title>LIST-TAGS</title>
+
+ <cmdsynopsis>
+ <command>list-tags</command>
+ <arg choice="req"><replaceable>instancename</replaceable></arg>
+ </cmdsynopsis>
+
+ <para>List the tags of the given instance.</para>
+ </refsect3>
+
+ <refsect3>
+ <title>REMOVE-TAGS</title>
+ <cmdsynopsis>
+ <command>remove-tags</command>
+ <arg choice="opt">--from <replaceable>file</replaceable></arg>
+ <arg choice="req"><replaceable>instancename</replaceable></arg>
+ <arg choice="req"
+ rep="repeat"><replaceable>tag</replaceable></arg>
+ </cmdsynopsis>
+
+ <para>
+ Remove tags from the given instance. If any of the tags are
+ not existing on the node, the entire operation will abort.
+ </para>
+
+ <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>
+ </refsect3>
+
+ </refsect2>
+
</refsect1>
&footer;