Commit 17227cd1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Update documentation for disk adoption


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 5029db65
......@@ -326,6 +326,27 @@ one must specify the location of the snapshot. The command is::
Most of the options available for the command :command:`gnt-instance
add` are supported here too.
Import of foreign instances
+++++++++++++++++++++++++++
There is a possibility to import a foreign instance whose disk data is
already stored as LVM volumes without going through copying it: the disk
adoption mode.
For this, ensure that the original, non-managed instance is stopped,
then create a Ganeti instance in the usual way, except that instead of
passing the disk information you specify the current volumes::
gnt-instance add -t plain -n HOME_NODE ... \
--disk 0:adopt=lv_name INSTANCE_NAME
This will take over the given logical volumes, rename them to the Ganeti
standard (UUID-based), and without installing the OS on them start
directly the instance. If you configure the hypervisor similar to the
non-managed configuration that the instance had, the transition should
be seamless for the instance. For more than one disk, just pass another
disk parameter (e.g. ``--disk 1:adopt=...``).
Instance HA features
--------------------
......
......@@ -75,7 +75,10 @@
<sbr>
<group choice="req">
<arg rep="repeat">--disk=<replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
<arg rep="repeat">--disk=<replaceable>N</replaceable>:<group choice="req">
<arg>size=<replaceable>VAL</replaceable></arg>
<arg>adopt=<replaceable>LV</replaceable></arg>
</group>,mode=<replaceable>ro|rw</replaceable></arg>
<arg>-s <replaceable>SIZE</replaceable></arg>
</group>
<sbr>
......@@ -126,15 +129,28 @@
The <option>disk</option> option specifies the parameters
for the disks of the instance. The numbering of disks starts
at zero, and at least one disk needs to be passed. For each
disk, at least the size needs to be given, and optionally
the access mode (read-only or the default of read-write) can
also be specified. The size is interpreted (when no unit is
given) in mebibytes. You can also use one of the suffixes
disk, either the size or the adoption source needs to be
given, and optionally the access mode (read-only or the
default of read-write) can also be specified. The size is
interpreted (when no unit is given) in mebibytes. You can
also use one of the suffixes
<literal>m</literal>, <literal>g</literal> or
<literal>t</literal> to specificy the exact the units used;
these suffixes map to mebibytes, gibibytes and tebibytes.
</para>
<para>
When using the <option>adopt</option> key in the disk
definition, Ganeti will reuse those volumes (instead of
creating new ones) as the instance's disks. Ganeti will
rename these volumes to the standard format, and (without
installing the OS) will use them as-is for the
instance. This allows migrating instances from non-managed
mode (e.q. plain KVM with LVM) to being managed via
Ganeti. Note that this works only for the `plain' disk
template (see below for template details).
</para>
<para>
Alternatively, a single-disk instance can be created via the
<option>-s</option> option which takes a single argument,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment