Revision 7af3534e

b/doc/admin.rst
356 356
passing the disk information you specify the current volumes::
357 357

  
358 358
  gnt-instance add -t plain -n HOME_NODE ... \
359
    --disk 0:adopt=lv_name INSTANCE_NAME
359
    --disk 0:adopt=lv_name[,vg=vg_name] INSTANCE_NAME
360 360

  
361 361
This will take over the given logical volumes, rename them to the Ganeti
362 362
standard (UUID-based), and without installing the OS on them start
b/lib/constants.py
664 664
IDISK_SIZE = "size"
665 665
IDISK_MODE = "mode"
666 666
IDISK_ADOPT = "adopt"
667
IDISK_VG = "vg"
667 668
IDISK_PARAMS_TYPES = {
668 669
  IDISK_SIZE: VTYPE_SIZE,
669 670
  IDISK_MODE: VTYPE_STRING,
670 671
  IDISK_ADOPT: VTYPE_STRING,
672
  IDISK_VG: VTYPE_STRING,
671 673
  }
672 674
IDISK_PARAMS = frozenset(IDISK_PARAMS_TYPES.keys())
673 675

  
b/man/gnt-backup.rst
63 63

  
64 64
| **import**
65 65
| {-n *node[:secondary-node]* | --iallocator *name*}
66
| [--disk *N*:size=*VAL* [,mode=*ro|rw*]...]
66
| [--disk *N*:size=*VAL* [,vg=*VG*], [,mode=*ro|rw*]...]
67 67
| [--net *N* [:options...] | --no-nics]
68 68
| [-B *BEPARAMS*]
69 69
| [-H *HYPERVISOR* [: option=*value*... ]]
......
81 81
The ``disk`` option specifies the parameters for the disks of the
82 82
instance. The numbering of disks starts at zero. For each disk, at
83 83
least the size needs to be given, and optionally the access mode
84
(read-only or the default of read-write) can also be specified. The
85
size is interpreted (when no unit is given) in mebibytes. You can
86
also use one of the suffixes m, g or t to specificy the exact the
87
units used; these suffixes map to mebibytes, gibibytes and
88
tebibytes.
84
(read-only or the default of read-write) and LVM volume group can also
85
be specified. The size is interpreted (when no unit is given) in
86
mebibytes. You can also use one of the suffixes m, g or t to specificy
87
the exact the units used; these suffixes map to mebibytes, gibibytes
88
and tebibytes.
89 89

  
90 90
Alternatively, a single-disk instance can be created via the ``-s``
91 91
option which takes a single argument, the size of the disk. This is
b/man/gnt-instance.rst
28 28

  
29 29
| **add**
30 30
| {-t {diskless | file \| plain \| drbd}}
31
| {--disk=*N*: {size=*VAL* \| adopt=*LV*},mode=*ro\|rw* \| -s *SIZE*}
31
| {--disk=*N*: {size=*VAL* \| adopt=*LV*}[,vg=*VG*][,mode=*ro\|rw*]
32
|  \| -s *SIZE*}
32 33
| [--no-ip-check] [--no-name-check] [--no-start] [--no-install]
33 34
| [--net=*N* [:options...] \| --no-nics]
34 35
| [-B *BEPARAMS*]
......
47 48
instance. The numbering of disks starts at zero, and at least one disk
48 49
needs to be passed. For each disk, either the size or the adoption
49 50
source needs to be given, and optionally the access mode (read-only or
50
the default of read-write) can also be specified. The size is
51
interpreted (when no unit is given) in mebibytes. You can also use one
52
of the suffixes *m*, *g* or *t* to specify the exact the units used;
53
these suffixes map to mebibytes, gibibytes and tebibytes.
51
the default of read-write) and LVM volume group can also be specified.
52
The size is interpreted (when no unit is given) in mebibytes. You can
53
also use one of the suffixes *m*, *g* or *t* to specify the exact the
54
units used; these suffixes map to mebibytes, gibibytes and tebibytes.
54 55

  
55 56
When using the ``adopt`` key in the disk definition, Ganeti will
56 57
reuse those volumes (instead of creating new ones) as the
......
477 478
      -n node1.example.com --file-storage-dir=mysubdir instance1.example.com
478 479
    # gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \
479 480
      -n node1.example.com instance1.example.com
481
    # gnt-instance add -t plain --disk 0:size=30g --disk 1:size=100g,vg=san \
482
      -B memory=512 -o debian-etch -n node1.example.com instance1.example.com
480 483
    # gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \
481 484
      -n node1.example.com:node2.example.com instance2.example.com
482 485

  
......
833 836
| [-H *HYPERVISOR\_PARAMETERS*]
834 837
| [-B *BACKEND\_PARAMETERS*]
835 838
| [--net add*[:options]* \| --net remove \| --net *N:options*]
836
| [--disk add:size=*SIZE* \| --disk remove \| --disk *N*:mode=*MODE*]
839
| [--disk add:size=*SIZE*[,vg=*VG*] \| --disk remove \|
840
|  --disk *N*:mode=*MODE*]
837 841
| [-t plain | -t drbd -n *new_secondary*]
838 842
| [--os-name=*OS* [--force-variant]]
839 843
| [--submit]
......
855 859
new secondary node must be specified via the ``-n`` option.
856 860

  
857 861
The ``--disk add:size=``*SIZE* option adds a disk to the instance. The
858
``--disk remove`` option will remove the last disk of the
859
instance. The ``--disk`` *N*``:mode=``*MODE* option will change the
860
mode of the Nth disk of the instance between read-only (``ro``) and
862
optional ``vg=``*VG* option specifies LVM volume group other than default
863
vg to create disk on. The ``--disk remove`` option will remove the last
864
disk of the instance. The ``--disk`` *N*``:mode=``*MODE* option will change
865
the mode of the Nth disk of the instance between read-only (``ro``) and
861 866
read-write (``rw``).
862 867

  
863 868
The ``--net add:``*options* option will add a new NIC to the

Also available in: Unified diff