Statistics
| Branch: | Tag: | Revision:

root / doc / admin.sgml @ bcf043c9

History | View | Annotate | Download (14 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
39 ec377077 Iustin Pop
      <title>Ganeti terminology</title>
40 6bf0c9bb Guido Trotter
41 6bf0c9bb Guido Trotter
      <para>This section provides a small introduction to Ganeti terminology,
42 6bf0c9bb Guido Trotter
      which might be useful to read the rest of the document.
43 6bf0c9bb Guido Trotter
44 ec377077 Iustin Pop
      <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 ec377077 Iustin Pop
      </glosslist>
99 6bf0c9bb Guido Trotter
100 6bf0c9bb Guido Trotter
      </para>
101 6bf0c9bb Guido Trotter
    </sect2>
102 6bf0c9bb Guido Trotter
103 6bf0c9bb Guido Trotter
    <sect2>
104 6bf0c9bb Guido Trotter
      <title>Prerequisites</title>
105 6bf0c9bb Guido Trotter
106 ec377077 Iustin Pop
      <para>
107 ec377077 Iustin Pop
        You need to have your Ganeti cluster installed and configured
108 ec377077 Iustin Pop
        before you try any of the commands in this document. Please
109 ec377077 Iustin Pop
        follow the <emphasis>Ganeti installation tutorial</emphasis>
110 ec377077 Iustin Pop
        for instructions on how to do that.
111 6bf0c9bb Guido Trotter
      </para>
112 6bf0c9bb Guido Trotter
    </sect2>
113 6bf0c9bb Guido Trotter
114 6bf0c9bb Guido Trotter
  </sect1>
115 6bf0c9bb Guido Trotter
116 6bf0c9bb Guido Trotter
  <sect1>
117 6bf0c9bb Guido Trotter
    <title>Managing Instances</title>
118 6bf0c9bb Guido Trotter
119 6bf0c9bb Guido Trotter
    <sect2>
120 6bf0c9bb Guido Trotter
      <title>Adding/Removing an instance</title>
121 6bf0c9bb Guido Trotter
122 ec377077 Iustin Pop
      <para>
123 ec377077 Iustin Pop
        Adding a new virtual instance to your Ganeti cluster is really
124 ec377077 Iustin Pop
        easy. The command is:
125 ec377077 Iustin Pop
126 ec377077 Iustin Pop
      <synopsis>gnt-instance add -n <replaceable>TARGET_NODE</replaceable> -o <replaceable>OS_TYPE</replaceable> -t <replaceable>DISK_TEMPLATE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
127 ec377077 Iustin Pop
128 ec377077 Iustin Pop
        The instance name must be resolvable (e.g. exist in DNS) and
129 ec377077 Iustin Pop
        of course map to an address in the same subnet as the cluster
130 ec377077 Iustin Pop
        itself. Options you can give to this command include:
131 ec377077 Iustin Pop
132 6bf0c9bb Guido Trotter
      <itemizedlist>
133 6bf0c9bb Guido Trotter
        <listitem>
134 ec377077 Iustin Pop
          <simpara>The disk size (<option>-s</option>)</simpara>
135 6bf0c9bb Guido Trotter
        </listitem>
136 6bf0c9bb Guido Trotter
        <listitem>
137 ec377077 Iustin Pop
          <simpara>The swap size (<option>--swap-size</option>)</simpara>
138 6bf0c9bb Guido Trotter
        </listitem>
139 6bf0c9bb Guido Trotter
        <listitem>
140 ec377077 Iustin Pop
          <simpara>The memory size (<option>-m</option>)</simpara>
141 6bf0c9bb Guido Trotter
        </listitem>
142 6bf0c9bb Guido Trotter
        <listitem>
143 ec377077 Iustin Pop
          <simpara>The number of virtual CPUs (<option>-p</option>)</simpara>
144 6bf0c9bb Guido Trotter
        </listitem>
145 6bf0c9bb Guido Trotter
        <listitem>
146 ec377077 Iustin Pop
	  <simpara>The instance ip address (<option>-i</option>) (use
147 ec377077 Iustin Pop
	  the value <literal>auto</literal> to make Ganeti record the
148 ec377077 Iustin Pop
	  address from dns)</simpara>
149 6bf0c9bb Guido Trotter
        </listitem>
150 6bf0c9bb Guido Trotter
        <listitem>
151 ec377077 Iustin Pop
	  <simpara>The bridge to connect the instance to
152 ec377077 Iustin Pop
	  (<option>-b</option>), if you don't want to use the default
153 ec377077 Iustin Pop
	  one</simpara>
154 6bf0c9bb Guido Trotter
        </listitem>
155 6bf0c9bb Guido Trotter
      </itemizedlist>
156 53b78ba4 Guido Trotter
      </para>
157 53b78ba4 Guido Trotter
158 ec377077 Iustin Pop
      <para>There are four types of disk template you can choose from:</para>
159 53b78ba4 Guido Trotter
160 53b78ba4 Guido Trotter
      <variablelist>
161 53b78ba4 Guido Trotter
        <varlistentry>
162 53b78ba4 Guido Trotter
          <term>diskless</term>
163 53b78ba4 Guido Trotter
	  <listitem><para>The instance has no disks. Only used for special
164 53b78ba4 Guido Trotter
	  purpouse operating systems or for testing.</para></listitem>
165 53b78ba4 Guido Trotter
        </varlistentry>
166 53b78ba4 Guido Trotter
167 53b78ba4 Guido Trotter
        <varlistentry>
168 53b78ba4 Guido Trotter
          <term>plain</term>
169 53b78ba4 Guido Trotter
	  <listitem><para>The instance will use LVM devices as backend for its
170 53b78ba4 Guido Trotter
	  disks. No redundancy is provided.</para></listitem>
171 53b78ba4 Guido Trotter
        </varlistentry>
172 53b78ba4 Guido Trotter
173 53b78ba4 Guido Trotter
        <varlistentry>
174 53b78ba4 Guido Trotter
          <term>local_raid1</term>
175 53b78ba4 Guido Trotter
	  <listitem><para>A local mirror is set between LVM devices to back the
176 53b78ba4 Guido Trotter
	  instance. This provides some redundancy for the instance's
177 53b78ba4 Guido Trotter
	  data.</para></listitem>
178 53b78ba4 Guido Trotter
        </varlistentry>
179 53b78ba4 Guido Trotter
180 53b78ba4 Guido Trotter
        <varlistentry>
181 53b78ba4 Guido Trotter
          <term>remote_raid1</term>
182 ec377077 Iustin Pop
	  <listitem>
183 ec377077 Iustin Pop
            <simpara><emphasis role="strong">Note:</emphasis> This is
184 ec377077 Iustin Pop
            only valid for multi-node clusters.</simpara>
185 ec377077 Iustin Pop
            <simpara>
186 ec377077 Iustin Pop
                A mirror is set between the local node and a remote
187 ec377077 Iustin Pop
                one, which must be specified with the --secondary-node
188 ec377077 Iustin Pop
                option. Use this option to obtain a highly available
189 ec377077 Iustin Pop
                instance that can be failed over to a remote node
190 ec377077 Iustin Pop
                should the primary one fail.
191 ec377077 Iustin Pop
	      </simpara>
192 ec377077 Iustin Pop
            </listitem>
193 53b78ba4 Guido Trotter
        </varlistentry>
194 53b78ba4 Guido Trotter
195 53b78ba4 Guido Trotter
      </variablelist>
196 53b78ba4 Guido Trotter
197 ec377077 Iustin Pop
      <para>
198 ec377077 Iustin Pop
        For example if you want to create an highly available instance
199 ec377077 Iustin Pop
        use the remote_raid1 disk template:
200 ec377077 Iustin Pop
      <synopsis>gnt-instance add -n <replaceable>TARGET_NODE</replaceable> -o <replaceable>OS_TYPE</replaceable> -t remote_raid1 \
201 ec377077 Iustin Pop
  --secondary-node=<replaceable>SECONDARY_NODE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
202 ec377077 Iustin Pop
203 ec377077 Iustin Pop
      <para>
204 ec377077 Iustin Pop
        To know which operating systems your cluster supports you can use:
205 ec377077 Iustin Pop
206 ec377077 Iustin Pop
        <synopsis>gnt-os list</synopsis>
207 ec377077 Iustin Pop
208 6bf0c9bb Guido Trotter
      </para>
209 6bf0c9bb Guido Trotter
210 6bf0c9bb Guido Trotter
      <para>
211 ec377077 Iustin Pop
        Removing an instance is even easier than creating one. This
212 ec377077 Iustin Pop
        operation is non-reversible and destroys all the contents of
213 ec377077 Iustin Pop
        your instance. Use with care:
214 ec377077 Iustin Pop
215 ec377077 Iustin Pop
      <synopsis>gnt-instance remove <replaceable>INSTANCE_NAME</replaceable></synopsis>
216 ec377077 Iustin Pop
217 6bf0c9bb Guido Trotter
      </para>
218 6bf0c9bb Guido Trotter
    </sect2>
219 6bf0c9bb Guido Trotter
220 6bf0c9bb Guido Trotter
    <sect2>
221 6bf0c9bb Guido Trotter
      <title>Starting/Stopping an instance</title>
222 6bf0c9bb Guido Trotter
223 ec377077 Iustin Pop
      <para>
224 ec377077 Iustin Pop
        Instances are automatically started at instance creation
225 ec377077 Iustin Pop
        time. To manually start one which is currently stopped you can
226 ec377077 Iustin Pop
        run:
227 ec377077 Iustin Pop
228 ec377077 Iustin Pop
      <synopsis>gnt-instance startup <replaceable>INSTANCE_NAME</replaceable></synopsis>
229 ec377077 Iustin Pop
230 ec377077 Iustin Pop
        While the command to stop one is:
231 ec377077 Iustin Pop
232 ec377077 Iustin Pop
      <synopsis>gnt-instance shutdown <replaceable>INSTANCE_NAME</replaceable></synopsis>
233 ec377077 Iustin Pop
234 ec377077 Iustin Pop
        The command to see all the instances configured and their
235 ec377077 Iustin Pop
        status is:
236 ec377077 Iustin Pop
237 ec377077 Iustin Pop
      <synopsis>gnt-instance list</synopsis>
238 ec377077 Iustin Pop
239 6bf0c9bb Guido Trotter
      </para>
240 53b78ba4 Guido Trotter
241 ec377077 Iustin Pop
      <para>
242 ec377077 Iustin Pop
        Do not use the xen commands to stop instances. If you run for
243 ec377077 Iustin Pop
        example xm shutdown or xm destroy on an instance Ganeti will
244 ec377077 Iustin Pop
        automatically restart it (via the
245 ec377077 Iustin Pop
        <citerefentry><refentrytitle>ganeti-watcher</refentrytitle>
246 ec377077 Iustin Pop
        <manvolnum>8</manvolnum></citerefentry>)
247 53b78ba4 Guido Trotter
      </para>
248 53b78ba4 Guido Trotter
249 6bf0c9bb Guido Trotter
    </sect2>
250 6bf0c9bb Guido Trotter
251 6bf0c9bb Guido Trotter
    <sect2>
252 6bf0c9bb Guido Trotter
      <title>Exporting/Importing an instance</title>
253 6bf0c9bb Guido Trotter
254 ec377077 Iustin Pop
      <para>
255 ec377077 Iustin Pop
        You can create a snapshot of an instance disk and Ganeti
256 ec377077 Iustin Pop
        configuration, which then you can backup, or import into
257 ec377077 Iustin Pop
        another cluster.  The way to export an instance is:
258 ec377077 Iustin Pop
259 ec377077 Iustin Pop
      <synopsis>gnt-backup export -n <replaceable>TARGET_NODE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
260 ec377077 Iustin Pop
261 ec377077 Iustin Pop
        The target node can be any node in the cluster with enough
262 ec377077 Iustin Pop
        space under <filename class="directory">/srv/ganeti</filename>
263 ec377077 Iustin Pop
        to hold the instance image. Use the
264 ec377077 Iustin Pop
        <option>--noshutdown</option> option to snapshot an instance
265 ec377077 Iustin Pop
        without rebooting it. Any previous snapshot of the same
266 ec377077 Iustin Pop
        instance existing cluster-wide under <filename
267 ec377077 Iustin Pop
        class="directory">/srv/ganeti</filename> will be removed by
268 ec377077 Iustin Pop
        this operation: if you want to keep them move them out of the
269 ec377077 Iustin Pop
        Ganeti exports directory.
270 6bf0c9bb Guido Trotter
      </para>
271 6bf0c9bb Guido Trotter
272 ec377077 Iustin Pop
      <para>
273 ec377077 Iustin Pop
        Importing an instance is similar to creating a new one. The
274 ec377077 Iustin Pop
        command is:
275 ec377077 Iustin Pop
276 ec377077 Iustin Pop
      <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>
277 ec377077 Iustin Pop
278 ec377077 Iustin Pop
        Most of the options available for the command
279 ec377077 Iustin Pop
        <emphasis>gnt-instance add</emphasis> are supported here too.
280 ec377077 Iustin Pop
281 6bf0c9bb Guido Trotter
      </para>
282 6bf0c9bb Guido Trotter
    </sect2>
283 6bf0c9bb Guido Trotter
284 6bf0c9bb Guido Trotter
  </sect1>
285 6bf0c9bb Guido Trotter
286 6bf0c9bb Guido Trotter
287 6bf0c9bb Guido Trotter
  <sect1>
288 6bf0c9bb Guido Trotter
    <title>High availability features</title>
289 6bf0c9bb Guido Trotter
290 ec377077 Iustin Pop
    <note>
291 ec377077 Iustin Pop
      <simpara>This section only applies to multi-node clusters.</simpara>
292 ec377077 Iustin Pop
    </note>
293 ec377077 Iustin Pop
294 6bf0c9bb Guido Trotter
    <sect2>
295 6bf0c9bb Guido Trotter
      <title>Failing over an instance</title>
296 6bf0c9bb Guido Trotter
297 ec377077 Iustin Pop
      <para>
298 ec377077 Iustin Pop
        If an instance is built in highly available mode you can at
299 ec377077 Iustin Pop
        any time fail it over to its secondary node, even if the
300 ec377077 Iustin Pop
        primary has somehow failed and it's not up anymore. Doing it
301 ec377077 Iustin Pop
        is really easy, on the master node you can just run:
302 ec377077 Iustin Pop
303 ec377077 Iustin Pop
      <synopsis>gnt-instance failover <replaceable>INSTANCE_NAME</replaceable></synopsis>
304 ec377077 Iustin Pop
305 ec377077 Iustin Pop
        That's it. After the command completes the secondary node is
306 ec377077 Iustin Pop
        now the primary, and vice versa.
307 6bf0c9bb Guido Trotter
      </para>
308 6bf0c9bb Guido Trotter
    </sect2>
309 ec377077 Iustin Pop
310 6bf0c9bb Guido Trotter
    <sect2>
311 6bf0c9bb Guido Trotter
      <title>Replacing an instance disks</title>
312 6bf0c9bb Guido Trotter
313 ec377077 Iustin Pop
      <para>
314 ec377077 Iustin Pop
        So what if instead the secondary node for an instance has
315 ec377077 Iustin Pop
        failed, or you plan to remove a node from your cluster, and
316 ec377077 Iustin Pop
        you failed over all its instances, but it's still secondary
317 ec377077 Iustin Pop
        for some? The solution here is to replace the instance disks,
318 ec377077 Iustin Pop
        changing the secondary node:
319 ec377077 Iustin Pop
320 ec377077 Iustin Pop
      <synopsis>gnt-instance replace-disks -n <replaceable>NEW_SECONDARY</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
321 ec377077 Iustin Pop
322 ec377077 Iustin Pop
        This process is a bit longer, but involves no instance
323 ec377077 Iustin Pop
        downtime, and at the end of it the instance has changed its
324 ec377077 Iustin Pop
        secondary node, to which it can if necessary be failed over.
325 6bf0c9bb Guido Trotter
      </para>
326 6bf0c9bb Guido Trotter
    </sect2>
327 6bf0c9bb Guido Trotter
    <sect2>
328 6bf0c9bb Guido Trotter
      <title>Failing over the master node</title>
329 6bf0c9bb Guido Trotter
330 ec377077 Iustin Pop
      <para>
331 ec377077 Iustin Pop
        This is all good as long as the Ganeti Master Node is
332 ec377077 Iustin Pop
        up. Should it go down, or should you wish to decommission it,
333 ec377077 Iustin Pop
        just run on any other node the command:
334 ec377077 Iustin Pop
335 ec377077 Iustin Pop
      <synopsis>gnt-cluster masterfailover</synopsis>
336 ec377077 Iustin Pop
337 ec377077 Iustin Pop
        and the node you ran it on is now the new master.
338 6bf0c9bb Guido Trotter
      </para>
339 6bf0c9bb Guido Trotter
    </sect2>
340 6bf0c9bb Guido Trotter
    <sect2>
341 6bf0c9bb Guido Trotter
      <title>Adding/Removing nodes</title>
342 6bf0c9bb Guido Trotter
343 ec377077 Iustin Pop
      <para>
344 ec377077 Iustin Pop
        And of course, now that you know how to move instances around,
345 ec377077 Iustin Pop
        it's easy to free up a node, and then you can remove it from
346 ec377077 Iustin Pop
        the cluster:
347 ec377077 Iustin Pop
348 ec377077 Iustin Pop
      <synopsis>
349 ec377077 Iustin Pop
gnt-node remove <replaceable>NODE_NAME</replaceable>
350 ec377077 Iustin Pop
      </synopsis>
351 ec377077 Iustin Pop
352 ec377077 Iustin Pop
        and maybe add a new one:
353 ec377077 Iustin Pop
354 ec377077 Iustin Pop
      <synopsis>
355 ec377077 Iustin Pop
gnt-node add <optional><option>--secondary-ip=<replaceable>ADDRESS</replaceable></option></optional> <replaceable>NODE_NAME</replaceable>
356 ec377077 Iustin Pop
357 ec377077 Iustin Pop
      </synopsis>
358 6bf0c9bb Guido Trotter
      </para>
359 6bf0c9bb Guido Trotter
    </sect2>
360 6bf0c9bb Guido Trotter
  </sect1>
361 6bf0c9bb Guido Trotter
362 6bf0c9bb Guido Trotter
  <sect1>
363 6bf0c9bb Guido Trotter
    <title>Debugging Features</title>
364 6bf0c9bb Guido Trotter
365 ec377077 Iustin Pop
    <para>
366 ec377077 Iustin Pop
      At some point you might need to do some debugging operations on
367 ec377077 Iustin Pop
      your cluster or on your instances. This section will help you
368 ec377077 Iustin Pop
      with the most used debugging functionalities.
369 6bf0c9bb Guido Trotter
    </para>
370 6bf0c9bb Guido Trotter
371 6bf0c9bb Guido Trotter
    <sect2>
372 6bf0c9bb Guido Trotter
      <title>Accessing an instance's disks</title>
373 6bf0c9bb Guido Trotter
374 ec377077 Iustin Pop
      <para>
375 ec377077 Iustin Pop
        From an instance's primary node you have access to its
376 ec377077 Iustin Pop
        disks. Never ever mount the underlying logical volume manually
377 ec377077 Iustin Pop
        on a fault tolerant instance, or you risk breaking
378 ec377077 Iustin Pop
        replication. The correct way to access them is to run the
379 ec377077 Iustin Pop
        command:
380 ec377077 Iustin Pop
381 ec377077 Iustin Pop
      <synopsis> gnt-instance activate-disks <replaceable>INSTANCE_NAME</replaceable></synopsis>
382 ec377077 Iustin Pop
383 ec377077 Iustin Pop
        And then access the device that gets created.  After you've
384 ec377077 Iustin Pop
        finished you can deactivate them with the deactivate-disks
385 ec377077 Iustin Pop
        command, which works in the same way.
386 6bf0c9bb Guido Trotter
      </para>
387 6bf0c9bb Guido Trotter
    </sect2>
388 6bf0c9bb Guido Trotter
389 6bf0c9bb Guido Trotter
    <sect2>
390 6bf0c9bb Guido Trotter
      <title>Accessing an instance's console</title>
391 6bf0c9bb Guido Trotter
392 ec377077 Iustin Pop
      <para>
393 ec377077 Iustin Pop
        The command to access a running instance's console is:
394 ec377077 Iustin Pop
395 ec377077 Iustin Pop
      <synopsis>gnt-instance console <replaceable>INSTANCE_NAME</replaceable></synopsis>
396 ec377077 Iustin Pop
397 ec377077 Iustin Pop
        Use the console normally and then type
398 ec377077 Iustin Pop
        <userinput>^]</userinput> when done, to exit.
399 6bf0c9bb Guido Trotter
      </para>
400 6bf0c9bb Guido Trotter
    </sect2>
401 6bf0c9bb Guido Trotter
402 6bf0c9bb Guido Trotter
    <sect2>
403 6bf0c9bb Guido Trotter
      <title>Instance Operating System Debugging</title>
404 6bf0c9bb Guido Trotter
405 ec377077 Iustin Pop
      <para>
406 ec377077 Iustin Pop
        Should you have any problems with operating systems support
407 ec377077 Iustin Pop
        the command to ran to see a complete status for all your nodes
408 ec377077 Iustin Pop
        is:
409 ec377077 Iustin Pop
410 ec377077 Iustin Pop
      <synopsis>gnt-os diagnose</synopsis>
411 ec377077 Iustin Pop
412 6bf0c9bb Guido Trotter
      </para>
413 6bf0c9bb Guido Trotter
414 6bf0c9bb Guido Trotter
    </sect2>
415 6bf0c9bb Guido Trotter
416 6bf0c9bb Guido Trotter
    <sect2>
417 6bf0c9bb Guido Trotter
      <title>Cluster-wide debugging</title>
418 6bf0c9bb Guido Trotter
419 ec377077 Iustin Pop
      <para>
420 ec377077 Iustin Pop
        The gnt-cluster command offers several options to run tests or
421 ec377077 Iustin Pop
        execute cluster-wide operations. For example:
422 ec377077 Iustin Pop
423 ec377077 Iustin Pop
      <screen>
424 6bf0c9bb Guido Trotter
gnt-cluster command
425 6bf0c9bb Guido Trotter
gnt-cluster copyfile
426 6bf0c9bb Guido Trotter
gnt-cluster verify
427 6bf0c9bb Guido Trotter
gnt-cluster getmaster
428 6bf0c9bb Guido Trotter
gnt-cluster version
429 ec377077 Iustin Pop
      </screen>
430 ec377077 Iustin Pop
431 ec377077 Iustin Pop
        See the man page <citerefentry>
432 ec377077 Iustin Pop
        <refentrytitle>gnt-cluster</refentrytitle>
433 ec377077 Iustin Pop
        <manvolnum>8</manvolnum> </citerefentry> to know more about
434 ec377077 Iustin Pop
        their usage.
435 6bf0c9bb Guido Trotter
      </para>
436 6bf0c9bb Guido Trotter
    </sect2>
437 6bf0c9bb Guido Trotter
438 6bf0c9bb Guido Trotter
  </sect1>
439 6bf0c9bb Guido Trotter
440 6bf0c9bb Guido Trotter
  </article>