Implement node failover
[ganeti-local] / man / gnt-node.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4   <!-- Please adjust the date whenever revising the manpage. -->
5   <!ENTITY dhdate      "<date>June 20, 2007</date>">
6   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7        allowed: see man(7), man(1). -->
8   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
9   <!ENTITY dhucpackage "<refentrytitle>gnt-node</refentrytitle>">
10   <!ENTITY dhpackage   "gnt-node">
11
12   <!ENTITY debian      "<productname>Debian</productname>">
13   <!ENTITY gnu         "<acronym>GNU</acronym>">
14   <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
15   <!ENTITY footer SYSTEM "footer.sgml">
16 ]>
17
18 <refentry>
19   <refentryinfo>
20     <copyright>
21       <year>2006</year>
22       <year>2007</year>
23       <holder>Google Inc.</holder>
24     </copyright>
25     &dhdate;
26   </refentryinfo>
27   <refmeta>
28     &dhucpackage;
29
30     &dhsection;
31     <refmiscinfo>ganeti 1.2</refmiscinfo>
32   </refmeta>
33   <refnamediv>
34     <refname>&dhpackage;</refname>
35
36     <refpurpose>node administration</refpurpose>
37   </refnamediv>
38   <refsynopsisdiv>
39     <cmdsynopsis>
40       <command>&dhpackage; </command>
41
42       <arg choice="req">command</arg>
43       <arg>arguments...</arg>
44     </cmdsynopsis>
45   </refsynopsisdiv>
46   <refsect1>
47     <title>DESCRIPTION</title>
48
49     <para>
50       The <command>&dhpackage;</command> is used for managing the
51       (physical) nodes in the ganeti system.
52     </para>
53
54   </refsect1>
55   <refsect1>
56     <title>COMMANDS</title>
57
58     <refsect2>
59       <title>ADD</title>
60
61       <cmdsynopsis>
62         <command>add</command>
63         <arg>-s <replaceable>secondary_ip</replaceable></arg>
64         <arg choice="req"><replaceable>nodename</replaceable></arg>
65       </cmdsynopsis>
66
67       <para>
68         Adds the given node to the cluster.
69       </para>
70
71       <para>
72         This command is used to join a new node to the cluster. You
73         will have to provide the password for root of the node to be
74         able to add the node in the cluster. The command needs to be
75         run on the ganeti master.
76       </para>
77
78       <para>
79         Note that the command is potentially destructive, as it will
80         forcibly join the specified host the cluster, not paying
81         attention to its current status (it could be already in a
82         cluster, etc.)
83       </para>
84
85       <para>
86         The <option>-s</option> is used in dual-home clusters and
87         specifies the new node's IP in the secondary network. See the
88         discussion in <citerefentry>
89         <refentrytitle>gnt-cluster</refentrytitle>
90         <manvolnum>8</manvolnum> </citerefentry> for more
91         informations.
92       </para>
93
94       <para>
95         Example:
96         <screen>
97 # gnt-node add node5.example.com
98 # gnt-node add -s 192.168.44.5 node5.example.com
99         </screen>
100       </para>
101     </refsect2>
102
103     <refsect2>
104       <title>ADD-TAGS</title>
105
106       <cmdsynopsis>
107         <command>add-tags</command>
108         <arg choice="opt">--from <replaceable>file</replaceable></arg>
109         <arg choice="req"><replaceable>nodename</replaceable></arg>
110         <arg choice="req"
111         rep="repeat"><replaceable>tag</replaceable></arg>
112       </cmdsynopsis>
113
114       <para>
115         Add tags to the given node. If any of the tags contains
116         invalid characters, the entire operation will abort.
117       </para>
118
119       <para>
120         If the <option>--from</option> option is given, the list of
121         tags will be extended with the contents of that file (each
122         line becomes a tag). In this case, there is not need to pass
123         tags on the command line (if you do, both sources will be
124         used). A file name of - will be interpreted as stdin.
125       </para>
126     </refsect2>
127
128     <refsect2>
129       <title>FAILOVER</title>
130
131       <cmdsynopsis>
132         <command>failover</command>
133         <arg>-f</arg>
134         <arg>--ignore-consistency</arg>
135         <arg choice="req"><replaceable>node</replaceable></arg>
136       </cmdsynopsis>
137
138       <para>
139         This command will fail over all instances having the given
140         node as primary to their secondary nodes. This works only for
141         instances having a remote raid disk layout.
142       </para>
143
144       <para>
145         Normally the failover will check the consistency of the disks
146         before failing over the instance. If you are trying to migrate
147         instances off a dead node, this will fail. Use the
148         <option>--ignore-consistency</option> option for this purpose.
149       </para>
150
151       <para>
152         Example:
153         <screen>
154           # gnt-node failover node1.example.com
155         </screen>
156       </para>
157     </refsect2>
158
159     <refsect2>
160       <title>INFO</title>
161
162       <cmdsynopsis>
163         <command>info</command>
164         <arg rep="repeat"><replaceable>node</replaceable></arg>
165       </cmdsynopsis>
166
167       <para>
168         Show detailed information about the nodes in the cluster. If you
169         don't give any arguments, all nodes will be shows, otherwise the
170         output will be restricted to the given names.
171       </para>
172     </refsect2>
173
174     <refsect2>
175       <title>LIST</title>
176
177       <cmdsynopsis>
178         <command>list</command>
179         <arg>--no-headers</arg>
180         <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
181         <arg>-o <replaceable>FIELD,...</replaceable></arg>
182       </cmdsynopsis>
183
184       <para>
185         Lists the nodes in the cluster. If you give the
186         <option>--ip-info</option> option, the output contains just
187         the node name, primary ip and secondary ip. In case the
188         secondary ip is the same as the primary one, it will be listed
189         as <emphasis>"-"</emphasis>.
190       </para>
191
192       <para>
193         The <option>--no-headers</option> option will skip the initial
194         header line. The <option>--separator</option> option takes an
195         argument which denotes what will be used between the output
196         fields. Both these options are to help scripting.
197       </para>
198
199       <para>
200         The <option>-o</option> option takes a comma-separated list of
201         output fields. The available fields and their meaning are:
202         <variablelist>
203           <varlistentry>
204             <term>name</term>
205             <listitem>
206               <simpara>the node name</simpara>
207             </listitem>
208           </varlistentry>
209           <varlistentry>
210             <term>pinst</term>
211             <listitem>
212               <simpara>the number of instances having this node as
213               primary</simpara>
214             </listitem>
215           </varlistentry>
216           <varlistentry>
217             <term>sinst</term>
218             <listitem>
219               <simpara>the number of instances having this node as a
220               secondary node</simpara>
221             </listitem>
222           </varlistentry>
223           <varlistentry>
224             <term>pip</term>
225             <listitem>
226               <simpara>the primary ip of this node (used for cluster
227               communication)</simpara>
228             </listitem>
229           </varlistentry>
230           <varlistentry>
231             <term>sip</term>
232             <listitem>
233               <simpara>
234                 the secondary ip of this node (used for data
235                 replication in dual-ip clusters, see <citerefentry>
236                 <refentrytitle>gnt-cluster</refentrytitle>
237                 <manvolnum>8</manvolnum>
238                 </citerefentry>
239               </simpara>
240             </listitem>
241           </varlistentry>
242           <varlistentry>
243             <term>dtotal</term>
244             <listitem>
245               <simpara>total disk space in the volume group used for
246               instance disk allocations</simpara>
247             </listitem>
248           </varlistentry>
249           <varlistentry>
250             <term>dfree</term>
251             <listitem>
252               <simpara>available disk space in the volume group</simpara>
253             </listitem>
254           </varlistentry>
255           <varlistentry>
256             <term>mtotal</term>
257             <listitem>
258               <simpara>total memory on the physical node</simpara>
259             </listitem>
260           </varlistentry>
261           <varlistentry>
262             <term>mnode</term>
263             <listitem>
264               <simpara>the memory used by the node itself</simpara>
265             </listitem>
266           </varlistentry>
267           <varlistentry>
268             <term>mfree</term>
269             <listitem>
270               <simpara>memory available for instance
271               allocations</simpara>
272             </listitem>
273           </varlistentry>
274         </variablelist>
275       </para>
276
277       <para>
278         Note that some of this fields are known from the configuration
279         of the cluster (<simplelist type="inline">
280         <member>name</member> <member>pinst</member>
281         <member>sinst</member> <member>pip</member>
282         <member>sip</member> </simplelist> and thus the master does
283         not need to contact the node for this data (making the listing
284         fast if only fields from this set are selected), whereas the
285         other fields are "live" fields and we need to make a query to
286         the cluster nodes.
287       </para>
288
289       <para>
290         Depending on the virtualization type and implementation
291         details, the mtotal, mnode and mfree may have slighly varying
292         meanings. For example, some solutions share the node memory
293         with the pool of memory used for instances
294         (<acronym>UML</acronym>), whereas others have separate memory
295         for the node and for the instances (Xen).
296       </para>
297     </refsect2>
298
299     <refsect2>
300       <title>LIST-TAGS</title>
301
302       <cmdsynopsis>
303         <command>list-tags</command>
304         <arg choice="req"><replaceable>nodename</replaceable></arg>
305       </cmdsynopsis>
306
307       <para>List the tags of the given node.</para>
308     </refsect2>
309
310     <refsect2>
311       <title>REMOVE</title>
312
313       <cmdsynopsis>
314         <command>remove</command>
315         <arg choice="req"><replaceable>nodename</replaceable></arg>
316       </cmdsynopsis>
317
318       <para>
319         Removes a node from the cluster. Instances must be removed or
320         migrated to another cluster before.
321       </para>
322
323       <para>
324         Example:
325         <screen>
326 # gnt-node remove node5.example.com
327         </screen>
328       </para>
329     </refsect2>
330
331     <refsect2>
332       <title>REMOVE-TAGS</title>
333       <cmdsynopsis>
334         <command>remove-tags</command>
335         <arg choice="opt">--from <replaceable>file</replaceable></arg>
336         <arg choice="req"><replaceable>nodename</replaceable></arg>
337         <arg choice="req"
338         rep="repeat"><replaceable>tag</replaceable></arg>
339       </cmdsynopsis>
340
341       <para>
342         Remove tags from the given node. If any of the tags are not
343         existing on the node, the entire operation will abort.
344       </para>
345
346       <para>
347         If the <option>--from</option> option is given, the list of
348         tags will be extended with the contents of that file (each
349         line becomes a tag). In this case, there is not need to pass
350         tags on the command line (if you do, both sources will be
351         used). A file name of - will be interpreted as stdin.
352       </para>
353     </refsect2>
354
355     <refsect2>
356       <title>VOLUMES</title>
357
358       <cmdsynopsis>
359         <command>volumes</command>
360         <arg rep="repeat"><replaceable>node</replaceable></arg>
361       </cmdsynopsis>
362
363       <para>
364         Lists all logical volumes and their physical disks from the node(s)
365         provided.
366       </para>
367
368       <para>
369         Example:
370         <screen>
371 # gnt-node volumes node5.example.com
372 Node              PhysDev   VG    Name                                 Size Instance
373 node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
374 node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
375         </screen>
376       </para>
377     </refsect2>
378
379   </refsect1>
380
381   &footer;
382
383 </refentry>
384
385 <!-- Keep this comment at the end of the file
386 Local variables:
387 mode: sgml
388 sgml-omittag:t
389 sgml-shorttag:t
390 sgml-minimize-attributes:nil
391 sgml-always-quote-attributes:t
392 sgml-indent-step:2
393 sgml-indent-data:t
394 sgml-parent-document:nil
395 sgml-default-dtd-file:nil
396 sgml-exposed-tags:nil
397 sgml-local-catalogs:nil
398 sgml-local-ecat-files:nil
399 End:
400 -->