Statistics
| Branch: | Tag: | Revision:

root / doc / admin.sgml @ 36e23a40

History | View | Annotate | Download (14.8 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 36e23a40 Iustin Pop
  <para>Documents Ganeti version 2.0</para>
8 6bf0c9bb Guido Trotter
  <sect1>
9 6bf0c9bb Guido Trotter
    <title>Introduction</title>
10 6bf0c9bb Guido Trotter
11 36e23a40 Iustin Pop
    <para>
12 36e23a40 Iustin Pop
      Ganeti is a virtualization cluster management software. You are
13 36e23a40 Iustin Pop
      expected to be a system administrator familiar with your Linux
14 36e23a40 Iustin Pop
      distribution and the Xen or KVM virtualization environments
15 36e23a40 Iustin Pop
      before using it.
16 6bf0c9bb Guido Trotter
    </para>
17 6bf0c9bb Guido Trotter
18 36e23a40 Iustin Pop
    <para>
19 36e23a40 Iustin Pop
      The various components of Ganeti all have man pages and
20 36e23a40 Iustin Pop
      interactive help. This manual though will help you getting
21 36e23a40 Iustin Pop
      familiar with the system by explaining the most common
22 36e23a40 Iustin Pop
      operations, grouped by related use.
23 6bf0c9bb Guido Trotter
    </para>
24 6bf0c9bb Guido Trotter
25 36e23a40 Iustin Pop
    <para>
26 36e23a40 Iustin Pop
      After a terminology glossary and a section on the prerequisites
27 36e23a40 Iustin Pop
      needed to use this manual, the rest of this document is divided
28 36e23a40 Iustin Pop
      in three main sections, which group different features of
29 36e23a40 Iustin Pop
      Ganeti:
30 6bf0c9bb Guido Trotter
      <itemizedlist>
31 6bf0c9bb Guido Trotter
        <listitem>
32 6bf0c9bb Guido Trotter
          <simpara>Instance Management</simpara>
33 6bf0c9bb Guido Trotter
        </listitem>
34 6bf0c9bb Guido Trotter
        <listitem>
35 6bf0c9bb Guido Trotter
          <simpara>High Availability Features</simpara>
36 6bf0c9bb Guido Trotter
        </listitem>
37 6bf0c9bb Guido Trotter
        <listitem>
38 6bf0c9bb Guido Trotter
          <simpara>Debugging Features</simpara>
39 6bf0c9bb Guido Trotter
        </listitem>
40 6bf0c9bb Guido Trotter
      </itemizedlist>
41 6bf0c9bb Guido Trotter
    </para>
42 6bf0c9bb Guido Trotter
43 6bf0c9bb Guido Trotter
    <sect2>
44 ec377077 Iustin Pop
      <title>Ganeti terminology</title>
45 6bf0c9bb Guido Trotter
46 e3c826ec Michael Hanselmann
      <para>
47 e3c826ec Michael Hanselmann
        This section provides a small introduction to Ganeti terminology, which
48 e3c826ec Michael Hanselmann
        might be useful to read the rest of the document.
49 6bf0c9bb Guido Trotter
50 e3c826ec Michael Hanselmann
        <glosslist>
51 ec377077 Iustin Pop
          <glossentry>
52 ec377077 Iustin Pop
            <glossterm>Cluster</glossterm>
53 ec377077 Iustin Pop
            <glossdef>
54 ec377077 Iustin Pop
              <simpara>
55 ec377077 Iustin Pop
                A set of machines (nodes) that cooperate to offer a
56 ec377077 Iustin Pop
                coherent highly available virtualization service.
57 ec377077 Iustin Pop
              </simpara>
58 ec377077 Iustin Pop
            </glossdef>
59 ec377077 Iustin Pop
          </glossentry>
60 ec377077 Iustin Pop
          <glossentry>
61 ec377077 Iustin Pop
            <glossterm>Node</glossterm>
62 ec377077 Iustin Pop
            <glossdef>
63 ec377077 Iustin Pop
              <simpara>
64 ec377077 Iustin Pop
                A physical machine which is member of a cluster.
65 ec377077 Iustin Pop
                Nodes are the basic cluster infrastructure, and are
66 ec377077 Iustin Pop
                not fault tolerant.
67 ec377077 Iustin Pop
              </simpara>
68 ec377077 Iustin Pop
            </glossdef>
69 ec377077 Iustin Pop
          </glossentry>
70 ec377077 Iustin Pop
          <glossentry>
71 ec377077 Iustin Pop
            <glossterm>Master node</glossterm>
72 ec377077 Iustin Pop
            <glossdef>
73 ec377077 Iustin Pop
              <simpara>
74 ec377077 Iustin Pop
                The node which controls the Cluster, from which all
75 ec377077 Iustin Pop
                Ganeti commands must be given.
76 ec377077 Iustin Pop
              </simpara>
77 ec377077 Iustin Pop
            </glossdef>
78 ec377077 Iustin Pop
          </glossentry>
79 ec377077 Iustin Pop
          <glossentry>
80 ec377077 Iustin Pop
            <glossterm>Instance</glossterm>
81 ec377077 Iustin Pop
            <glossdef>
82 ec377077 Iustin Pop
              <simpara>
83 ec377077 Iustin Pop
                A virtual machine which runs on a cluster. It can be a
84 ec377077 Iustin Pop
                fault tolerant highly available entity.
85 ec377077 Iustin Pop
              </simpara>
86 ec377077 Iustin Pop
            </glossdef>
87 ec377077 Iustin Pop
          </glossentry>
88 ec377077 Iustin Pop
          <glossentry>
89 ec377077 Iustin Pop
            <glossterm>Pool</glossterm>
90 ec377077 Iustin Pop
            <glossdef>
91 ec377077 Iustin Pop
              <simpara>
92 ec377077 Iustin Pop
                A pool is a set of clusters sharing the same network.
93 ec377077 Iustin Pop
              </simpara>
94 ec377077 Iustin Pop
            </glossdef>
95 ec377077 Iustin Pop
          </glossentry>
96 ec377077 Iustin Pop
          <glossentry>
97 ec377077 Iustin Pop
            <glossterm>Meta-Cluster</glossterm>
98 ec377077 Iustin Pop
            <glossdef>
99 ec377077 Iustin Pop
              <simpara>
100 ec377077 Iustin Pop
                Anything that concerns more than one cluster.
101 ec377077 Iustin Pop
              </simpara>
102 ec377077 Iustin Pop
            </glossdef>
103 ec377077 Iustin Pop
          </glossentry>
104 e3c826ec Michael Hanselmann
        </glosslist>
105 6bf0c9bb Guido Trotter
      </para>
106 6bf0c9bb Guido Trotter
    </sect2>
107 6bf0c9bb Guido Trotter
108 6bf0c9bb Guido Trotter
    <sect2>
109 6bf0c9bb Guido Trotter
      <title>Prerequisites</title>
110 6bf0c9bb Guido Trotter
111 ec377077 Iustin Pop
      <para>
112 e3c826ec Michael Hanselmann
        You need to have your Ganeti cluster installed and configured before
113 e3c826ec Michael Hanselmann
        you try any of the commands in this document. Please follow the
114 e3c826ec Michael Hanselmann
        <emphasis>Ganeti installation tutorial</emphasis> for instructions on
115 e3c826ec Michael Hanselmann
        how to do that.
116 6bf0c9bb Guido Trotter
      </para>
117 6bf0c9bb Guido Trotter
    </sect2>
118 6bf0c9bb Guido Trotter
119 6bf0c9bb Guido Trotter
  </sect1>
120 6bf0c9bb Guido Trotter
121 6bf0c9bb Guido Trotter
  <sect1>
122 6bf0c9bb Guido Trotter
    <title>Managing Instances</title>
123 6bf0c9bb Guido Trotter
124 6bf0c9bb Guido Trotter
    <sect2>
125 6bf0c9bb Guido Trotter
      <title>Adding/Removing an instance</title>
126 6bf0c9bb Guido Trotter
127 ec377077 Iustin Pop
      <para>
128 e3c826ec Michael Hanselmann
        Adding a new virtual instance to your Ganeti cluster is really easy.
129 e3c826ec Michael Hanselmann
        The command is:
130 ec377077 Iustin Pop
131 36e23a40 Iustin Pop
        <synopsis>gnt-instance add -n <replaceable>TARGET_NODE<optional>:SECONDARY_NODE</optional></replaceable> -o <replaceable>OS_TYPE</replaceable> -t <replaceable>DISK_TEMPLATE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
132 ec377077 Iustin Pop
133 ec377077 Iustin Pop
        The instance name must be resolvable (e.g. exist in DNS) and
134 36e23a40 Iustin Pop
        usually to an address in the same subnet as the cluster
135 ec377077 Iustin Pop
        itself. Options you can give to this command include:
136 ec377077 Iustin Pop
137 6bf0c9bb Guido Trotter
      <itemizedlist>
138 6bf0c9bb Guido Trotter
        <listitem>
139 36e23a40 Iustin Pop
            <simpara>The disk size (<option>-s</option>) for a
140 36e23a40 Iustin Pop
            single-disk instance, or multiple <option>--disk
141 36e23a40 Iustin Pop
            <replaceable>N</replaceable>:size=<replaceable>SIZE</replaceable></option>
142 36e23a40 Iustin Pop
            options for multi-instance disks</simpara>
143 6bf0c9bb Guido Trotter
        </listitem>
144 6bf0c9bb Guido Trotter
        <listitem>
145 36e23a40 Iustin Pop
          <simpara>The memory size (<option>-B memory</option>)</simpara>
146 6bf0c9bb Guido Trotter
        </listitem>
147 6bf0c9bb Guido Trotter
        <listitem>
148 36e23a40 Iustin Pop
          <simpara>The number of virtual CPUs (<option>-B vcpus</option>)</simpara>
149 6bf0c9bb Guido Trotter
        </listitem>
150 6bf0c9bb Guido Trotter
        <listitem>
151 36e23a40 Iustin Pop
            <para>
152 36e23a40 Iustin Pop
              Arguments for the NICs of the instance; by default, a
153 36e23a40 Iustin Pop
              single-NIC instance is created. The IP and/or bridge of
154 36e23a40 Iustin Pop
              the NIC can be changed via <option>--nic
155 36e23a40 Iustin Pop
              0:ip=<replaceable>IP</replaceable>,bridge=<replaceable>BRIDGE</replaceable></option>
156 36e23a40 Iustin Pop
            </para>
157 6bf0c9bb Guido Trotter
        </listitem>
158 6bf0c9bb Guido Trotter
      </itemizedlist>
159 53b78ba4 Guido Trotter
      </para>
160 53b78ba4 Guido Trotter
161 ec377077 Iustin Pop
      <para>There are four types of disk template you can choose from:</para>
162 53b78ba4 Guido Trotter
163 53b78ba4 Guido Trotter
      <variablelist>
164 53b78ba4 Guido Trotter
        <varlistentry>
165 53b78ba4 Guido Trotter
          <term>diskless</term>
166 e3c826ec Michael Hanselmann
          <listitem>
167 e3c826ec Michael Hanselmann
            <para>The instance has no disks. Only used for special purpouse
168 e3c826ec Michael Hanselmann
              operating systems or for testing.</para>
169 e3c826ec Michael Hanselmann
          </listitem>
170 53b78ba4 Guido Trotter
        </varlistentry>
171 53b78ba4 Guido Trotter
172 53b78ba4 Guido Trotter
        <varlistentry>
173 36e23a40 Iustin Pop
          <term>file</term>
174 36e23a40 Iustin Pop
          <listitem>
175 36e23a40 Iustin Pop
            <para>The instance will use plain files as backend for its
176 36e23a40 Iustin Pop
            disks.  No redundancy is provided, and this is somewhat
177 36e23a40 Iustin Pop
            more difficult to configure for high performance.</para>
178 36e23a40 Iustin Pop
          </listitem>
179 36e23a40 Iustin Pop
        </varlistentry>
180 36e23a40 Iustin Pop
181 36e23a40 Iustin Pop
        <varlistentry>
182 53b78ba4 Guido Trotter
          <term>plain</term>
183 e3c826ec Michael Hanselmann
          <listitem>
184 e3c826ec Michael Hanselmann
            <para>The instance will use LVM devices as backend for its disks.
185 e3c826ec Michael Hanselmann
              No redundancy is provided.</para>
186 e3c826ec Michael Hanselmann
          </listitem>
187 53b78ba4 Guido Trotter
        </varlistentry>
188 53b78ba4 Guido Trotter
189 53b78ba4 Guido Trotter
        <varlistentry>
190 808753d4 Manuel Franceschini
          <term>drbd</term>
191 e3c826ec Michael Hanselmann
          <listitem>
192 e3c826ec Michael Hanselmann
            <simpara><emphasis role="strong">Note:</emphasis> This is only
193 808753d4 Manuel Franceschini
              valid for multi-node clusters using drbd 8.0.x</simpara>
194 ec377077 Iustin Pop
            <simpara>
195 4677a909 Michael Hanselmann
              A mirror is set between the local node and a remote one, which
196 4677a909 Michael Hanselmann
              must be specified with the second value of the --node option. Use
197 4677a909 Michael Hanselmann
              this option to obtain a highly available instance that can be
198 4677a909 Michael Hanselmann
              failed over to a remote node should the primary one fail.
199 e3c826ec Michael Hanselmann
            </simpara>
200 e3c826ec Michael Hanselmann
          </listitem>
201 53b78ba4 Guido Trotter
        </varlistentry>
202 53b78ba4 Guido Trotter
203 53b78ba4 Guido Trotter
      </variablelist>
204 53b78ba4 Guido Trotter
205 ec377077 Iustin Pop
      <para>
206 e3c826ec Michael Hanselmann
        For example if you want to create an highly available instance use the
207 808753d4 Manuel Franceschini
        drbd disk templates:
208 808753d4 Manuel Franceschini
        <synopsis>gnt-instance add -n <replaceable>TARGET_NODE</replaceable><optional>:<replaceable>SECONDARY_NODE</replaceable></optional> -o <replaceable>OS_TYPE</replaceable> -t drbd \
209 4677a909 Michael Hanselmann
  <replaceable>INSTANCE_NAME</replaceable></synopsis>
210 ec377077 Iustin Pop
211 ec377077 Iustin Pop
      <para>
212 e3c826ec Michael Hanselmann
        To know which operating systems your cluster supports you can use
213 ec377077 Iustin Pop
        <synopsis>gnt-os list</synopsis>
214 6bf0c9bb Guido Trotter
      </para>
215 6bf0c9bb Guido Trotter
216 6bf0c9bb Guido Trotter
      <para>
217 36e23a40 Iustin Pop
        Removing an instance is even easier than creating one. This
218 36e23a40 Iustin Pop
        operation is irrereversible and destroys all the contents of
219 36e23a40 Iustin Pop
        your instance. Use with care:
220 ec377077 Iustin Pop
221 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance remove <replaceable>INSTANCE_NAME</replaceable></synopsis>
222 6bf0c9bb Guido Trotter
      </para>
223 6bf0c9bb Guido Trotter
    </sect2>
224 6bf0c9bb Guido Trotter
225 6bf0c9bb Guido Trotter
    <sect2>
226 6bf0c9bb Guido Trotter
      <title>Starting/Stopping an instance</title>
227 6bf0c9bb Guido Trotter
228 ec377077 Iustin Pop
      <para>
229 e3c826ec Michael Hanselmann
        Instances are automatically started at instance creation time. To
230 e3c826ec Michael Hanselmann
        manually start one which is currently stopped you can run:
231 ec377077 Iustin Pop
232 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance startup <replaceable>INSTANCE_NAME</replaceable></synopsis>
233 ec377077 Iustin Pop
234 ec377077 Iustin Pop
        While the command to stop one is:
235 ec377077 Iustin Pop
236 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance shutdown <replaceable>INSTANCE_NAME</replaceable></synopsis>
237 ec377077 Iustin Pop
238 e3c826ec Michael Hanselmann
        The command to see all the instances configured and their status is:
239 ec377077 Iustin Pop
240 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance list</synopsis>
241 ec377077 Iustin Pop
242 6bf0c9bb Guido Trotter
      </para>
243 53b78ba4 Guido Trotter
244 ec377077 Iustin Pop
      <para>
245 ec377077 Iustin Pop
        Do not use the xen commands to stop instances. If you run for
246 ec377077 Iustin Pop
        example xm shutdown or xm destroy on an instance Ganeti will
247 ec377077 Iustin Pop
        automatically restart it (via the
248 ec377077 Iustin Pop
        <citerefentry><refentrytitle>ganeti-watcher</refentrytitle>
249 ec377077 Iustin Pop
        <manvolnum>8</manvolnum></citerefentry>)
250 53b78ba4 Guido Trotter
      </para>
251 53b78ba4 Guido Trotter
252 6bf0c9bb Guido Trotter
    </sect2>
253 6bf0c9bb Guido Trotter
254 6bf0c9bb Guido Trotter
    <sect2>
255 6bf0c9bb Guido Trotter
      <title>Exporting/Importing an instance</title>
256 6bf0c9bb Guido Trotter
257 ec377077 Iustin Pop
      <para>
258 ec377077 Iustin Pop
        You can create a snapshot of an instance disk and Ganeti
259 ec377077 Iustin Pop
        configuration, which then you can backup, or import into
260 e3c826ec Michael Hanselmann
        another cluster. The way to export an instance is:
261 ec377077 Iustin Pop
262 e3c826ec Michael Hanselmann
        <synopsis>gnt-backup export -n <replaceable>TARGET_NODE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis>
263 ec377077 Iustin Pop
264 ec377077 Iustin Pop
        The target node can be any node in the cluster with enough
265 ec377077 Iustin Pop
        space under <filename class="directory">/srv/ganeti</filename>
266 ec377077 Iustin Pop
        to hold the instance image. Use the
267 ec377077 Iustin Pop
        <option>--noshutdown</option> option to snapshot an instance
268 ec377077 Iustin Pop
        without rebooting it. Any previous snapshot of the same
269 ec377077 Iustin Pop
        instance existing cluster-wide under <filename
270 ec377077 Iustin Pop
        class="directory">/srv/ganeti</filename> will be removed by
271 ec377077 Iustin Pop
        this operation: if you want to keep them move them out of the
272 ec377077 Iustin Pop
        Ganeti exports directory.
273 6bf0c9bb Guido Trotter
      </para>
274 6bf0c9bb Guido Trotter
275 ec377077 Iustin Pop
      <para>
276 e3c826ec Michael Hanselmann
        Importing an instance is similar to creating a new one. The command is:
277 ec377077 Iustin Pop
278 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>
279 ec377077 Iustin Pop
280 ec377077 Iustin Pop
        Most of the options available for the command
281 ec377077 Iustin Pop
        <emphasis>gnt-instance add</emphasis> are supported here too.
282 ec377077 Iustin Pop
283 6bf0c9bb Guido Trotter
      </para>
284 6bf0c9bb Guido Trotter
    </sect2>
285 6bf0c9bb Guido Trotter
286 6bf0c9bb Guido Trotter
  </sect1>
287 6bf0c9bb Guido Trotter
288 6bf0c9bb Guido Trotter
289 6bf0c9bb Guido Trotter
  <sect1>
290 6bf0c9bb Guido Trotter
    <title>High availability features</title>
291 6bf0c9bb Guido Trotter
292 ec377077 Iustin Pop
    <note>
293 ec377077 Iustin Pop
      <simpara>This section only applies to multi-node clusters.</simpara>
294 ec377077 Iustin Pop
    </note>
295 ec377077 Iustin Pop
296 6bf0c9bb Guido Trotter
    <sect2>
297 6bf0c9bb Guido Trotter
      <title>Failing over an instance</title>
298 6bf0c9bb Guido Trotter
299 ec377077 Iustin Pop
      <para>
300 ec377077 Iustin Pop
        If an instance is built in highly available mode you can at
301 ec377077 Iustin Pop
        any time fail it over to its secondary node, even if the
302 ec377077 Iustin Pop
        primary has somehow failed and it's not up anymore. Doing it
303 ec377077 Iustin Pop
        is really easy, on the master node you can just run:
304 ec377077 Iustin Pop
305 e3c826ec Michael Hanselmann
        <synopsis>gnt-instance failover <replaceable>INSTANCE_NAME</replaceable></synopsis>
306 ec377077 Iustin Pop
307 ec377077 Iustin Pop
        That's it. After the command completes the secondary node is
308 ec377077 Iustin Pop
        now the primary, and vice versa.
309 6bf0c9bb Guido Trotter
      </para>
310 6bf0c9bb Guido Trotter
    </sect2>
311 ec377077 Iustin Pop
312 6bf0c9bb Guido Trotter
    <sect2>
313 36e23a40 Iustin Pop
      <title>Live migrating an instance</title>
314 36e23a40 Iustin Pop
315 36e23a40 Iustin Pop
      <para>
316 36e23a40 Iustin Pop
        If an instance is built in highly available mode, it currently
317 36e23a40 Iustin Pop
        runs and both its nodes are running fine, you can at migrate
318 36e23a40 Iustin Pop
        it over to its secondary node, without dowtime. On the master
319 36e23a40 Iustin Pop
        node you need to run:
320 36e23a40 Iustin Pop
321 36e23a40 Iustin Pop
        <synopsis>gnt-instance migrate <replaceable>INSTANCE_NAME</replaceable></synopsis>
322 36e23a40 Iustin Pop
323 36e23a40 Iustin Pop
      </para>
324 36e23a40 Iustin Pop
    </sect2>
325 36e23a40 Iustin Pop
326 36e23a40 Iustin Pop
327 36e23a40 Iustin Pop
    <sect2>
328 6bf0c9bb Guido Trotter
      <title>Replacing an instance disks</title>
329 6bf0c9bb Guido Trotter
330 ec377077 Iustin Pop
      <para>
331 ec377077 Iustin Pop
        So what if instead the secondary node for an instance has
332 ec377077 Iustin Pop
        failed, or you plan to remove a node from your cluster, and
333 ec377077 Iustin Pop
        you failed over all its instances, but it's still secondary
334 ec377077 Iustin Pop
        for some? The solution here is to replace the instance disks,
335 808753d4 Manuel Franceschini
        changing the secondary node:
336 36e23a40 Iustin Pop
        <synopsis>gnt-instance replace-disks <option>-n <replaceable>NODE</replaceable></option> <replaceable>INSTANCE_NAME</replaceable></synopsis>
337 ec377077 Iustin Pop
338 808753d4 Manuel Franceschini
        This process is a bit long, but involves no instance
339 ec377077 Iustin Pop
        downtime, and at the end of it the instance has changed its
340 ec377077 Iustin Pop
        secondary node, to which it can if necessary be failed over.
341 6bf0c9bb Guido Trotter
      </para>
342 6bf0c9bb Guido Trotter
    </sect2>
343 36e23a40 Iustin Pop
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 36e23a40 Iustin Pop
gnt-cluster verify-disks
442 6bf0c9bb Guido Trotter
gnt-cluster getmaster
443 6bf0c9bb Guido Trotter
gnt-cluster version
444 ec377077 Iustin Pop
      </screen>
445 ec377077 Iustin Pop
446 ec377077 Iustin Pop
        See the man page <citerefentry>
447 ec377077 Iustin Pop
        <refentrytitle>gnt-cluster</refentrytitle>
448 ec377077 Iustin Pop
        <manvolnum>8</manvolnum> </citerefentry> to know more about
449 ec377077 Iustin Pop
        their usage.
450 6bf0c9bb Guido Trotter
      </para>
451 6bf0c9bb Guido Trotter
    </sect2>
452 6bf0c9bb Guido Trotter
453 6bf0c9bb Guido Trotter
  </sect1>
454 6bf0c9bb Guido Trotter
455 6bf0c9bb Guido Trotter
  </article>