root / doc / admin.sgml @ cd55576a
History | View | Annotate | Download (13.9 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 | 808753d4 | Manuel Franceschini | <para>Documents Ganeti version 1.3</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 | 808753d4 | Manuel Franceschini | <term>drbd</term> |
177 | e3c826ec | Michael Hanselmann | <listitem> |
178 | e3c826ec | Michael Hanselmann | <simpara><emphasis role="strong">Note:</emphasis> This is only |
179 | 808753d4 | Manuel Franceschini | valid for multi-node clusters using drbd 8.0.x</simpara> |
180 | ec377077 | Iustin Pop | <simpara> |
181 | 4677a909 | Michael Hanselmann | A mirror is set between the local node and a remote one, which |
182 | 4677a909 | Michael Hanselmann | must be specified with the second value of the --node option. Use |
183 | 4677a909 | Michael Hanselmann | this option to obtain a highly available instance that can be |
184 | 4677a909 | Michael Hanselmann | failed over to a remote node should the primary one fail. |
185 | e3c826ec | Michael Hanselmann | </simpara> |
186 | e3c826ec | Michael Hanselmann | </listitem> |
187 | 53b78ba4 | Guido Trotter | </varlistentry> |
188 | 53b78ba4 | Guido Trotter | |
189 | 53b78ba4 | Guido Trotter | </variablelist> |
190 | 53b78ba4 | Guido Trotter | |
191 | ec377077 | Iustin Pop | <para> |
192 | e3c826ec | Michael Hanselmann | For example if you want to create an highly available instance use the |
193 | 808753d4 | Manuel Franceschini | drbd disk templates: |
194 | 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 \ |
195 | 4677a909 | Michael Hanselmann | <replaceable>INSTANCE_NAME</replaceable></synopsis> |
196 | ec377077 | Iustin Pop | |
197 | ec377077 | Iustin Pop | <para> |
198 | e3c826ec | Michael Hanselmann | To know which operating systems your cluster supports you can use |
199 | ec377077 | Iustin Pop | <synopsis>gnt-os list</synopsis> |
200 | 6bf0c9bb | Guido Trotter | </para> |
201 | 6bf0c9bb | Guido Trotter | |
202 | 6bf0c9bb | Guido Trotter | <para> |
203 | e3c826ec | Michael Hanselmann | Removing an instance is even easier than creating one. This operation |
204 | e3c826ec | Michael Hanselmann | is non-reversible and destroys all the contents of your instance. Use |
205 | e3c826ec | Michael Hanselmann | with care: |
206 | ec377077 | Iustin Pop | |
207 | e3c826ec | Michael Hanselmann | <synopsis>gnt-instance remove <replaceable>INSTANCE_NAME</replaceable></synopsis> |
208 | 6bf0c9bb | Guido Trotter | </para> |
209 | 6bf0c9bb | Guido Trotter | </sect2> |
210 | 6bf0c9bb | Guido Trotter | |
211 | 6bf0c9bb | Guido Trotter | <sect2> |
212 | 6bf0c9bb | Guido Trotter | <title>Starting/Stopping an instance</title> |
213 | 6bf0c9bb | Guido Trotter | |
214 | ec377077 | Iustin Pop | <para> |
215 | e3c826ec | Michael Hanselmann | Instances are automatically started at instance creation time. To |
216 | e3c826ec | Michael Hanselmann | manually start one which is currently stopped you can run: |
217 | ec377077 | Iustin Pop | |
218 | e3c826ec | Michael Hanselmann | <synopsis>gnt-instance startup <replaceable>INSTANCE_NAME</replaceable></synopsis> |
219 | ec377077 | Iustin Pop | |
220 | ec377077 | Iustin Pop | While the command to stop one is: |
221 | ec377077 | Iustin Pop | |
222 | e3c826ec | Michael Hanselmann | <synopsis>gnt-instance shutdown <replaceable>INSTANCE_NAME</replaceable></synopsis> |
223 | ec377077 | Iustin Pop | |
224 | e3c826ec | Michael Hanselmann | The command to see all the instances configured and their status is: |
225 | ec377077 | Iustin Pop | |
226 | e3c826ec | Michael Hanselmann | <synopsis>gnt-instance list</synopsis> |
227 | ec377077 | Iustin Pop | |
228 | 6bf0c9bb | Guido Trotter | </para> |
229 | 53b78ba4 | Guido Trotter | |
230 | ec377077 | Iustin Pop | <para> |
231 | ec377077 | Iustin Pop | Do not use the xen commands to stop instances. If you run for |
232 | ec377077 | Iustin Pop | example xm shutdown or xm destroy on an instance Ganeti will |
233 | ec377077 | Iustin Pop | automatically restart it (via the |
234 | ec377077 | Iustin Pop | <citerefentry><refentrytitle>ganeti-watcher</refentrytitle> |
235 | ec377077 | Iustin Pop | <manvolnum>8</manvolnum></citerefentry>) |
236 | 53b78ba4 | Guido Trotter | </para> |
237 | 53b78ba4 | Guido Trotter | |
238 | 6bf0c9bb | Guido Trotter | </sect2> |
239 | 6bf0c9bb | Guido Trotter | |
240 | 6bf0c9bb | Guido Trotter | <sect2> |
241 | 6bf0c9bb | Guido Trotter | <title>Exporting/Importing an instance</title> |
242 | 6bf0c9bb | Guido Trotter | |
243 | ec377077 | Iustin Pop | <para> |
244 | ec377077 | Iustin Pop | You can create a snapshot of an instance disk and Ganeti |
245 | ec377077 | Iustin Pop | configuration, which then you can backup, or import into |
246 | e3c826ec | Michael Hanselmann | another cluster. The way to export an instance is: |
247 | ec377077 | Iustin Pop | |
248 | e3c826ec | Michael Hanselmann | <synopsis>gnt-backup export -n <replaceable>TARGET_NODE</replaceable> <replaceable>INSTANCE_NAME</replaceable></synopsis> |
249 | ec377077 | Iustin Pop | |
250 | ec377077 | Iustin Pop | The target node can be any node in the cluster with enough |
251 | ec377077 | Iustin Pop | space under <filename class="directory">/srv/ganeti</filename> |
252 | ec377077 | Iustin Pop | to hold the instance image. Use the |
253 | ec377077 | Iustin Pop | <option>--noshutdown</option> option to snapshot an instance |
254 | ec377077 | Iustin Pop | without rebooting it. Any previous snapshot of the same |
255 | ec377077 | Iustin Pop | instance existing cluster-wide under <filename |
256 | ec377077 | Iustin Pop | class="directory">/srv/ganeti</filename> will be removed by |
257 | ec377077 | Iustin Pop | this operation: if you want to keep them move them out of the |
258 | ec377077 | Iustin Pop | Ganeti exports directory. |
259 | 6bf0c9bb | Guido Trotter | </para> |
260 | 6bf0c9bb | Guido Trotter | |
261 | ec377077 | Iustin Pop | <para> |
262 | e3c826ec | Michael Hanselmann | Importing an instance is similar to creating a new one. The command is: |
263 | ec377077 | Iustin Pop | |
264 | 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> |
265 | ec377077 | Iustin Pop | |
266 | ec377077 | Iustin Pop | Most of the options available for the command |
267 | ec377077 | Iustin Pop | <emphasis>gnt-instance add</emphasis> are supported here too. |
268 | ec377077 | Iustin Pop | |
269 | 6bf0c9bb | Guido Trotter | </para> |
270 | 6bf0c9bb | Guido Trotter | </sect2> |
271 | 6bf0c9bb | Guido Trotter | |
272 | 6bf0c9bb | Guido Trotter | </sect1> |
273 | 6bf0c9bb | Guido Trotter | |
274 | 6bf0c9bb | Guido Trotter | |
275 | 6bf0c9bb | Guido Trotter | <sect1> |
276 | 6bf0c9bb | Guido Trotter | <title>High availability features</title> |
277 | 6bf0c9bb | Guido Trotter | |
278 | ec377077 | Iustin Pop | <note> |
279 | ec377077 | Iustin Pop | <simpara>This section only applies to multi-node clusters.</simpara> |
280 | ec377077 | Iustin Pop | </note> |
281 | ec377077 | Iustin Pop | |
282 | 6bf0c9bb | Guido Trotter | <sect2> |
283 | 6bf0c9bb | Guido Trotter | <title>Failing over an instance</title> |
284 | 6bf0c9bb | Guido Trotter | |
285 | ec377077 | Iustin Pop | <para> |
286 | ec377077 | Iustin Pop | If an instance is built in highly available mode you can at |
287 | ec377077 | Iustin Pop | any time fail it over to its secondary node, even if the |
288 | ec377077 | Iustin Pop | primary has somehow failed and it's not up anymore. Doing it |
289 | ec377077 | Iustin Pop | is really easy, on the master node you can just run: |
290 | ec377077 | Iustin Pop | |
291 | e3c826ec | Michael Hanselmann | <synopsis>gnt-instance failover <replaceable>INSTANCE_NAME</replaceable></synopsis> |
292 | ec377077 | Iustin Pop | |
293 | ec377077 | Iustin Pop | That's it. After the command completes the secondary node is |
294 | ec377077 | Iustin Pop | now the primary, and vice versa. |
295 | 6bf0c9bb | Guido Trotter | </para> |
296 | 6bf0c9bb | Guido Trotter | </sect2> |
297 | ec377077 | Iustin Pop | |
298 | 6bf0c9bb | Guido Trotter | <sect2> |
299 | 6bf0c9bb | Guido Trotter | <title>Replacing an instance disks</title> |
300 | 6bf0c9bb | Guido Trotter | |
301 | ec377077 | Iustin Pop | <para> |
302 | ec377077 | Iustin Pop | So what if instead the secondary node for an instance has |
303 | ec377077 | Iustin Pop | failed, or you plan to remove a node from your cluster, and |
304 | ec377077 | Iustin Pop | you failed over all its instances, but it's still secondary |
305 | ec377077 | Iustin Pop | for some? The solution here is to replace the instance disks, |
306 | 808753d4 | Manuel Franceschini | changing the secondary node: |
307 | 808753d4 | Manuel Franceschini | <synopsis>gnt-instance replace-disks <option>-s</option> <option>--new-secondary <replaceable>NODE</replaceable></option> <replaceable>INSTANCE_NAME</replaceable></synopsis> |
308 | ec377077 | Iustin Pop | |
309 | 808753d4 | Manuel Franceschini | This process is a bit long, but involves no instance |
310 | ec377077 | Iustin Pop | downtime, and at the end of it the instance has changed its |
311 | ec377077 | Iustin Pop | secondary node, to which it can if necessary be failed over. |
312 | 6bf0c9bb | Guido Trotter | </para> |
313 | 6bf0c9bb | Guido Trotter | </sect2> |
314 | 6bf0c9bb | Guido Trotter | <sect2> |
315 | 6bf0c9bb | Guido Trotter | <title>Failing over the master node</title> |
316 | 6bf0c9bb | Guido Trotter | |
317 | ec377077 | Iustin Pop | <para> |
318 | ec377077 | Iustin Pop | This is all good as long as the Ganeti Master Node is |
319 | ec377077 | Iustin Pop | up. Should it go down, or should you wish to decommission it, |
320 | ec377077 | Iustin Pop | just run on any other node the command: |
321 | ec377077 | Iustin Pop | |
322 | e3c826ec | Michael Hanselmann | <synopsis>gnt-cluster masterfailover</synopsis> |
323 | ec377077 | Iustin Pop | |
324 | ec377077 | Iustin Pop | and the node you ran it on is now the new master. |
325 | 6bf0c9bb | Guido Trotter | </para> |
326 | 6bf0c9bb | Guido Trotter | </sect2> |
327 | 6bf0c9bb | Guido Trotter | <sect2> |
328 | 6bf0c9bb | Guido Trotter | <title>Adding/Removing nodes</title> |
329 | 6bf0c9bb | Guido Trotter | |
330 | ec377077 | Iustin Pop | <para> |
331 | ec377077 | Iustin Pop | And of course, now that you know how to move instances around, |
332 | ec377077 | Iustin Pop | it's easy to free up a node, and then you can remove it from |
333 | ec377077 | Iustin Pop | the cluster: |
334 | ec377077 | Iustin Pop | |
335 | e3c826ec | Michael Hanselmann | <synopsis>gnt-node remove <replaceable>NODE_NAME</replaceable></synopsis> |
336 | ec377077 | Iustin Pop | |
337 | ec377077 | Iustin Pop | and maybe add a new one: |
338 | ec377077 | Iustin Pop | |
339 | e3c826ec | Michael Hanselmann | <synopsis>gnt-node add <optional><option>--secondary-ip=<replaceable>ADDRESS</replaceable></option></optional> <replaceable>NODE_NAME</replaceable> |
340 | ec377077 | Iustin Pop | |
341 | ec377077 | Iustin Pop | </synopsis> |
342 | 6bf0c9bb | Guido Trotter | </para> |
343 | 6bf0c9bb | Guido Trotter | </sect2> |
344 | 6bf0c9bb | Guido Trotter | </sect1> |
345 | 6bf0c9bb | Guido Trotter | |
346 | 6bf0c9bb | Guido Trotter | <sect1> |
347 | 6bf0c9bb | Guido Trotter | <title>Debugging Features</title> |
348 | 6bf0c9bb | Guido Trotter | |
349 | ec377077 | Iustin Pop | <para> |
350 | ec377077 | Iustin Pop | At some point you might need to do some debugging operations on |
351 | ec377077 | Iustin Pop | your cluster or on your instances. This section will help you |
352 | ec377077 | Iustin Pop | with the most used debugging functionalities. |
353 | 6bf0c9bb | Guido Trotter | </para> |
354 | 6bf0c9bb | Guido Trotter | |
355 | 6bf0c9bb | Guido Trotter | <sect2> |
356 | 6bf0c9bb | Guido Trotter | <title>Accessing an instance's disks</title> |
357 | 6bf0c9bb | Guido Trotter | |
358 | ec377077 | Iustin Pop | <para> |
359 | ec377077 | Iustin Pop | From an instance's primary node you have access to its |
360 | ec377077 | Iustin Pop | disks. Never ever mount the underlying logical volume manually |
361 | ec377077 | Iustin Pop | on a fault tolerant instance, or you risk breaking |
362 | ec377077 | Iustin Pop | replication. The correct way to access them is to run the |
363 | ec377077 | Iustin Pop | command: |
364 | ec377077 | Iustin Pop | |
365 | e3c826ec | Michael Hanselmann | <synopsis>gnt-instance activate-disks <replaceable>INSTANCE_NAME</replaceable></synopsis> |
366 | ec377077 | Iustin Pop | |
367 | ec377077 | Iustin Pop | And then access the device that gets created. After you've |
368 | ec377077 | Iustin Pop | finished you can deactivate them with the deactivate-disks |
369 | ec377077 | Iustin Pop | command, which works in the same way. |
370 | 6bf0c9bb | Guido Trotter | </para> |
371 | 6bf0c9bb | Guido Trotter | </sect2> |
372 | 6bf0c9bb | Guido Trotter | |
373 | 6bf0c9bb | Guido Trotter | <sect2> |
374 | 6bf0c9bb | Guido Trotter | <title>Accessing an instance's console</title> |
375 | 6bf0c9bb | Guido Trotter | |
376 | ec377077 | Iustin Pop | <para> |
377 | ec377077 | Iustin Pop | The command to access a running instance's console is: |
378 | ec377077 | Iustin Pop | |
379 | e3c826ec | Michael Hanselmann | <synopsis>gnt-instance console <replaceable>INSTANCE_NAME</replaceable></synopsis> |
380 | ec377077 | Iustin Pop | |
381 | ec377077 | Iustin Pop | Use the console normally and then type |
382 | ec377077 | Iustin Pop | <userinput>^]</userinput> when done, to exit. |
383 | 6bf0c9bb | Guido Trotter | </para> |
384 | 6bf0c9bb | Guido Trotter | </sect2> |
385 | 6bf0c9bb | Guido Trotter | |
386 | 6bf0c9bb | Guido Trotter | <sect2> |
387 | 6c4811dc | Iustin Pop | <title>Instance OS definitions Debugging</title> |
388 | 6bf0c9bb | Guido Trotter | |
389 | ec377077 | Iustin Pop | <para> |
390 | ec377077 | Iustin Pop | Should you have any problems with operating systems support |
391 | ec377077 | Iustin Pop | the command to ran to see a complete status for all your nodes |
392 | ec377077 | Iustin Pop | is: |
393 | ec377077 | Iustin Pop | |
394 | e3c826ec | Michael Hanselmann | <synopsis>gnt-os diagnose</synopsis> |
395 | ec377077 | Iustin Pop | |
396 | 6bf0c9bb | Guido Trotter | </para> |
397 | 6bf0c9bb | Guido Trotter | |
398 | 6bf0c9bb | Guido Trotter | </sect2> |
399 | 6bf0c9bb | Guido Trotter | |
400 | 6bf0c9bb | Guido Trotter | <sect2> |
401 | 6bf0c9bb | Guido Trotter | <title>Cluster-wide debugging</title> |
402 | 6bf0c9bb | Guido Trotter | |
403 | ec377077 | Iustin Pop | <para> |
404 | ec377077 | Iustin Pop | The gnt-cluster command offers several options to run tests or |
405 | ec377077 | Iustin Pop | execute cluster-wide operations. For example: |
406 | ec377077 | Iustin Pop | |
407 | ec377077 | Iustin Pop | <screen> |
408 | 6bf0c9bb | Guido Trotter | gnt-cluster command |
409 | 6bf0c9bb | Guido Trotter | gnt-cluster copyfile |
410 | 6bf0c9bb | Guido Trotter | gnt-cluster verify |
411 | 6bf0c9bb | Guido Trotter | gnt-cluster getmaster |
412 | 6bf0c9bb | Guido Trotter | gnt-cluster version |
413 | ec377077 | Iustin Pop | </screen> |
414 | ec377077 | Iustin Pop | |
415 | ec377077 | Iustin Pop | See the man page <citerefentry> |
416 | ec377077 | Iustin Pop | <refentrytitle>gnt-cluster</refentrytitle> |
417 | ec377077 | Iustin Pop | <manvolnum>8</manvolnum> </citerefentry> to know more about |
418 | ec377077 | Iustin Pop | their usage. |
419 | 6bf0c9bb | Guido Trotter | </para> |
420 | 6bf0c9bb | Guido Trotter | </sect2> |
421 | 6bf0c9bb | Guido Trotter | |
422 | 6bf0c9bb | Guido Trotter | </sect1> |
423 | 6bf0c9bb | Guido Trotter | |
424 | 6bf0c9bb | Guido Trotter | </article> |