Add RST version of ganeti-watcher man page
[ganeti-local] / man / gnt-node.sgml
index a35042d..a2eca13 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
   <!-- Please adjust the date whenever revising the manpage. -->
-  <!ENTITY dhdate      "<date>February 12, 2009</date>">
+  <!ENTITY dhdate      "<date>June 08, 2010</date>">
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
     &dhucpackage;
 
     &dhsection;
-    <refmiscinfo>ganeti 2.0</refmiscinfo>
+    <refmiscinfo>Ganeti 2.2</refmiscinfo>
   </refmeta>
   <refnamediv>
     <refname>&dhpackage;</refname>
 
-    <refpurpose>node administration</refpurpose>
+    <refpurpose>Node administration</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <cmdsynopsis>
@@ -50,7 +50,7 @@
 
     <para>
       The <command>&dhpackage;</command> is used for managing the
-      (physical) nodes in the ganeti system.
+      (physical) nodes in the Ganeti system.
     </para>
 
   </refsect1>
@@ -64,6 +64,9 @@
         <command>add</command>
         <arg>--readd</arg>
         <arg>-s <replaceable>secondary_ip</replaceable></arg>
+        <arg>-g <replaceable>nodegroup</replaceable></arg>
+        <arg>--master-capable=<option>yes|no</option></arg>
+        <arg>--vm-capable=<option>yes|no</option></arg>
         <arg choice="req"><replaceable>nodename</replaceable></arg>
       </cmdsynopsis>
 
@@ -75,7 +78,7 @@
         This command is used to join a new node to the cluster. You
         will have to provide the password for root of the node to be
         able to add the node in the cluster. The command needs to be
-        run on the ganeti master.
+        run on the Ganeti master.
       </para>
 
       <para>
@@ -91,7 +94,7 @@
         discussion in <citerefentry>
         <refentrytitle>gnt-cluster</refentrytitle>
         <manvolnum>8</manvolnum> </citerefentry> for more
-        informations.
+        information.
       </para>
 
       <para>
       </para>
 
       <para>
+        The <option>-g</option> is used to add the new node into a specific
+        node group, specified by uuid or name. If only one node group exists
+        you can skip this option, otherwise it's mandatory.
+      </para>
+
+      <para>
+        The <option>vm_capable</option>
+        and <option>master_capable</option> options are described
+        in <citerefentry><refentrytitle>ganeti</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+        and are used to set the properties of the new node.
+      </para>
+
+      <para>
         Example:
         <screen>
 # gnt-node add node5.example.com
-# gnt-node add -s 192.168.44.5 node5.example.com
+# gnt-node add -s 192.0.2.5 node5.example.com
+# gnt-node add -g group2 -s 192.0.2.9 node9.group2.example.com
         </screen>
       </para>
     </refsect2>
       <cmdsynopsis>
         <command>evacuate</command>
         <arg>-f</arg>
+        <arg>--early-release</arg>
         <group>
           <arg>--iallocator <replaceable>NAME</replaceable></arg>
           <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
         </group>
-        <arg choice="req"><replaceable>node</replaceable></arg>
+        <arg choice="req" rep="repeat"><replaceable>node</replaceable></arg>
       </cmdsynopsis>
 
       <para>
         This command will move all secondary instances away from the
-        given node. It works only for instances having a drbd disk
+        given node(s). It works only for instances having a drbd disk
         template.
       </para>
 
       </para>
 
       <para>
+        The <option>--early-release</option> changes the code so that
+        the old storage on node being evacuated is removed early
+        (before the resync is completed) and the internal Ganeti locks
+        are also released for both the current secondary and the new
+        secondary, thus allowing more parallelism in the cluster
+        operation. This should be used only when recovering from a
+        disk failure on the current secondary (thus the old storage is
+        already broken) or when the storage on the primary node is
+        known to be fine (thus we won't need the old storage for
+        potential recovery).
+      </para>
+
+      <para>
         Example:
         <screen>
           # gnt-node evacuate -I dumb node3.example.com
         <arg>--units=<replaceable>UNITS</replaceable></arg>
         <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
         <sbr>
+        <arg>--roman</arg>
+        <sbr>
         <arg rep="repeat">node</arg>
       </cmdsynopsis>
 
       </para>
 
       <para>
+        Passing the <option>--roman</option> option gnt-node list will try to
+        output some of its fields in a latin-friendly way. This is not the
+        default for backwards compatibility.
+      </para>
+
+      <para>
         The <option>-o</option> option takes a comma-separated list of
         output fields. The available fields and their meaning are:
         <variablelist>
           <varlistentry>
             <term>serial_no</term>
             <listitem>
-              <simpara>the so called 'serial number' of the instance;
+              <simpara>the so called 'serial number' of the node;
               this is a numeric field that is incremented each time
-              the instance is modified, and it can be used to detect
+              the node is modified, and it can be used to detect
               modifications</simpara>
             </listitem>
           </varlistentry>
           <varlistentry>
+            <term>ctime</term>
+            <listitem>
+              <para>
+                the creation time of the node; note that this field
+                contains spaces and as such it's harder to parse
+              </para>
+              <para>
+                if this attribute is not present (e.g. when upgrading
+                from older versions), then "N/A" will be shown instead
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>mtime</term>
+            <listitem>
+              <para>
+                the last modification time of the node; note that this
+                field contains spaces and as such it's harder to parse
+              </para>
+              <para>
+                if this attribute is not present (e.g. when upgrading
+                from older versions), then "N/A" will be shown instead
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>uuid</term>
+            <listitem>
+              <simpara>Show the UUID of the node (generated
+                automatically by Ganeti)</simpara>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
             <term>ctotal</term>
             <listitem>
               <simpara>the toal number of logical processors</simpara>
               </para>
             </listitem>
           </varlistentry>
+          <varlistentry>
+            <term>master_capable</term>
+            <listitem>
+              <para>whether the node can become a master candidate</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>vm_capable</term>
+            <listitem>
+              <para>whether the node can host instances</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>group</term>
+            <listitem>
+              <para>the name of the node's group, if known (the query
+              is done without locking, so data consistency is not
+              guaranteed)</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>group.uuid</term>
+            <listitem>
+              <para>the UUID of the node's group</para>
+            </listitem>
+          </varlistentry>
         </variablelist>
       </para>
 
         <command>migrate</command>
         <arg>-f</arg>
         <arg>--non-live</arg>
+        <arg>--migration-mode=live|non-live</arg>
         <arg choice="req"><replaceable>node</replaceable></arg>
       </cmdsynopsis>
 
 
       <para>
         As for the <command>gnt-instance migrate</command> command,
-        the <option>--no-live</option> option can be given to do a
-        non-live migration.
+        the options <option>--no-live</option>
+        and <option>--migration-mode</option> can be given to
+        influence the migration type.
       </para>
 
       <para>
         <arg>--master-candidate=<option>yes|no</option></arg>
         <arg>--drained=<option>yes|no</option></arg>
         <arg>--offline=<option>yes|no</option></arg>
+        <arg>--master-capable=<option>yes|no</option></arg>
+        <arg>--vm-capable=<option>yes|no</option></arg>
+        <arg>-s <replaceable>secondary_ip</replaceable></arg>
+        <arg>--auto-promote</arg>
         <arg choice="req"><replaceable>node</replaceable></arg>
       </cmdsynopsis>
 
         This command changes the role of the node. Each options takes
         either a literal <literal>yes</literal> or
         <literal>no</literal>, and only one option should be given as
-        <literal>yes</literal>. The meaning of the roles are described
-        in the manpage <citerefentry>
+        <literal>yes</literal>. The meaning of the roles and flags are
+        described in the manpage <citerefentry>
         <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
         </citerefentry>.
       </para>
 
       <para>
-        In case a node is demoted from the master candidate role, but
-        there are not enough new nodes for this case, the operation
-        will be refused. To override this check, pass the
-        <option>--force</option> option.
+        In case a node is demoted from the master candidate role, the
+        operation will be refused unless you pass
+        the <option>--auto-promote</option> option. This option will
+        cause the operation to lock all cluster nodes (thus it will
+        not be able to run in parallel with most other jobs), but it
+        allows automated maintenance of the cluster candidate pool. If
+        locking all cluster node is too expensive, another option is
+        to promote manually another node to master candidate before
+        demoting the current one.
       </para>
 
       <para>
         </screen>
       </para>
 
+      <para>
+        The <option>-s</option> can be used to change the node's secondary ip.
+        No drbd instances can be running on the node, while this operation is
+        taking place.
+      </para>
+
       <para>Example (setting the node back to online and master candidate):
         <screen>
 # gnt-node modify --offline=no --master-candidate=yes node1.example.com
@@ -721,6 +837,231 @@ node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  inst
       </para>
     </refsect2>
 
+    <refsect2>
+      <title>LIST-STORAGE</title>
+
+      <cmdsynopsis>
+        <command>list-storage</command>
+        <arg>--no-headers</arg>
+        <arg>--human-readable</arg>
+        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
+        <arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg>
+        <arg>--output=<replaceable>FIELDS</replaceable></arg>
+        <sbr>
+        <arg rep="repeat"><replaceable>node</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        Lists the available storage units and their details for the
+        given node(s).
+      </para>
+
+      <para>
+        The <option>--no-headers</option> option will skip the initial header
+        line. The <option>--separator</option> option takes an argument which
+        denotes what will be used between the output fields. Both these options
+        are to help scripting.
+      </para>
+
+      <para>
+        The units used to display the numeric values in the output varies,
+        depending on the options given. By default, the values will be
+        formatted in the most appropriate unit. If the
+        <option>--separator</option> option is given, then the values are shown
+        in mebibytes to allow parsing by scripts. In both cases, the
+        <option>--units</option> option can be used to enforce a given output
+        unit.
+      </para>
+
+      <para>
+        The <option>--storage-type</option> option can be used to choose a
+        storage unit type. Possible choices are <literal>lvm-pv</literal>,
+        <literal>lvm-vg</literal> or <literal>file</literal>.
+      </para>
+
+      <para>
+        The <option>-o</option> option takes a comma-separated list of
+        output fields. The available fields and their meaning are:
+        <variablelist>
+          <varlistentry>
+            <term>node</term>
+            <listitem>
+              <simpara>the node name on which the volume exists</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>type</term>
+            <listitem>
+              <simpara>the type of the storage unit (currently just
+              what is passed in via
+              <option>--storage-type</option>)</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>name</term>
+            <listitem>
+              <simpara>the path/identifier of the storage unit</simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>size</term>
+            <listitem>
+              <simpara>
+                total size of the unit; for the file type see a note below
+              </simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>used</term>
+            <listitem>
+              <simpara>
+                used space in the unit; for the file type see a note below
+              </simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>free</term>
+            <listitem>
+              <simpara>
+                available disk space
+              </simpara>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>allocatable</term>
+            <listitem>
+              <simpara>
+                whether we the unit is available for allocation
+                (only <literal>lvm-pv</literal> can change this
+                setting, the other types always report true)
+              </simpara>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </para>
+
+      <para>
+        Note that for the <quote>file</quote> type, the total disk
+        space might not equal to the sum of used and free, due to the
+        method Ganeti uses to compute each of them. The total and free
+        values are computed as the total and free space values for the
+        filesystem to which the directory belongs, but the used space
+        is computed from the used space under that directory
+        <emphasis>only</emphasis>, which might not be necessarily the
+        root of the filesystem, and as such there could be files
+        outside the file storage directory using disk space and
+        causing a mismatch in the values.
+      </para>
+
+      <para>
+        Example:
+        <screen>
+node1# gnt-node list-storage node2
+Node  Type   Name        Size Used   Free Allocatable
+node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y
+node2 lvm-pv /dev/sdb1 698.6G   0M 698.6G Y
+        </screen>
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>MODIFY-STORAGE</title>
+
+      <cmdsynopsis>
+        <command>modify-storage</command>
+        <arg><option>--allocatable=yes|no</option></arg>
+        <sbr>
+        <arg choice="req"><replaceable>node</replaceable></arg>
+        <arg choice="req"><replaceable>storage-type</replaceable></arg>
+        <arg choice="req"><replaceable>volume-name</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        Modifies storage volumes on a node. Only LVM physical volumes
+        can be modified at the moment. They have a storage type
+        of <quote>lvm-pv</quote>.
+      </para>
+
+      <para>
+        Example:
+        <screen>
+# gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
+        </screen>
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>REPAIR-STORAGE</title>
+
+      <cmdsynopsis>
+        <command>repair-storage</command>
+        <arg>--ignore-consistency</arg>
+        <arg choice="req"><replaceable>node</replaceable></arg>
+        <arg choice="req"><replaceable>storage-type</replaceable></arg>
+        <arg choice="req"><replaceable>volume-name</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        Repairs a storage volume on a node. Only LVM volume groups can
+        be repaired at this time. They have the storage type
+        <quote>lvm-vg</quote>.
+      </para>
+
+      <para>
+        On LVM volume groups, <command>repair-storage</command> runs
+        <quote>vgreduce --removemissing</quote>.
+      </para>
+
+      <caution>
+        <para>
+          Running this command can lead to data loss. Use it with care.
+        </para>
+      </caution>
+
+      <para>
+        The <option>--ignore-consistency</option> option will ignore
+        any inconsistent disks (on the nodes paired with this
+        one). Use of this option is most likely to lead to data-loss.
+      </para>
+
+      <para>
+        Example:
+        <screen>
+# gnt-node repair-storage node5.example.com lvm-vg xenvg
+        </screen>
+      </para>
+    </refsect2>
+
+    <refsect2>
+      <title>POWERCYCLE</title>
+
+      <cmdsynopsis>
+        <command>powercycle</command>
+        <arg><option>--yes</option></arg>
+        <arg><option>--force</option></arg>
+        <arg choice="req"><replaceable>node</replaceable></arg>
+      </cmdsynopsis>
+
+      <para>
+        This commands (tries to) forcefully reboot a node. It is a
+        command that can be used if the node environemnt is broken,
+        such that the admin can no longer login over ssh, but the
+        Ganeti node daemon is still working.
+      </para>
+
+      <para>
+        Note that this command is not guaranteed to work; it depends
+        on the hypervisor how effective is the reboot attempt. For
+        Linux, this command require that the kernel option
+        <literal>CONFIG_MAGIC_SYSRQ</literal> is enabled.
+      </para>
+
+      <para>
+        The <option>--yes</option> option can be used to skip
+        confirmation, while the <option>--force</option> option is
+        needed if the target node is the master node.
+      </para>
+
   </refsect1>
 
   &footer;