Revision b9ac33e9

b/man/gnt-instance.sgml
62 62
        <title>ADD</title>
63 63
        <cmdsynopsis>
64 64
          <command>add</command>
65
          <arg choice="req">-n <replaceable>node</replaceable></arg>
66 65
          <arg>-s <replaceable>disksize</replaceable></arg>
67
          <arg>-o <replaceable>os-type</replaceable></arg>
66
          <arg>--swap-size <replaceable>disksize</replaceable></arg>
68 67
          <arg>-m <replaceable>memsize</replaceable></arg>
68
          <sbr>
69
          <arg>-o <replaceable>os-type</replaceable></arg>
69 70
          <arg>-b <replaceable>bridge</replaceable></arg>
70 71
          <sbr>
71 72
          <arg choice="req">-t<group>
......
75 76
              <arg>remote_raid1</arg>
76 77
            </group>
77 78
          </arg>
79
          <sbr>
80
          <arg choice="req">-n <replaceable>node</replaceable></arg>
78 81
          <arg choice="req"><replaceable>instance</replaceable></arg>
79 82
        </cmdsynopsis>
80 83
        <para>
......
86 89

  
87 90
        <para>
88 91
          The <option>-s</option> option specifies the disk size for
89
          the instance, in gigibytes (defaults to 20 GiB).
92
          the instance, in mebibytes (defaults to
93
          <constant>20480MiB</constant> =
94
          <constant>20GiB</constant>). You can also use one of the
95
          suffixes <literal>m</literal>, <literal>g</literal> or
96
          <literal>t</literal> to specificy the exact the units used;
97
          these suffixes map to mebibytes, gibibytes and tebibytes.
90 98
        </para>
91 99

  
92 100
        <para>
93
          The <option>-o</option> options specifies the operating
94
          system to be installed. The available operating systems can
95
          be listed with <command>gnt-os list</command>.
101
          The <option>--swap-size</option> option specifies the swap
102
          disk size (in mebibytes) for the instance (the one presented
103
          as <filename class="devicefile">/dev/sdb</filename>). The
104
          default is <constant>4096MiB</constant>. As for the disk
105
          size, you can specify other suffixes.
96 106
        </para>
97 107

  
98 108
        <para>
99 109
          The <option>-m</option> option specifies the memory size for
100
          the instance, in megibytes (defaults to 128 MiB).
110
          the instance, in mebibytes (defaults to 128 MiB). Again, you
111
          can use other suffixes (e.g. <userinput>2g</userinput>).
112
        </para>
113

  
114
        <para>
115
          The <option>-o</option> options specifies the operating
116
          system to be installed. The available operating systems can
117
          be listed with <command>gnt-os list</command>.
101 118
        </para>
102 119

  
103 120
        <para>
......
164 181
        <para>
165 182
          Example:
166 183
          <screen>
167
# gnt-instance add -t plain -s 30 -m 512 -n node1.example.com \
168
> instance1.example.com
184
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
185
  -n node1.example.com instance1.example.com
169 186
# gnt-instance add -t remote_raid1 --secondary-node node3.example.com \
170
> -s 30 -m 512 -n node1.example.com instance2.example.com
187
  -s 30g -m 512 -o debian-etch \
188
  -n node1.example.com instance2.example.com
171 189
          </screen>
172 190
        </para>
173 191

  
b/scripts/gnt-instance
433 433
add_opts = [
434 434
  DEBUG_OPT,
435 435
  node_opt,
436
  cli_option("-s", "--os-size", dest="size", help="Disk size",
436
  cli_option("-s", "--os-size", dest="size", help="Disk size, in MiB unless"
437
             " a suffix is used",
437 438
             default=20 * 1024, type="unit", metavar="<size>"),
438
  cli_option("--swap-size", dest="swap", help="Swap size",
439
  cli_option("--swap-size", dest="swap", help="Swap size, in MiB unless a"
440
             " suffix is used",
439 441
             default=4 * 1024, type="unit", metavar="<size>"),
440 442
  os_opt,
441
  cli_option("-m", "--memory", dest="mem", help="Memory size",
443
  cli_option("-m", "--memory", dest="mem", help="Memory size (in MiB)",
442 444
              default=128, type="unit", metavar="<mem>"),
443 445
  make_option("-p", "--cpu", dest="vcpus", help="Number of virtual CPUs",
444 446
              default=1, type="int", metavar="<PROC>"),

Also available in: Unified diff