Statistics
| Branch: | Tag: | Revision:

root / doc / admin.sgml @ 1df40cb5

History | View | Annotate | Download (15.2 kB)

1 6bf0c9bb Guido Trotter
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [
2 6bf0c9bb Guido Trotter
]>
3 6bf0c9bb Guido Trotter
  <article class="specification">
4 6bf0c9bb Guido Trotter
  <articleinfo>
5 6bf0c9bb Guido Trotter
    <title>Ganeti administrator's guide</title>
6 6bf0c9bb Guido Trotter
  </articleinfo>
7 6bf0c9bb Guido Trotter
  <para>Documents Ganeti version 1.2</para>
8 6bf0c9bb Guido Trotter
  <sect1>
9 6bf0c9bb Guido Trotter
    <title>Introduction</title>
10 6bf0c9bb Guido Trotter
11 6bf0c9bb Guido Trotter
    <para>Ganeti is a virtualization cluster management software. You are
12 6bf0c9bb Guido Trotter
    expected to be a system administrator familiar with your Linux distribution
13 6bf0c9bb Guido Trotter
    and the Xen virtualization environment before using it.
14 6bf0c9bb Guido Trotter
    </para>
15 6bf0c9bb Guido Trotter
16 6bf0c9bb Guido Trotter
    <para>The various components of Ganeti all have man pages and interactive
17 6bf0c9bb Guido Trotter
    help. This manual though will help you getting familiar with the system by
18 6bf0c9bb Guido Trotter
    explaining the most common operations, grouped by related use.
19 6bf0c9bb Guido Trotter
    </para>
20 6bf0c9bb Guido Trotter
21 6bf0c9bb Guido Trotter
    <para>After a terminology glossary and a section on the prerequisites
22 6bf0c9bb Guido Trotter
    needed to use this manual, the rest of this document is divided in three
23 6bf0c9bb Guido Trotter
    main sections, which group different features of Ganeti:
24 6bf0c9bb Guido Trotter
      <itemizedlist>
25 6bf0c9bb Guido Trotter
        <listitem>
26 6bf0c9bb Guido Trotter
          <simpara>Instance Management</simpara>
27 6bf0c9bb Guido Trotter
        </listitem>
28 6bf0c9bb Guido Trotter
        <listitem>
29 6bf0c9bb Guido Trotter
          <simpara>High Availability Features</simpara>
30 6bf0c9bb Guido Trotter
        </listitem>
31 6bf0c9bb Guido Trotter
        <listitem>
32 6bf0c9bb Guido Trotter
          <simpara>Debugging Features</simpara>
33 6bf0c9bb Guido Trotter
        </listitem>
34 6bf0c9bb Guido Trotter
      </itemizedlist>
35 6bf0c9bb Guido Trotter
    </para>
36 6bf0c9bb Guido Trotter
37 6bf0c9bb Guido Trotter
    <sect2>
38 ec377077 Iustin Pop
      <title>Ganeti terminology</title>
39 6bf0c9bb Guido Trotter
40 e3c826ec Michael Hanselmann
      <para>
41 e3c826ec Michael Hanselmann
        This section provides a small introduction to Ganeti terminology, which
42 e3c826ec Michael Hanselmann
        might be useful to read the rest of the document.
43 6bf0c9bb Guido Trotter
44 e3c826ec Michael Hanselmann
        <glosslist>
45 ec377077 Iustin Pop
          <glossentry>
46 ec377077 Iustin Pop
            <glossterm>Cluster</glossterm>
47 ec377077 Iustin Pop
            <glossdef>
48 ec377077 Iustin Pop
              <simpara>
49 ec377077 Iustin Pop
                A set of machines (nodes) that cooperate to offer a
50 ec377077 Iustin Pop
                coherent highly available virtualization service.
51 ec377077 Iustin Pop
              </simpara>
52 ec377077 Iustin Pop
            </glossdef>
53 ec377077 Iustin Pop
          </glossentry>
54 ec377077 Iustin Pop
          <glossentry>
55 ec377077 Iustin Pop
            <glossterm>Node</glossterm>
56 ec377077 Iustin Pop
            <glossdef>
57 ec377077 Iustin Pop
              <simpara>
58 ec377077 Iustin Pop
                A physical machine which is member of a cluster.
59 ec377077 Iustin Pop
                Nodes are the basic cluster infrastructure, and are
60 ec377077 Iustin Pop
                not fault tolerant.
61 ec377077 Iustin Pop
              </simpara>
62 ec377077 Iustin Pop
            </glossdef>
63 ec377077 Iustin Pop
          </glossentry>
64 ec377077 Iustin Pop
          <glossentry>
65 ec377077 Iustin Pop
            <glossterm>Master node</glossterm>
66 ec377077 Iustin Pop
            <glossdef>
67 ec377077 Iustin Pop
              <simpara>
68 ec377077 Iustin Pop
                The node which controls the Cluster, from which all
69 ec377077 Iustin Pop
                Ganeti commands must be given.
70 ec377077 Iustin Pop
              </simpara>
71 ec377077 Iustin Pop
            </glossdef>
72 ec377077 Iustin Pop
          </glossentry>
73 ec377077 Iustin Pop
          <glossentry>
74 ec377077 Iustin Pop
            <glossterm>Instance</glossterm>
75 ec377077 Iustin Pop
            <glossdef>
76 ec377077 Iustin Pop
              <simpara>
77 ec377077 Iustin Pop
                A virtual machine which runs on a cluster. It can be a
78 ec377077 Iustin Pop
                fault tolerant highly available entity.
79 ec377077 Iustin Pop
              </simpara>
80 ec377077 Iustin Pop
            </glossdef>
81 ec377077 Iustin Pop
          </glossentry>
82 ec377077 Iustin Pop
          <glossentry>
83 ec377077 Iustin Pop
            <glossterm>Pool</glossterm>
84 ec377077 Iustin Pop
            <glossdef>
85 ec377077 Iustin Pop
              <simpara>
86 ec377077 Iustin Pop
                A pool is a set of clusters sharing the same network.
87 ec377077 Iustin Pop
              </simpara>
88 ec377077 Iustin Pop
            </glossdef>
89 ec377077 Iustin Pop
          </glossentry>
90 ec377077 Iustin Pop
          <glossentry>
91 ec377077 Iustin Pop
            <glossterm>Meta-Cluster</glossterm>
92 ec377077 Iustin Pop
            <glossdef>
93 ec377077 Iustin Pop
              <simpara>
94 ec377077 Iustin Pop
                Anything that concerns more than one cluster.
95 ec377077 Iustin Pop
              </simpara>
96 ec377077 Iustin Pop
            </glossdef>
97 ec377077 Iustin Pop
          </glossentry>
98 e3c826ec Michael Hanselmann
        </glosslist>
99 6bf0c9bb Guido Trotter
      </para>
100 6bf0c9bb Guido Trotter
    </sect2>
101 6bf0c9bb Guido Trotter
102 6bf0c9bb Guido Trotter
    <sect2>
103 6bf0c9bb Guido Trotter
      <title>Prerequisites</title>
104 6bf0c9bb Guido Trotter
105 ec377077 Iustin Pop
      <para>
106 e3c826ec Michael Hanselmann
        You need to have your Ganeti cluster installed and configured before
107 e3c826ec Michael Hanselmann
        you try any of the commands in this document. Please follow the
108 e3c826ec Michael Hanselmann
        <emphasis>Ganeti installation tutorial</emphasis> for instructions on
109 e3c826ec Michael Hanselmann
        how to do that.
110 6bf0c9bb Guido Trotter
      </para>
111 6bf0c9bb Guido Trotter
    </sect2>
112 6bf0c9bb Guido Trotter
113 6bf0c9bb Guido Trotter
  </sect1>
114 6bf0c9bb Guido Trotter
115 6bf0c9bb Guido Trotter
  <sect1>
116 6bf0c9bb Guido Trotter
    <title>Managing Instances</title>
117 6bf0c9bb Guido Trotter
118 6bf0c9bb Guido Trotter
    <sect2>
119 6bf0c9bb Guido Trotter
      <title>Adding/Removing an instance</title>
120 6bf0c9bb Guido Trotter
121 ec377077 Iustin Pop
      <para>
122 e3c826ec Michael Hanselmann
        Adding a new virtual instance to your Ganeti cluster is really easy.
123 e3c826ec Michael Hanselmann
        The command is:
124 ec377077 Iustin Pop
125 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance add -n <replaceable>TARGET_NODE</replaceable> -o <replaceable>OS_TYPE</replaceable> -t <replaceable>DISK_TEMPLATE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
126 ec377077 Iustin Pop
127 ec377077 Iustin Pop
        The instance name must be resolvable (e.g. exist in DNS) and
128 ec377077 Iustin Pop
        of course map to an address in the same subnet as the cluster
129 ec377077 Iustin Pop
        itself. Options you can give to this command include:
130 ec377077 Iustin Pop
131 6bf0c9bb Guido Trotter
      <itemizedlist>
132 6bf0c9bb Guido Trotter
        <listitem>
133 ec377077 Iustin Pop
          <simpara>The disk size (<option>-s</option>)</simpara>
134 6bf0c9bb Guido Trotter
        </listitem>
135 6bf0c9bb Guido Trotter
        <listitem>
136 ec377077 Iustin Pop
          <simpara>The swap size (<option>--swap-size</option>)</simpara>
137 6bf0c9bb Guido Trotter
        </listitem>
138 6bf0c9bb Guido Trotter
        <listitem>
139 ec377077 Iustin Pop
          <simpara>The memory size (<option>-m</option>)</simpara>
140 6bf0c9bb Guido Trotter
        </listitem>
141 6bf0c9bb Guido Trotter
        <listitem>
142 ec377077 Iustin Pop
          <simpara>The number of virtual CPUs (<option>-p</option>)</simpara>
143 6bf0c9bb Guido Trotter
        </listitem>
144 6bf0c9bb Guido Trotter
        <listitem>
145 e3c826ec Michael Hanselmann
          <simpara>The instance ip address (<option>-i</option>) (use the value
146 e3c826ec Michael Hanselmann
            <literal>auto</literal> to make Ganeti record the address from
147 e3c826ec Michael Hanselmann
            dns)</simpara>
148 6bf0c9bb Guido Trotter
        </listitem>
149 6bf0c9bb Guido Trotter
        <listitem>
150 e3c826ec Michael Hanselmann
          <simpara>The bridge to connect the instance to (<option>-b</option>),
151 e3c826ec Michael Hanselmann
            if you don't want to use the default one</simpara>
152 6bf0c9bb Guido Trotter
        </listitem>
153 6bf0c9bb Guido Trotter
      </itemizedlist>
154 53b78ba4 Guido Trotter
      </para>
155 53b78ba4 Guido Trotter
156 ec377077 Iustin Pop
      <para>There are four types of disk template you can choose from:</para>
157 53b78ba4 Guido Trotter
158 53b78ba4 Guido Trotter
      <variablelist>
159 53b78ba4 Guido Trotter
        <varlistentry>
160 53b78ba4 Guido Trotter
          <term>diskless</term>
161 e3c826ec Michael Hanselmann
          <listitem>
162 e3c826ec Michael Hanselmann
            <para>The instance has no disks. Only used for special purpouse
163 e3c826ec Michael Hanselmann
              operating systems or for testing.</para>
164 e3c826ec Michael Hanselmann
          </listitem>
165 53b78ba4 Guido Trotter
        </varlistentry>
166 53b78ba4 Guido Trotter
167 53b78ba4 Guido Trotter
        <varlistentry>
168 53b78ba4 Guido Trotter
          <term>plain</term>
169 e3c826ec Michael Hanselmann
          <listitem>
170 e3c826ec Michael Hanselmann
            <para>The instance will use LVM devices as backend for its disks.
171 e3c826ec Michael Hanselmann
              No redundancy is provided.</para>
172 e3c826ec Michael Hanselmann
          </listitem>
173 53b78ba4 Guido Trotter
        </varlistentry>
174 53b78ba4 Guido Trotter
175 53b78ba4 Guido Trotter
        <varlistentry>
176 53b78ba4 Guido Trotter
          <term>local_raid1</term>
177 e3c826ec Michael Hanselmann
          <listitem>
178 e3c826ec Michael Hanselmann
            <para>A local mirror is set between LVM devices to back the
179 e3c826ec Michael Hanselmann
              instance. This provides some redundancy for the instance's
180 e3c826ec Michael Hanselmann
              data.</para>
181 e3c826ec Michael Hanselmann
          </listitem>
182 53b78ba4 Guido Trotter
        </varlistentry>
183 53b78ba4 Guido Trotter
184 53b78ba4 Guido Trotter
        <varlistentry>
185 53b78ba4 Guido Trotter
          <term>remote_raid1</term>
186 e3c826ec Michael Hanselmann
          <listitem>
187 e3c826ec Michael Hanselmann
            <simpara><emphasis role="strong">Note:</emphasis> This is only
188 6c4811dc Iustin Pop
              valid for multi-node clusters using drbd 0.7.</simpara>
189 ec377077 Iustin Pop
            <simpara>
190 4677a909 Michael Hanselmann
              A mirror is set between the local node and a remote one, which
191 4677a909 Michael Hanselmann
              must be specified with the second value of the --node option. Use
192 4677a909 Michael Hanselmann
              this option to obtain a highly available instance that can be
193 4677a909 Michael Hanselmann
              failed over to a remote node should the primary one fail.
194 e3c826ec Michael Hanselmann
            </simpara>
195 e3c826ec Michael Hanselmann
          </listitem>
196 53b78ba4 Guido Trotter
        </varlistentry>
197 53b78ba4 Guido Trotter
198 6c4811dc Iustin Pop
        <varlistentry>
199 6c4811dc Iustin Pop
          <term>drbd</term>
200 6c4811dc Iustin Pop
          <listitem>
201 6c4811dc Iustin Pop
            <simpara><emphasis role="strong">Note:</emphasis> This is only
202 6c4811dc Iustin Pop
              valid for multi-node clusters using drbd 8.0.</simpara>
203 6c4811dc Iustin Pop
            <simpara>
204 6c4811dc Iustin Pop
              This is similar to the
205 6c4811dc Iustin Pop
              <replaceable>remote_raid1</replaceable> option, but uses
206 6c4811dc Iustin Pop
              new features in drbd 8 to simplify the device
207 6c4811dc Iustin Pop
              stack. From a user's point of view, this will improve
208 6c4811dc Iustin Pop
              the speed of the <command>replace-disks</command>
209 6c4811dc Iustin Pop
              command and (in future versions) provide more
210 6c4811dc Iustin Pop
              functionality.
211 6c4811dc Iustin Pop
            </simpara>
212 6c4811dc Iustin Pop
          </listitem>
213 6c4811dc Iustin Pop
        </varlistentry>
214 6c4811dc Iustin Pop
215 53b78ba4 Guido Trotter
      </variablelist>
216 53b78ba4 Guido Trotter
217 ec377077 Iustin Pop
      <para>
218 e3c826ec Michael Hanselmann
        For example if you want to create an highly available instance use the
219 6c4811dc Iustin Pop
        remote_raid1 or drbd disk templates:
220 4677a909 Michael Hanselmann
        <synopsis>gnt-instance add -n <replaceable>TARGET_NODE</replaceable><optional>:<replaceable>SECONDARY_NODE</replaceable></optional> -o <replaceable>OS_TYPE</replaceable> -t remote_raid1 \
221 4677a909 Michael Hanselmann
  <replaceable>INSTANCE_NAME</replaceable></synopsis>
222 ec377077 Iustin Pop
223 ec377077 Iustin Pop
      <para>
224 e3c826ec Michael Hanselmann
        To know which operating systems your cluster supports you can use
225 ec377077 Iustin Pop
        <synopsis>gnt-os list</synopsis>
226 6bf0c9bb Guido Trotter
      </para>
227 6bf0c9bb Guido Trotter
228 6bf0c9bb Guido Trotter
      <para>
229 e3c826ec Michael Hanselmann
        Removing an instance is even easier than creating one. This operation
230 e3c826ec Michael Hanselmann
        is non-reversible and destroys all the contents of your instance. Use
231 e3c826ec Michael Hanselmann
        with care:
232 ec377077 Iustin Pop
233 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance remove <replaceable>INSTANCE_NAME</replaceable></synopsis>
234 6bf0c9bb Guido Trotter
      </para>
235 6bf0c9bb Guido Trotter
    </sect2>
236 6bf0c9bb Guido Trotter
237 6bf0c9bb Guido Trotter
    <sect2>
238 6bf0c9bb Guido Trotter
      <title>Starting/Stopping an instance</title>
239 6bf0c9bb Guido Trotter
240 ec377077 Iustin Pop
      <para>
241 e3c826ec Michael Hanselmann
        Instances are automatically started at instance creation time. To
242 e3c826ec Michael Hanselmann
        manually start one which is currently stopped you can run:
243 ec377077 Iustin Pop
244 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance startup <replaceable>INSTANCE_NAME</replaceable></synopsis>
245 ec377077 Iustin Pop
246 ec377077 Iustin Pop
        While the command to stop one is:
247 ec377077 Iustin Pop
248 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance shutdown <replaceable>INSTANCE_NAME</replaceable></synopsis>
249 ec377077 Iustin Pop
250 e3c826ec Michael Hanselmann
        The command to see all the instances configured and their status is:
251 ec377077 Iustin Pop
252 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance list</synopsis>
253 ec377077 Iustin Pop
254 6bf0c9bb Guido Trotter
      </para>
255 53b78ba4 Guido Trotter
256 ec377077 Iustin Pop
      <para>
257 ec377077 Iustin Pop
        Do not use the xen commands to stop instances. If you run for
258 ec377077 Iustin Pop
        example xm shutdown or xm destroy on an instance Ganeti will
259 ec377077 Iustin Pop
        automatically restart it (via the
260 ec377077 Iustin Pop
        <citerefentry><refentrytitle>ganeti-watcher</refentrytitle>
261 ec377077 Iustin Pop
        <manvolnum>8</manvolnum></citerefentry>)
262 53b78ba4 Guido Trotter
      </para>
263 53b78ba4 Guido Trotter
264 6bf0c9bb Guido Trotter
    </sect2>
265 6bf0c9bb Guido Trotter
266 6bf0c9bb Guido Trotter
    <sect2>
267 6bf0c9bb Guido Trotter
      <title>Exporting/Importing an instance</title>
268 6bf0c9bb Guido Trotter
269 ec377077 Iustin Pop
      <para>
270 ec377077 Iustin Pop
        You can create a snapshot of an instance disk and Ganeti
271 ec377077 Iustin Pop
        configuration, which then you can backup, or import into
272 e3c826ec Michael Hanselmann
        another cluster. The way to export an instance is:
273 ec377077 Iustin Pop
274 e3c826ec Michael Hanselmann
        <synopsis>gnt-backup export -n <replaceable>TARGET_NODE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
275 ec377077 Iustin Pop
276 ec377077 Iustin Pop
        The target node can be any node in the cluster with enough
277 ec377077 Iustin Pop
        space under <filename class="directory">/srv/ganeti</filename>
278 ec377077 Iustin Pop
        to hold the instance image. Use the
279 ec377077 Iustin Pop
        <option>--noshutdown</option> option to snapshot an instance
280 ec377077 Iustin Pop
        without rebooting it. Any previous snapshot of the same
281 ec377077 Iustin Pop
        instance existing cluster-wide under <filename
282 ec377077 Iustin Pop
        class="directory">/srv/ganeti</filename> will be removed by
283 ec377077 Iustin Pop
        this operation: if you want to keep them move them out of the
284 ec377077 Iustin Pop
        Ganeti exports directory.
285 6bf0c9bb Guido Trotter
      </para>
286 6bf0c9bb Guido Trotter
287 ec377077 Iustin Pop
      <para>
288 e3c826ec Michael Hanselmann
        Importing an instance is similar to creating a new one. The command is:
289 ec377077 Iustin Pop
290 e3c826ec Michael Hanselmann
        <synopsis>gnt-backup import -n <replaceable>TARGET_NODE</replaceable> -t <replaceable>DISK_TEMPLATE</replaceable> --src-node=<replaceable>NODE</replaceable> --src-dir=DIR INSTANCE_NAME</synopsis>
291 ec377077 Iustin Pop
292 ec377077 Iustin Pop
        Most of the options available for the command
293 ec377077 Iustin Pop
        <emphasis>gnt-instance add</emphasis> are supported here too.
294 ec377077 Iustin Pop
295 6bf0c9bb Guido Trotter
      </para>
296 6bf0c9bb Guido Trotter
    </sect2>
297 6bf0c9bb Guido Trotter
298 6bf0c9bb Guido Trotter
  </sect1>
299 6bf0c9bb Guido Trotter
300 6bf0c9bb Guido Trotter
301 6bf0c9bb Guido Trotter
  <sect1>
302 6bf0c9bb Guido Trotter
    <title>High availability features</title>
303 6bf0c9bb Guido Trotter
304 ec377077 Iustin Pop
    <note>
305 ec377077 Iustin Pop
      <simpara>This section only applies to multi-node clusters.</simpara>
306 ec377077 Iustin Pop
    </note>
307 ec377077 Iustin Pop
308 6bf0c9bb Guido Trotter
    <sect2>
309 6bf0c9bb Guido Trotter
      <title>Failing over an instance</title>
310 6bf0c9bb Guido Trotter
311 ec377077 Iustin Pop
      <para>
312 ec377077 Iustin Pop
        If an instance is built in highly available mode you can at
313 ec377077 Iustin Pop
        any time fail it over to its secondary node, even if the
314 ec377077 Iustin Pop
        primary has somehow failed and it's not up anymore. Doing it
315 ec377077 Iustin Pop
        is really easy, on the master node you can just run:
316 ec377077 Iustin Pop
317 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance failover <replaceable>INSTANCE_NAME</replaceable></synopsis>
318 ec377077 Iustin Pop
319 ec377077 Iustin Pop
        That's it. After the command completes the secondary node is
320 ec377077 Iustin Pop
        now the primary, and vice versa.
321 6bf0c9bb Guido Trotter
      </para>
322 6bf0c9bb Guido Trotter
    </sect2>
323 ec377077 Iustin Pop
324 6bf0c9bb Guido Trotter
    <sect2>
325 6bf0c9bb Guido Trotter
      <title>Replacing an instance disks</title>
326 6bf0c9bb Guido Trotter
327 ec377077 Iustin Pop
      <para>
328 ec377077 Iustin Pop
        So what if instead the secondary node for an instance has
329 ec377077 Iustin Pop
        failed, or you plan to remove a node from your cluster, and
330 ec377077 Iustin Pop
        you failed over all its instances, but it's still secondary
331 ec377077 Iustin Pop
        for some? The solution here is to replace the instance disks,
332 6c4811dc Iustin Pop
        changing the secondary node. This is done in two ways, depending on the disk template type. For <literal>remote_raid1</literal>:
333 6c4811dc Iustin Pop
334 6c4811dc Iustin Pop
        <synopsis>gnt-instance replace-disks <option>-n <replaceable>NEW_SECONDARY</replaceable></option> <replaceable>INSTANCE_NAME</replaceable></synopsis>
335 ec377077 Iustin Pop
336 6c4811dc Iustin Pop
        and for <literal>drbd</literal>:
337 6c4811dc Iustin Pop
        <synopsis>gnt-instance replace-disks <option>-s</option> <option>-n <replaceable>NEW_SECONDARY</replaceable></option> <replaceable>INSTANCE_NAME</replaceable></synopsis>
338 ec377077 Iustin Pop
339 ec377077 Iustin Pop
        This process is a bit longer, but involves no instance
340 ec377077 Iustin Pop
        downtime, and at the end of it the instance has changed its
341 ec377077 Iustin Pop
        secondary node, to which it can if necessary be failed over.
342 6bf0c9bb Guido Trotter
      </para>
343 6bf0c9bb Guido Trotter
    </sect2>
344 6bf0c9bb Guido Trotter
    <sect2>
345 6bf0c9bb Guido Trotter
      <title>Failing over the master node</title>
346 6bf0c9bb Guido Trotter
347 ec377077 Iustin Pop
      <para>
348 ec377077 Iustin Pop
        This is all good as long as the Ganeti Master Node is
349 ec377077 Iustin Pop
        up. Should it go down, or should you wish to decommission it,
350 ec377077 Iustin Pop
        just run on any other node the command:
351 ec377077 Iustin Pop
352 e3c826ec Michael Hanselmann
        <synopsis>gnt-cluster masterfailover</synopsis>
353 ec377077 Iustin Pop
354 ec377077 Iustin Pop
        and the node you ran it on is now the new master.
355 6bf0c9bb Guido Trotter
      </para>
356 6bf0c9bb Guido Trotter
    </sect2>
357 6bf0c9bb Guido Trotter
    <sect2>
358 6bf0c9bb Guido Trotter
      <title>Adding/Removing nodes</title>
359 6bf0c9bb Guido Trotter
360 ec377077 Iustin Pop
      <para>
361 ec377077 Iustin Pop
        And of course, now that you know how to move instances around,
362 ec377077 Iustin Pop
        it's easy to free up a node, and then you can remove it from
363 ec377077 Iustin Pop
        the cluster:
364 ec377077 Iustin Pop
365 e3c826ec Michael Hanselmann
        <synopsis>gnt-node remove <replaceable>NODE_NAME</replaceable></synopsis>
366 ec377077 Iustin Pop
367 ec377077 Iustin Pop
        and maybe add a new one:
368 ec377077 Iustin Pop
369 e3c826ec Michael Hanselmann
        <synopsis>gnt-node add <optional><option>--secondary-ip=<replaceable>ADDRESS</replaceable></option></optional> <replaceable>NODE_NAME</replaceable>
370 ec377077 Iustin Pop
371 ec377077 Iustin Pop
      </synopsis>
372 6bf0c9bb Guido Trotter
      </para>
373 6bf0c9bb Guido Trotter
    </sect2>
374 6bf0c9bb Guido Trotter
  </sect1>
375 6bf0c9bb Guido Trotter
376 6bf0c9bb Guido Trotter
  <sect1>
377 6bf0c9bb Guido Trotter
    <title>Debugging Features</title>
378 6bf0c9bb Guido Trotter
379 ec377077 Iustin Pop
    <para>
380 ec377077 Iustin Pop
      At some point you might need to do some debugging operations on
381 ec377077 Iustin Pop
      your cluster or on your instances. This section will help you
382 ec377077 Iustin Pop
      with the most used debugging functionalities.
383 6bf0c9bb Guido Trotter
    </para>
384 6bf0c9bb Guido Trotter
385 6bf0c9bb Guido Trotter
    <sect2>
386 6bf0c9bb Guido Trotter
      <title>Accessing an instance's disks</title>
387 6bf0c9bb Guido Trotter
388 ec377077 Iustin Pop
      <para>
389 ec377077 Iustin Pop
        From an instance's primary node you have access to its
390 ec377077 Iustin Pop
        disks. Never ever mount the underlying logical volume manually
391 ec377077 Iustin Pop
        on a fault tolerant instance, or you risk breaking
392 ec377077 Iustin Pop
        replication. The correct way to access them is to run the
393 ec377077 Iustin Pop
        command:
394 ec377077 Iustin Pop
395 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance activate-disks <replaceable>INSTANCE_NAME</replaceable></synopsis>
396 ec377077 Iustin Pop
397 ec377077 Iustin Pop
        And then access the device that gets created.  After you've
398 ec377077 Iustin Pop
        finished you can deactivate them with the deactivate-disks
399 ec377077 Iustin Pop
        command, which works in the same way.
400 6bf0c9bb Guido Trotter
      </para>
401 6bf0c9bb Guido Trotter
    </sect2>
402 6bf0c9bb Guido Trotter
403 6bf0c9bb Guido Trotter
    <sect2>
404 6bf0c9bb Guido Trotter
      <title>Accessing an instance's console</title>
405 6bf0c9bb Guido Trotter
406 ec377077 Iustin Pop
      <para>
407 ec377077 Iustin Pop
        The command to access a running instance's console is:
408 ec377077 Iustin Pop
409 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance console <replaceable>INSTANCE_NAME</replaceable></synopsis>
410 ec377077 Iustin Pop
411 ec377077 Iustin Pop
        Use the console normally and then type
412 ec377077 Iustin Pop
        <userinput>^]</userinput> when done, to exit.
413 6bf0c9bb Guido Trotter
      </para>
414 6bf0c9bb Guido Trotter
    </sect2>
415 6bf0c9bb Guido Trotter
416 6bf0c9bb Guido Trotter
    <sect2>
417 6c4811dc Iustin Pop
      <title>Instance OS definitions Debugging</title>
418 6bf0c9bb Guido Trotter
419 ec377077 Iustin Pop
      <para>
420 ec377077 Iustin Pop
        Should you have any problems with operating systems support
421 ec377077 Iustin Pop
        the command to ran to see a complete status for all your nodes
422 ec377077 Iustin Pop
        is:
423 ec377077 Iustin Pop
424 e3c826ec Michael Hanselmann
        <synopsis>gnt-os diagnose</synopsis>
425 ec377077 Iustin Pop
426 6bf0c9bb Guido Trotter
      </para>
427 6bf0c9bb Guido Trotter
428 6bf0c9bb Guido Trotter
    </sect2>
429 6bf0c9bb Guido Trotter
430 6bf0c9bb Guido Trotter
    <sect2>
431 6bf0c9bb Guido Trotter
      <title>Cluster-wide debugging</title>
432 6bf0c9bb Guido Trotter
433 ec377077 Iustin Pop
      <para>
434 ec377077 Iustin Pop
        The gnt-cluster command offers several options to run tests or
435 ec377077 Iustin Pop
        execute cluster-wide operations. For example:
436 ec377077 Iustin Pop
437 ec377077 Iustin Pop
      <screen>
438 6bf0c9bb Guido Trotter
gnt-cluster command
439 6bf0c9bb Guido Trotter
gnt-cluster copyfile
440 6bf0c9bb Guido Trotter
gnt-cluster verify
441 6bf0c9bb Guido Trotter
gnt-cluster getmaster
442 6bf0c9bb Guido Trotter
gnt-cluster version
443 ec377077 Iustin Pop
      </screen>
444 ec377077 Iustin Pop
445 ec377077 Iustin Pop
        See the man page <citerefentry>
446 ec377077 Iustin Pop
        <refentrytitle>gnt-cluster</refentrytitle>
447 ec377077 Iustin Pop
        <manvolnum>8</manvolnum> </citerefentry> to know more about
448 ec377077 Iustin Pop
        their usage.
449 6bf0c9bb Guido Trotter
      </para>
450 6bf0c9bb Guido Trotter
    </sect2>
451 6bf0c9bb Guido Trotter
452 6bf0c9bb Guido Trotter
  </sect1>
453 6bf0c9bb Guido Trotter
454 6bf0c9bb Guido Trotter
  </article>