gnt-instance recreate-disks: Allow specifying new size
[ganeti-local] / man / gnt-instance.rst
index 4ca5c41..59ed6f2 100644 (file)
@@ -39,6 +39,7 @@ ADD
 | {{-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
@@ -629,6 +630,9 @@ 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
 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 \
@@ -853,6 +857,7 @@ MODIFY
 | **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*]
@@ -861,6 +866,7 @@ MODIFY
 | [{-O|--os-parameters} *param*=*value*... ]
 | [--offline \| --online]
 | [--submit]
+| [--ignore-ipolicy]
 | {*instance*}
 
 Modifies the memory size, number of vcpus, ip address, MAC address
@@ -882,6 +888,10 @@ option. The option ``--no-wait-for-sync`` can be used when converting
 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*
@@ -914,6 +924,9 @@ 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
 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.
 
@@ -1192,17 +1205,17 @@ Disk management
 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.
@@ -1241,6 +1254,10 @@ disk failure on the current secondary (thus the old storage is already
 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.
 
@@ -1348,26 +1365,31 @@ instance.
 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
@@ -1487,7 +1509,7 @@ MOVE
 ^^^^
 
 **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
@@ -1510,6 +1532,9 @@ 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
 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