| {{-n|--node} *node[:secondary-node]* \| {-I|--iallocator} *name*}
| {{-o|--os-type} *os-type*}
| [--submit]
+| [--ignore-ipolicy]
| {*instance*}
Creates a new instance on the specified host. The *instance* argument
but not wait for its completion. The job ID will be shown so that it
can be examined via **gnt-job info**.
+If ``--ignore-ipolicy`` is given any instance policy violations occuring
+during this operation are ignored.
+
Example::
# gnt-instance add -t file --disk 0:size=30g -B maxmem=512 -o debian-etch \
| **modify**
| [{-H|--hypervisor-parameters} *HYPERVISOR\_PARAMETERS*]
| [{-B|--backend-parameters} *BACKEND\_PARAMETERS*]
+| [{-m|--runtime-memory} *SIZE*]
| [--net add*[:options]* \| --net remove \| --net *N:options*]
| [--disk add:size=*SIZE*[,vg=*VG*][,metavg=*VG*] \| --disk remove \|
| --disk *N*:mode=*MODE*]
| [{-O|--os-parameters} *param*=*value*... ]
| [--offline \| --online]
| [--submit]
+| [--ignore-ipolicy]
| {*instance*}
Modifies the memory size, number of vcpus, ip address, MAC address
to the ``drbd`` template in order to make the instance available for
startup before DRBD has finished resyncing.
+The ``-m (--runtime-memory)`` option will change an instance's runtime
+memory to the given size (in MB if a different suffix is not specified),
+by ballooning it up or down to the new value.
+
The ``--disk add:size=``*SIZE* option adds a disk to the instance. The
optional ``vg=``*VG* option specifies LVM volume group other than
default vg to create the disk on. For DRBD disks, the ``metavg=``*VG*
but not wait for its completion. The job ID will be shown so that it
can be examined via **gnt-job info**.
+If ``--ignore-ipolicy`` is given any instance policy violations occuring
+during this operation are ignored.
+
Most of the changes take effect at the next restart. If the instance is
running, there is no effect on the instance.
REPLACE-DISKS
^^^^^^^^^^^^^
-**replace-disks** [--submit] [--early-release] {-p} [--disks *idx*]
-{*instance*}
+**replace-disks** [--submit] [--early-release] [--ignore-ipolicy] {-p}
+[--disks *idx*] {*instance*}
-**replace-disks** [--submit] [--early-release] {-s} [--disks *idx*]
-{*instance*}
+**replace-disks** [--submit] [--early-release] [--ignore-ipolicy] {-s}
+[--disks *idx*] {*instance*}
-**replace-disks** [--submit] [--early-release] {--iallocator *name*
-\| --new-secondary *NODE*} {*instance*}
+**replace-disks** [--submit] [--early-release] [--ignore-ipolicy]
+{--iallocator *name* \| -- {*instance*}
-**replace-disks** [--submit] [--early-release] {--auto}
-{*instance*}
+**replace-disks** [--submit] [--early-release] [--ignore-ipolicy]
+{--auto} {*instance*}
This command is a generalized form for replacing disks. It is
currently only valid for the mirrored (DRBD) disk template.
broken) or when the storage on the primary node is known to be fine
(thus we won't need the old storage for potential recovery).
+The ``--ignore-ipolicy`` let the command ignore instance policy
+violations if replace-disks changes groups and the instance would
+violate the new groups instance policy.
+
Note that it is not possible to select an offline or drained node as a
new secondary.
RECREATE-DISKS
^^^^^^^^^^^^^^
-**recreate-disks** [--submit] [--disks=``indices``] [-n node1:[node2]]
- {*instance*}
+| **recreate-disks** [--submit] [-n node1:[node2]]
+| [--disk=*N*[:[size=*VAL*][,mode=*ro\|rw*]]] {*instance*}
-Recreates the disks of the given instance, or only a subset of the
-disks (if the option ``disks`` is passed, which must be a
-comma-separated list of disk indices, starting from zero).
+Recreates all or a subset of disks of the given instance.
Note that this functionality should only be used for missing disks; if
any of the given disks already exists, the operation will fail. While
this is suboptimal, recreate-disks should hopefully not be needed in
normal operation and as such the impact of this is low.
+If only a subset should be recreated, any number of ``disk`` options can
+be specified. It expects a disk index and an optional list of disk
+parameters to change. Only ``size`` and ``mode`` can be changed while
+recreating disks. To recreate all disks while changing parameters on
+a subset only, a ``--disk`` option must be given for every disk of the
+instance.
+
Optionally the instance's disks can be recreated on different
nodes. This can be useful if, for example, the original nodes of the
instance have gone down (and are marked offline), so we can't recreate
on the same nodes. To do this, pass the new node(s) via ``-n`` option,
with a syntax similar to the **add** command. The number of nodes
passed must equal the number of nodes that the instance currently
-has. Note that changing nodes is only allowed for 'all disk'
-replacement (when ``--disks`` is not passed).
+has. Note that changing nodes is only allowed when all disks are
+replaced, e.g. when no ``--disk`` option is passed.
The ``--submit`` option is used to send the job to the master daemon
but not wait for its completion. The job ID will be shown so that it
^^^^
**move** [-f] [--ignore-consistency]
-[-n *node*] [--shutdown-timeout=*N*] [--submit]
+[-n *node*] [--shutdown-timeout=*N*] [--submit] [--ignore-ipolicy]
{*instance*}
Move will move the instance to an arbitrary node in the cluster. This
but not wait for its completion. The job ID will be shown so that it
can be examined via **gnt-job info**.
+If ``--ignore-ipolicy`` is given any instance policy violations occuring
+during this operation are ignored.
+
Example::
# gnt-instance move -n node3.example.com instance1.example.com