Revision c615590c

b/lib/cli.py
2647 2647
          raise errors.OpPrereqError("Invalid disk size for disk %d: %s" %
2648 2648
                                     (didx, err), errors.ECODE_INVAL)
2649 2649
      elif constants.IDISK_ADOPT in ddict:
2650
        if constants.IDISK_SPINDLES in ddict:
2651
          raise errors.OpPrereqError("spindles is not a valid option when"
2652
                                     " adopting a disk", errors.ECODE_INVAL)
2650 2653
        if mode == constants.INSTANCE_IMPORT:
2651 2654
          raise errors.OpPrereqError("Disk adoption not allowed for instance"
2652 2655
                                     " import", errors.ECODE_INVAL)
b/lib/cmdlib/instance_storage.py
526 526
  _MODIFYABLE = compat.UniqueFrozenset([
527 527
    constants.IDISK_SIZE,
528 528
    constants.IDISK_MODE,
529
    constants.IDISK_SPINDLES,
529 530
    ])
530 531

  
531 532
  # New or changed disk parameters may have different semantics
b/lib/constants.py
1326 1326

  
1327 1327
# IDISK_* constants are used in opcodes, to create/change disks
1328 1328
IDISK_SIZE = "size"
1329
IDISK_SPINDLES = "spindles"
1329 1330
IDISK_MODE = "mode"
1330 1331
IDISK_ADOPT = "adopt"
1331 1332
IDISK_VG = "vg"
......
1334 1335
IDISK_NAME = "name"
1335 1336
IDISK_PARAMS_TYPES = {
1336 1337
  IDISK_SIZE: VTYPE_SIZE,
1338
  IDISK_SPINDLES: VTYPE_INT,
1337 1339
  IDISK_MODE: VTYPE_STRING,
1338 1340
  IDISK_ADOPT: VTYPE_STRING,
1339 1341
  IDISK_VG: VTYPE_STRING,
b/man/gnt-instance.rst
28 28

  
29 29
| **add**
30 30
| {-t|\--disk-template {diskless \| file \| plain \| drbd \| rbd}}
31
| {\--disk=*N*: {size=*VAL* \| adopt=*LV*}[,options...]
31
| {\--disk=*N*: {size=*VAL*[,spindles=*VAL*] \| adopt=*LV*}[,options...]
32 32
|  \| {size=*VAL*,provider=*PROVIDER*}[,param=*value*... ][,options...]
33 33
|  \| {-s|\--os-size} *SIZE*}
34 34
| [\--no-ip-check] [\--no-name-check] [\--no-conflicts-check]
......
57 57
mebibytes, gibibytes and tebibytes. Each disk can also take these
58 58
parameters (all optional):
59 59

  
60
spindles
61
  How many spindles (physical disks on the node) the disk should span.
62

  
60 63
mode
61 64
  The access mode. Either ``ro`` (read-only) or the default ``rw``
62 65
  (read-write).
......
1103 1106
The ``--disk add:size=*SIZE*,[options..]`` option adds a disk to the
1104 1107
instance, and ``--disk *N*:add:size=*SIZE*,[options..]`` will add a disk
1105 1108
to the the instance at a specific index. The available options are the
1106
same as in the **add** command(``mode``, ``name``, ``vg``, ``metavg``).
1107
When adding an ExtStorage disk the ``provider=*PROVIDER*`` option is
1108
also mandatory and specifies the ExtStorage provider. Also, for
1109
ExtStorage disks arbitrary parameters can be passed as additional comma
1110
separated options, same as in the **add** command. -The ``--disk remove``
1111
option will remove the last disk of the instance. Use
1112
``--disk `` *ID*``:remove`` to remove a disk by its identifier.  *ID*
1113
can be the index of the disk, the disks's name or the disks's UUID.  The
1114
``--disk *ID*:modify[,options...]`` will change the options of the disk.
1109
same as in the **add** command(``spindles``, ``mode``, ``name``, ``vg``,
1110
``metavg``). When adding an ExtStorage disk the ``provider=*PROVIDER*``
1111
option is also mandatory and specifies the ExtStorage provider. Also,
1112
for ExtStorage disks arbitrary parameters can be passed as additional
1113
comma separated options, same as in the **add** command. -The ``--disk
1114
remove`` option will remove the last disk of the instance. Use ``--disk
1115
`` *ID*``:remove`` to remove a disk by its identifier. *ID* can be the
1116
index of the disk, the disks's name or the disks's UUID. The ``--disk
1117
*ID*:modify[,options...]`` will change the options of the disk.
1115 1118
Available options are:
1116 1119

  
1117 1120
mode
......
1616 1619

  
1617 1620
| **recreate-disks** [\--submit]
1618 1621
| [{-n node1:[node2] \| {-I\|\--iallocator *name*}}]
1619
| [\--disk=*N*[:[size=*VAL*][,mode=*ro\|rw*]]] {*instance*}
1622
| [\--disk=*N*[:[size=*VAL*][,spindles=*VAL*][,mode=*ro\|rw*]]] {*instance*}
1620 1623

  
1621 1624
Recreates all or a subset of disks of the given instance.
1622 1625

  
......
1627 1630

  
1628 1631
If only a subset should be recreated, any number of ``disk`` options can
1629 1632
be specified. It expects a disk index and an optional list of disk
1630
parameters to change. Only ``size`` and ``mode`` can be changed while
1631
recreating disks. To recreate all disks while changing parameters on
1632
a subset only, a ``--disk`` option must be given for every disk of the
1633
instance.
1633
parameters to change. Only ``size``, ``spindles``, and ``mode`` can be
1634
changed while recreating disks. To recreate all disks while changing
1635
parameters on a subset only, a ``--disk`` option must be given for every
1636
disk of the instance.
1634 1637

  
1635 1638
Optionally the instance's disks can be recreated on different
1636 1639
nodes. This can be useful if, for example, the original nodes of the

Also available in: Unified diff