Commit b9ac33e9 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix the manpage gnt-instance w.r.t. units

The manpage wrongly states that the default unit for disk sizes is
gibibytes, whereas currently it's mebibytes. Fix that and also update
the '--help' output to display the default unit.

Reviewed-by: roman.marxer
parent 16450d30
......@@ -62,10 +62,11 @@
<title>ADD</title>
<cmdsynopsis>
<command>add</command>
<arg choice="req">-n <replaceable>node</replaceable></arg>
<arg>-s <replaceable>disksize</replaceable></arg>
<arg>-o <replaceable>os-type</replaceable></arg>
<arg>--swap-size <replaceable>disksize</replaceable></arg>
<arg>-m <replaceable>memsize</replaceable></arg>
<sbr>
<arg>-o <replaceable>os-type</replaceable></arg>
<arg>-b <replaceable>bridge</replaceable></arg>
<sbr>
<arg choice="req">-t<group>
......@@ -75,6 +76,8 @@
<arg>remote_raid1</arg>
</group>
</arg>
<sbr>
<arg choice="req">-n <replaceable>node</replaceable></arg>
<arg choice="req"><replaceable>instance</replaceable></arg>
</cmdsynopsis>
<para>
......@@ -86,18 +89,32 @@
<para>
The <option>-s</option> option specifies the disk size for
the instance, in gigibytes (defaults to 20 GiB).
the instance, in mebibytes (defaults to
<constant>20480MiB</constant> =
<constant>20GiB</constant>). You can also use one of the
suffixes <literal>m</literal>, <literal>g</literal> or
<literal>t</literal> to specificy the exact the units used;
these suffixes map to mebibytes, gibibytes and tebibytes.
</para>
<para>
The <option>-o</option> options specifies the operating
system to be installed. The available operating systems can
be listed with <command>gnt-os list</command>.
The <option>--swap-size</option> option specifies the swap
disk size (in mebibytes) for the instance (the one presented
as <filename class="devicefile">/dev/sdb</filename>). The
default is <constant>4096MiB</constant>. As for the disk
size, you can specify other suffixes.
</para>
<para>
The <option>-m</option> option specifies the memory size for
the instance, in megibytes (defaults to 128 MiB).
the instance, in mebibytes (defaults to 128 MiB). Again, you
can use other suffixes (e.g. <userinput>2g</userinput>).
</para>
<para>
The <option>-o</option> options specifies the operating
system to be installed. The available operating systems can
be listed with <command>gnt-os list</command>.
</para>
<para>
......@@ -164,10 +181,11 @@
<para>
Example:
<screen>
# gnt-instance add -t plain -s 30 -m 512 -n node1.example.com \
> instance1.example.com
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \
-n node1.example.com instance1.example.com
# gnt-instance add -t remote_raid1 --secondary-node node3.example.com \
> -s 30 -m 512 -n node1.example.com instance2.example.com
-s 30g -m 512 -o debian-etch \
-n node1.example.com instance2.example.com
</screen>
</para>
......
......@@ -433,12 +433,14 @@ os_opt = cli_option("-o", "--os-type", dest="os", help="What OS to run",
add_opts = [
DEBUG_OPT,
node_opt,
cli_option("-s", "--os-size", dest="size", help="Disk size",
cli_option("-s", "--os-size", dest="size", help="Disk size, in MiB unless"
" a suffix is used",
default=20 * 1024, type="unit", metavar="<size>"),
cli_option("--swap-size", dest="swap", help="Swap size",
cli_option("--swap-size", dest="swap", help="Swap size, in MiB unless a"
" suffix is used",
default=4 * 1024, type="unit", metavar="<size>"),
os_opt,
cli_option("-m", "--memory", dest="mem", help="Memory size",
cli_option("-m", "--memory", dest="mem", help="Memory size (in MiB)",
default=128, type="unit", metavar="<mem>"),
make_option("-p", "--cpu", dest="vcpus", help="Number of virtual CPUs",
default=1, type="int", metavar="<PROC>"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment