root / docs / admin.sgml @ 53b78ba4
History | View | Annotate | Download (12 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 | 6bf0c9bb | Guido Trotter | <title>Ganeti Terminology</title> |
39 | 6bf0c9bb | Guido Trotter | |
40 | 6bf0c9bb | Guido Trotter | <para>This section provides a small introduction to Ganeti terminology, |
41 | 6bf0c9bb | Guido Trotter | which might be useful to read the rest of the document. |
42 | 6bf0c9bb | Guido Trotter | |
43 | 6bf0c9bb | Guido Trotter | <variablelist> |
44 | 6bf0c9bb | Guido Trotter | <varlistentry> |
45 | 6bf0c9bb | Guido Trotter | <term>Cluster</term> |
46 | 6bf0c9bb | Guido Trotter | <listitem><para>A set of machines (nodes) that cooperate to offer a |
47 | 6bf0c9bb | Guido Trotter | coherent highly available virtualization service.</para></listitem> |
48 | 6bf0c9bb | Guido Trotter | </varlistentry> |
49 | 6bf0c9bb | Guido Trotter | |
50 | 6bf0c9bb | Guido Trotter | <varlistentry> |
51 | 6bf0c9bb | Guido Trotter | <term>Node</term> |
52 | 6bf0c9bb | Guido Trotter | <listitem><para>A physical machine which is member of a cluster. |
53 | 6bf0c9bb | Guido Trotter | Nodes are the basic cluster infrastructure, and are not fault |
54 | 6bf0c9bb | Guido Trotter | tolerant.</para></listitem> |
55 | 6bf0c9bb | Guido Trotter | </varlistentry> |
56 | 6bf0c9bb | Guido Trotter | |
57 | 6bf0c9bb | Guido Trotter | <varlistentry> |
58 | 6bf0c9bb | Guido Trotter | <term>Master Node</term> |
59 | 6bf0c9bb | Guido Trotter | <listitem><para>The node which controls the Cluster, from which all |
60 | 6bf0c9bb | Guido Trotter | Ganeti commands must be given.</para></listitem> |
61 | 6bf0c9bb | Guido Trotter | </varlistentry> |
62 | 6bf0c9bb | Guido Trotter | |
63 | 6bf0c9bb | Guido Trotter | <varlistentry> |
64 | 6bf0c9bb | Guido Trotter | <term>Instance</term> |
65 | 6bf0c9bb | Guido Trotter | <listitem><para>A virtual machine which runs on a cluster. It can be |
66 | 6bf0c9bb | Guido Trotter | a fault tolerant highly available entity.</para></listitem> |
67 | 6bf0c9bb | Guido Trotter | </varlistentry> |
68 | 6bf0c9bb | Guido Trotter | |
69 | 6bf0c9bb | Guido Trotter | <varlistentry> |
70 | 6bf0c9bb | Guido Trotter | <term>Pool</term> |
71 | 6bf0c9bb | Guido Trotter | <listitem><para>A pool is a set of clusters sharing the same |
72 | 6bf0c9bb | Guido Trotter | network.</para></listitem> |
73 | 6bf0c9bb | Guido Trotter | </varlistentry> |
74 | 6bf0c9bb | Guido Trotter | |
75 | 6bf0c9bb | Guido Trotter | <varlistentry> |
76 | 6bf0c9bb | Guido Trotter | <term>Meta-Cluster</term> |
77 | 6bf0c9bb | Guido Trotter | <listitem><para>Anything that concerns more than one |
78 | 6bf0c9bb | Guido Trotter | cluster.</para></listitem> |
79 | 6bf0c9bb | Guido Trotter | </varlistentry> |
80 | 6bf0c9bb | Guido Trotter | |
81 | 6bf0c9bb | Guido Trotter | </variablelist> |
82 | 6bf0c9bb | Guido Trotter | |
83 | 6bf0c9bb | Guido Trotter | </para> |
84 | 6bf0c9bb | Guido Trotter | </sect2> |
85 | 6bf0c9bb | Guido Trotter | |
86 | 6bf0c9bb | Guido Trotter | <sect2> |
87 | 6bf0c9bb | Guido Trotter | <title>Prerequisites</title> |
88 | 6bf0c9bb | Guido Trotter | |
89 | 6bf0c9bb | Guido Trotter | <para>You need to have your Ganeti cluster installed and configured |
90 | 6bf0c9bb | Guido Trotter | before you try any of the commands in this document. Please follow the |
91 | 6bf0c9bb | Guido Trotter | "installing tutorial" for instructions on how to do that. |
92 | 6bf0c9bb | Guido Trotter | </para> |
93 | 6bf0c9bb | Guido Trotter | </sect2> |
94 | 6bf0c9bb | Guido Trotter | |
95 | 6bf0c9bb | Guido Trotter | </sect1> |
96 | 6bf0c9bb | Guido Trotter | |
97 | 6bf0c9bb | Guido Trotter | <sect1> |
98 | 6bf0c9bb | Guido Trotter | <title>Managing Instances</title> |
99 | 6bf0c9bb | Guido Trotter | |
100 | 6bf0c9bb | Guido Trotter | <sect2> |
101 | 6bf0c9bb | Guido Trotter | <title>Adding/Removing an instance</title> |
102 | 6bf0c9bb | Guido Trotter | |
103 | 6bf0c9bb | Guido Trotter | <para>Adding a new virtual instance to your Ganeti cluster is really |
104 | 6bf0c9bb | Guido Trotter | easy. The command is: |
105 | 6bf0c9bb | Guido Trotter | <programlisting> |
106 | 6bf0c9bb | Guido Trotter | gnt-instance add -n TARGET_NODE -o OS_TYPE -t DISK_TEMPLATE INSTANCE_NAME |
107 | 6bf0c9bb | Guido Trotter | </programlisting> |
108 | 6bf0c9bb | Guido Trotter | The instance name must exist in dns and of course map to an address in |
109 | 6bf0c9bb | Guido Trotter | the same subnet as the cluster itself. Options you can give to this |
110 | 6bf0c9bb | Guido Trotter | command include: |
111 | 6bf0c9bb | Guido Trotter | <itemizedlist> |
112 | 6bf0c9bb | Guido Trotter | <listitem> |
113 | 6bf0c9bb | Guido Trotter | <simpara>The disk size (-s)</simpara> |
114 | 6bf0c9bb | Guido Trotter | </listitem> |
115 | 6bf0c9bb | Guido Trotter | <listitem> |
116 | 6bf0c9bb | Guido Trotter | <simpara>The swap size (--swap-size)</simpara> |
117 | 6bf0c9bb | Guido Trotter | </listitem> |
118 | 6bf0c9bb | Guido Trotter | <listitem> |
119 | 6bf0c9bb | Guido Trotter | <simpara>The memory size (-m)</simpara> |
120 | 6bf0c9bb | Guido Trotter | </listitem> |
121 | 6bf0c9bb | Guido Trotter | <listitem> |
122 | 6bf0c9bb | Guido Trotter | <simpara>The number of virtual CPUs (-p)</simpara> |
123 | 6bf0c9bb | Guido Trotter | </listitem> |
124 | 6bf0c9bb | Guido Trotter | <listitem> |
125 | 6bf0c9bb | Guido Trotter | <simpara>The instance ip address (-i) (use -i auto to make Ganeti |
126 | 6bf0c9bb | Guido Trotter | record the address from dns)</simpara> |
127 | 6bf0c9bb | Guido Trotter | </listitem> |
128 | 6bf0c9bb | Guido Trotter | <listitem> |
129 | 6bf0c9bb | Guido Trotter | <simpara>The bridge to connect the instance to (-b), if you don't |
130 | 6bf0c9bb | Guido Trotter | want to use the default one</simpara> |
131 | 6bf0c9bb | Guido Trotter | </listitem> |
132 | 6bf0c9bb | Guido Trotter | </itemizedlist> |
133 | 53b78ba4 | Guido Trotter | </para> |
134 | 53b78ba4 | Guido Trotter | |
135 | 53b78ba4 | Guido Trotter | <para>There are four types of disk template you can choose from: |
136 | 53b78ba4 | Guido Trotter | |
137 | 53b78ba4 | Guido Trotter | <variablelist> |
138 | 53b78ba4 | Guido Trotter | <varlistentry> |
139 | 53b78ba4 | Guido Trotter | <term>diskless</term> |
140 | 53b78ba4 | Guido Trotter | <listitem><para>The instance has no disks. Only used for special |
141 | 53b78ba4 | Guido Trotter | purpouse operating systems or for testing.</para></listitem> |
142 | 53b78ba4 | Guido Trotter | </varlistentry> |
143 | 53b78ba4 | Guido Trotter | |
144 | 53b78ba4 | Guido Trotter | <varlistentry> |
145 | 53b78ba4 | Guido Trotter | <term>plain</term> |
146 | 53b78ba4 | Guido Trotter | <listitem><para>The instance will use LVM devices as backend for its |
147 | 53b78ba4 | Guido Trotter | disks. No redundancy is provided.</para></listitem> |
148 | 53b78ba4 | Guido Trotter | </varlistentry> |
149 | 53b78ba4 | Guido Trotter | |
150 | 53b78ba4 | Guido Trotter | <varlistentry> |
151 | 53b78ba4 | Guido Trotter | <term>local_raid1</term> |
152 | 53b78ba4 | Guido Trotter | <listitem><para>A local mirror is set between LVM devices to back the |
153 | 53b78ba4 | Guido Trotter | instance. This provides some redundancy for the instance's |
154 | 53b78ba4 | Guido Trotter | data.</para></listitem> |
155 | 53b78ba4 | Guido Trotter | </varlistentry> |
156 | 53b78ba4 | Guido Trotter | |
157 | 53b78ba4 | Guido Trotter | <varlistentry> |
158 | 53b78ba4 | Guido Trotter | <term>remote_raid1</term> |
159 | 53b78ba4 | Guido Trotter | <listitem><para>A mirror is set between the local node and a remote |
160 | 53b78ba4 | Guido Trotter | one, which must be specified with the --secondary-node option. Use |
161 | 53b78ba4 | Guido Trotter | this option to obtain a highly available instance that can be failed |
162 | 53b78ba4 | Guido Trotter | over to a remote node should the primary one fail. |
163 | 53b78ba4 | Guido Trotter | </para></listitem> |
164 | 53b78ba4 | Guido Trotter | </varlistentry> |
165 | 53b78ba4 | Guido Trotter | |
166 | 53b78ba4 | Guido Trotter | </variablelist> |
167 | 53b78ba4 | Guido Trotter | |
168 | 53b78ba4 | Guido Trotter | For example if you want to create an highly available instance use the |
169 | 53b78ba4 | Guido Trotter | remote_raid1 disk template: |
170 | 6bf0c9bb | Guido Trotter | <programlisting> |
171 | 6bf0c9bb | Guido Trotter | gnt-instance add -n TARGET_NODE -o OS_TYPE -t remote_raid1 \ |
172 | 6bf0c9bb | Guido Trotter | --secondary-node=SECONDARY_NODE INSTANCE_NAME |
173 | 6bf0c9bb | Guido Trotter | </programlisting> |
174 | 6bf0c9bb | Guido Trotter | To know which operating systems your cluster supports you can use: |
175 | 6bf0c9bb | Guido Trotter | <programlisting> |
176 | 6bf0c9bb | Guido Trotter | gnt-os list |
177 | 6bf0c9bb | Guido Trotter | </programlisting> |
178 | 6bf0c9bb | Guido Trotter | </para> |
179 | 6bf0c9bb | Guido Trotter | |
180 | 6bf0c9bb | Guido Trotter | <para> |
181 | 6bf0c9bb | Guido Trotter | Removing an instance is even easier than creating one. This operation is |
182 | 6bf0c9bb | Guido Trotter | non-reversible and destroys all the contents of your instance. Use with |
183 | 6bf0c9bb | Guido Trotter | care: |
184 | 6bf0c9bb | Guido Trotter | <programlisting> |
185 | 6bf0c9bb | Guido Trotter | gnt-instance remove INSTANCE_NAME |
186 | 6bf0c9bb | Guido Trotter | </programlisting> |
187 | 6bf0c9bb | Guido Trotter | </para> |
188 | 6bf0c9bb | Guido Trotter | </sect2> |
189 | 6bf0c9bb | Guido Trotter | |
190 | 6bf0c9bb | Guido Trotter | <sect2> |
191 | 6bf0c9bb | Guido Trotter | <title>Starting/Stopping an instance</title> |
192 | 6bf0c9bb | Guido Trotter | |
193 | 6bf0c9bb | Guido Trotter | <para>Instances are automatically started at instance creation time. To |
194 | 6bf0c9bb | Guido Trotter | manually start one which is currently stopped you can run: |
195 | 6bf0c9bb | Guido Trotter | <programlisting> |
196 | 6bf0c9bb | Guido Trotter | gnt-instance startup INSTANCE_NAME |
197 | 6bf0c9bb | Guido Trotter | </programlisting> |
198 | 6bf0c9bb | Guido Trotter | While the command to stop one is: |
199 | 6bf0c9bb | Guido Trotter | <programlisting> |
200 | 6bf0c9bb | Guido Trotter | gnt-instance shutdown INSTANCE_NAME |
201 | 6bf0c9bb | Guido Trotter | </programlisting> |
202 | 6bf0c9bb | Guido Trotter | The command to see all the instances configured and their status is: |
203 | 6bf0c9bb | Guido Trotter | <programlisting> |
204 | 6bf0c9bb | Guido Trotter | gnt-instance list |
205 | 6bf0c9bb | Guido Trotter | </programlisting> |
206 | 6bf0c9bb | Guido Trotter | </para> |
207 | 53b78ba4 | Guido Trotter | |
208 | 53b78ba4 | Guido Trotter | <para>Do not use the xen commands to stop instances. If you run for |
209 | 53b78ba4 | Guido Trotter | example xm shutdown or xm destroy on an instance Ganeti will |
210 | 53b78ba4 | Guido Trotter | automatically restart it (via the |
211 | 53b78ba4 | Guido Trotter | <citerefentry><refentrytitle>ganeti-watcher</refentrytitle> |
212 | 53b78ba4 | Guido Trotter | <manvolnum>8</manvolnum></citerefentry>) |
213 | 53b78ba4 | Guido Trotter | </para> |
214 | 53b78ba4 | Guido Trotter | |
215 | 6bf0c9bb | Guido Trotter | </sect2> |
216 | 6bf0c9bb | Guido Trotter | |
217 | 6bf0c9bb | Guido Trotter | <sect2> |
218 | 6bf0c9bb | Guido Trotter | <title>Exporting/Importing an instance</title> |
219 | 6bf0c9bb | Guido Trotter | |
220 | 6bf0c9bb | Guido Trotter | <para>You can create a snapshot of an instance disk and Ganeti |
221 | 6bf0c9bb | Guido Trotter | configuration, which then you can backup, or import into another cluster. |
222 | 6bf0c9bb | Guido Trotter | The way to export an instance is: |
223 | 6bf0c9bb | Guido Trotter | <programlisting> |
224 | 6bf0c9bb | Guido Trotter | gnt-backup export -n TARGET_NODE INSTANCE_NAME |
225 | 6bf0c9bb | Guido Trotter | </programlisting> |
226 | 6bf0c9bb | Guido Trotter | The target node can be any node in the cluster with enough space under |
227 | 6bf0c9bb | Guido Trotter | /srv/ganeti to hold the instance image. Use the --noshutdown option to |
228 | 6bf0c9bb | Guido Trotter | snapshot an instance without rebooting it. Any previous snapshot of the |
229 | 6bf0c9bb | Guido Trotter | same instance existing cluster-wide under /srv/ganeti will be removed by |
230 | 6bf0c9bb | Guido Trotter | this operation: if you want to keep them move them out of the Ganeti |
231 | 6bf0c9bb | Guido Trotter | exports directory. |
232 | 6bf0c9bb | Guido Trotter | </para> |
233 | 6bf0c9bb | Guido Trotter | |
234 | 6bf0c9bb | Guido Trotter | <para>Importing an instance is as easy as creating a new one. The command |
235 | 6bf0c9bb | Guido Trotter | is: |
236 | 6bf0c9bb | Guido Trotter | <programlisting> |
237 | 6bf0c9bb | Guido Trotter | gnt-backup import -n TRGT_NODE -t DISK_TMPL --src-node=NODE --src-dir=DIR INST_NAME |
238 | 6bf0c9bb | Guido Trotter | </programlisting> |
239 | 6bf0c9bb | Guido Trotter | Most of the options available for gnt-instance add are supported here |
240 | 6bf0c9bb | Guido Trotter | too. |
241 | 6bf0c9bb | Guido Trotter | </para> |
242 | 6bf0c9bb | Guido Trotter | </sect2> |
243 | 6bf0c9bb | Guido Trotter | |
244 | 6bf0c9bb | Guido Trotter | </sect1> |
245 | 6bf0c9bb | Guido Trotter | |
246 | 6bf0c9bb | Guido Trotter | |
247 | 6bf0c9bb | Guido Trotter | <sect1> |
248 | 6bf0c9bb | Guido Trotter | <title>High availability features</title> |
249 | 6bf0c9bb | Guido Trotter | |
250 | 6bf0c9bb | Guido Trotter | <sect2> |
251 | 6bf0c9bb | Guido Trotter | <title>Failing over an instance</title> |
252 | 6bf0c9bb | Guido Trotter | |
253 | 6bf0c9bb | Guido Trotter | <para>If an instance is built in highly available mode you can at any |
254 | 6bf0c9bb | Guido Trotter | time fail it over to its secondary node, even if the primary has somehow |
255 | 6bf0c9bb | Guido Trotter | failed and it's not up anymore. Doing it is really easy, on the master |
256 | 6bf0c9bb | Guido Trotter | node you can just run: |
257 | 6bf0c9bb | Guido Trotter | <programlisting> |
258 | 6bf0c9bb | Guido Trotter | gnt-instance failover INSTANCE_NAME |
259 | 6bf0c9bb | Guido Trotter | </programlisting> |
260 | 6bf0c9bb | Guido Trotter | That's it. After the command completes the secondary node is now the |
261 | 6bf0c9bb | Guido Trotter | primary, and vice versa. |
262 | 6bf0c9bb | Guido Trotter | </para> |
263 | 6bf0c9bb | Guido Trotter | </sect2> |
264 | 6bf0c9bb | Guido Trotter | <sect2> |
265 | 6bf0c9bb | Guido Trotter | <title>Replacing an instance disks</title> |
266 | 6bf0c9bb | Guido Trotter | |
267 | 6bf0c9bb | Guido Trotter | <para>So what if instead the secondary node for an instance has failed, |
268 | 6bf0c9bb | Guido Trotter | or you plan to remove a node from your cluster, and you failed over all |
269 | 6bf0c9bb | Guido Trotter | its instances, but it's still secondary for some? The solution here is to |
270 | 6bf0c9bb | Guido Trotter | replace the instance disks, changing the secondary node: |
271 | 6bf0c9bb | Guido Trotter | <programlisting> |
272 | 6bf0c9bb | Guido Trotter | gnt-instance replace-disks -n NEW_SECONDARY INSTANCE_NAME |
273 | 6bf0c9bb | Guido Trotter | </programlisting> |
274 | 6bf0c9bb | Guido Trotter | This process is a bit longer, but involves no instance downtime, and at |
275 | 6bf0c9bb | Guido Trotter | the end of it the instance has changed its secondary node, to which it |
276 | 6bf0c9bb | Guido Trotter | can if necessary be failed over. |
277 | 6bf0c9bb | Guido Trotter | </para> |
278 | 6bf0c9bb | Guido Trotter | </sect2> |
279 | 6bf0c9bb | Guido Trotter | <sect2> |
280 | 6bf0c9bb | Guido Trotter | <title>Failing over the master node</title> |
281 | 6bf0c9bb | Guido Trotter | |
282 | 6bf0c9bb | Guido Trotter | <para>This is all good as long as the Ganeti Master Node is up. Should it |
283 | 6bf0c9bb | Guido Trotter | go down, or should you wish to decommission it, just run on any other node |
284 | 6bf0c9bb | Guido Trotter | the command: |
285 | 6bf0c9bb | Guido Trotter | <programlisting> |
286 | 6bf0c9bb | Guido Trotter | gnt-cluster masterfailover |
287 | 6bf0c9bb | Guido Trotter | </programlisting> |
288 | 6bf0c9bb | Guido Trotter | and the node you ran it on is now the new master. |
289 | 6bf0c9bb | Guido Trotter | </para> |
290 | 6bf0c9bb | Guido Trotter | </sect2> |
291 | 6bf0c9bb | Guido Trotter | <sect2> |
292 | 6bf0c9bb | Guido Trotter | <title>Adding/Removing nodes</title> |
293 | 6bf0c9bb | Guido Trotter | |
294 | 6bf0c9bb | Guido Trotter | <para>And of course, now that you know how to move instances around, it's |
295 | 6bf0c9bb | Guido Trotter | easy to free up a node, and then you can remove it from the cluster: |
296 | 6bf0c9bb | Guido Trotter | <programlisting> |
297 | 6bf0c9bb | Guido Trotter | gnt-node remove NODE_NAME |
298 | 6bf0c9bb | Guido Trotter | </programlisting> |
299 | 6bf0c9bb | Guido Trotter | and maybe add a new one: |
300 | 6bf0c9bb | Guido Trotter | <programlisting> |
301 | 6bf0c9bb | Guido Trotter | gnt-node add [--secondary-ip=ADDRESS] NODE_NAME |
302 | 6bf0c9bb | Guido Trotter | </programlisting> |
303 | 6bf0c9bb | Guido Trotter | </para> |
304 | 6bf0c9bb | Guido Trotter | </sect2> |
305 | 6bf0c9bb | Guido Trotter | </sect1> |
306 | 6bf0c9bb | Guido Trotter | |
307 | 6bf0c9bb | Guido Trotter | <sect1> |
308 | 6bf0c9bb | Guido Trotter | <title>Debugging Features</title> |
309 | 6bf0c9bb | Guido Trotter | |
310 | 6bf0c9bb | Guido Trotter | <para>At some point you might need to do some debugging operations on your |
311 | 6bf0c9bb | Guido Trotter | cluster or on your instances. This section will help you with the most used |
312 | 6bf0c9bb | Guido Trotter | debugging functionalities. |
313 | 6bf0c9bb | Guido Trotter | </para> |
314 | 6bf0c9bb | Guido Trotter | |
315 | 6bf0c9bb | Guido Trotter | <sect2> |
316 | 6bf0c9bb | Guido Trotter | <title>Accessing an instance's disks</title> |
317 | 6bf0c9bb | Guido Trotter | |
318 | 6bf0c9bb | Guido Trotter | <para>From an instance's primary node you have access to its disks. Never |
319 | 6bf0c9bb | Guido Trotter | ever mount the underlying logical volume manually on a fault tolerant |
320 | 6bf0c9bb | Guido Trotter | instance, though or you risk breaking replication. The correct way to |
321 | 6bf0c9bb | Guido Trotter | access them is to run the command: |
322 | 6bf0c9bb | Guido Trotter | <programlisting> |
323 | 6bf0c9bb | Guido Trotter | gnt-instance activate-disks INSTANCE_NAME |
324 | 6bf0c9bb | Guido Trotter | </programlisting> |
325 | 6bf0c9bb | Guido Trotter | And then access the device that gets created. Of course after you've |
326 | 6bf0c9bb | Guido Trotter | finished you can deactivate them with the deactivate-disks command, which |
327 | 6bf0c9bb | Guido Trotter | works in the same way. |
328 | 6bf0c9bb | Guido Trotter | </para> |
329 | 6bf0c9bb | Guido Trotter | </sect2> |
330 | 6bf0c9bb | Guido Trotter | |
331 | 6bf0c9bb | Guido Trotter | <sect2> |
332 | 6bf0c9bb | Guido Trotter | <title>Accessing an instance's console</title> |
333 | 6bf0c9bb | Guido Trotter | |
334 | 6bf0c9bb | Guido Trotter | <para>The command to access a running instance's console is: |
335 | 6bf0c9bb | Guido Trotter | <programlisting> |
336 | 6bf0c9bb | Guido Trotter | gnt-instance console INSTANCE_NAME |
337 | 6bf0c9bb | Guido Trotter | </programlisting> |
338 | 6bf0c9bb | Guido Trotter | Use the console normally and then type ^] when done, to exit. |
339 | 6bf0c9bb | Guido Trotter | </para> |
340 | 6bf0c9bb | Guido Trotter | </sect2> |
341 | 6bf0c9bb | Guido Trotter | |
342 | 6bf0c9bb | Guido Trotter | <sect2> |
343 | 6bf0c9bb | Guido Trotter | <title>Instance Operating System Debugging</title> |
344 | 6bf0c9bb | Guido Trotter | |
345 | 6bf0c9bb | Guido Trotter | <para>Should you have any problems with operating systems support the |
346 | 6bf0c9bb | Guido Trotter | command to ran to see a complete status for all your nodes is: |
347 | 6bf0c9bb | Guido Trotter | <programlisting> |
348 | 6bf0c9bb | Guido Trotter | gnt-os diagnose |
349 | 6bf0c9bb | Guido Trotter | </programlisting> |
350 | 6bf0c9bb | Guido Trotter | </para> |
351 | 6bf0c9bb | Guido Trotter | |
352 | 6bf0c9bb | Guido Trotter | </sect2> |
353 | 6bf0c9bb | Guido Trotter | |
354 | 6bf0c9bb | Guido Trotter | <sect2> |
355 | 6bf0c9bb | Guido Trotter | <title>Cluster-wide debugging</title> |
356 | 6bf0c9bb | Guido Trotter | |
357 | 6bf0c9bb | Guido Trotter | <para>The gnt-cluster command offers several options to run tests or |
358 | 6bf0c9bb | Guido Trotter | execute cluster-wide operations. For example: |
359 | 6bf0c9bb | Guido Trotter | <programlisting> |
360 | 6bf0c9bb | Guido Trotter | gnt-cluster command |
361 | 6bf0c9bb | Guido Trotter | gnt-cluster copyfile |
362 | 6bf0c9bb | Guido Trotter | gnt-cluster verify |
363 | 6bf0c9bb | Guido Trotter | gnt-cluster getmaster |
364 | 6bf0c9bb | Guido Trotter | gnt-cluster version |
365 | 6bf0c9bb | Guido Trotter | </programlisting> |
366 | 6bf0c9bb | Guido Trotter | See the respective help to know more about their usage. |
367 | 6bf0c9bb | Guido Trotter | </para> |
368 | 6bf0c9bb | Guido Trotter | </sect2> |
369 | 6bf0c9bb | Guido Trotter | |
370 | 6bf0c9bb | Guido Trotter | </sect1> |
371 | 6bf0c9bb | Guido Trotter | |
372 | 6bf0c9bb | Guido Trotter | </article> |