diff --git a/man/gnt-instance.sgml b/man/gnt-instance.sgml index c3f17ee4acaeda74b923f9cb5c2df015c92f9e2f..d572c64930abd545c7c7389e7261f7775583b0ee 100644 --- a/man/gnt-instance.sgml +++ b/man/gnt-instance.sgml @@ -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> diff --git a/scripts/gnt-instance b/scripts/gnt-instance index a4f173ab5e57385a6239a5d65d61314a6e1569a4..f10ae647f819678787cf81d45df46957fec33627 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -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>"),