Statistics
| Branch: | Tag: | Revision:

root / man / gnt-instance.sgml @ d0834de3

History | View | Annotate | Download (20.6 kB)

1 a8083063 Iustin Pop
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2 a8083063 Iustin Pop
3 a8083063 Iustin Pop
  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4 a8083063 Iustin Pop
  <!-- Please adjust the date whenever revising the manpage. -->
5 a8083063 Iustin Pop
  <!ENTITY dhdate      "<date>May 16, 2007</date>">
6 a8083063 Iustin Pop
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7 a8083063 Iustin Pop
       allowed: see man(7), man(1). -->
8 a8083063 Iustin Pop
  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
9 a8083063 Iustin Pop
  <!ENTITY dhucpackage "<refentrytitle>gnt-instance</refentrytitle>">
10 a8083063 Iustin Pop
  <!ENTITY dhpackage   "gnt-instance">
11 a8083063 Iustin Pop
12 a8083063 Iustin Pop
  <!ENTITY debian      "<productname>Debian</productname>">
13 a8083063 Iustin Pop
  <!ENTITY gnu         "<acronym>GNU</acronym>">
14 a8083063 Iustin Pop
  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
15 a8083063 Iustin Pop
  <!ENTITY footer SYSTEM "footer.sgml">
16 a8083063 Iustin Pop
]>
17 a8083063 Iustin Pop
18 a8083063 Iustin Pop
<refentry>
19 a8083063 Iustin Pop
  <refentryinfo>
20 a8083063 Iustin Pop
    <copyright>
21 a8083063 Iustin Pop
      <year>2006</year>
22 a8083063 Iustin Pop
      <year>2007</year>
23 a8083063 Iustin Pop
      <holder>Google Inc.</holder>
24 a8083063 Iustin Pop
    </copyright>
25 a8083063 Iustin Pop
    &dhdate;
26 a8083063 Iustin Pop
  </refentryinfo>
27 a8083063 Iustin Pop
  <refmeta>
28 a8083063 Iustin Pop
    &dhucpackage;
29 a8083063 Iustin Pop
30 a8083063 Iustin Pop
    &dhsection;
31 a8083063 Iustin Pop
    <refmiscinfo>ganeti 1.2</refmiscinfo>
32 a8083063 Iustin Pop
  </refmeta>
33 a8083063 Iustin Pop
  <refnamediv>
34 a8083063 Iustin Pop
    <refname>&dhpackage;</refname>
35 a8083063 Iustin Pop
36 a8083063 Iustin Pop
    <refpurpose>ganeti instance administration</refpurpose>
37 a8083063 Iustin Pop
  </refnamediv>
38 a8083063 Iustin Pop
  <refsynopsisdiv>
39 a8083063 Iustin Pop
    <cmdsynopsis>
40 a8083063 Iustin Pop
      <command>&dhpackage; </command>
41 a8083063 Iustin Pop
42 a8083063 Iustin Pop
      <arg choice="req">command</arg>
43 a8083063 Iustin Pop
      <arg>arguments...</arg>
44 a8083063 Iustin Pop
    </cmdsynopsis>
45 a8083063 Iustin Pop
  </refsynopsisdiv>
46 a8083063 Iustin Pop
  <refsect1>
47 a8083063 Iustin Pop
    <title>DESCRIPTION</title>
48 a8083063 Iustin Pop
49 a8083063 Iustin Pop
    <para>
50 a8083063 Iustin Pop
      The <command>&dhpackage;</command> is used for instance
51 a8083063 Iustin Pop
      administration in the ganeti system.
52 a8083063 Iustin Pop
    </para>
53 a8083063 Iustin Pop
54 a8083063 Iustin Pop
  </refsect1>
55 a8083063 Iustin Pop
  <refsect1>
56 a8083063 Iustin Pop
    <title>COMMANDS</title>
57 a8083063 Iustin Pop
58 a8083063 Iustin Pop
    <refsect2>
59 a8083063 Iustin Pop
      <title>Creation/removal/querying</title>
60 a8083063 Iustin Pop
61 a8083063 Iustin Pop
      <refsect3>
62 a8083063 Iustin Pop
        <title>ADD</title>
63 a8083063 Iustin Pop
        <cmdsynopsis>
64 a8083063 Iustin Pop
          <command>add</command>
65 a8083063 Iustin Pop
          <arg choice="req">-n <replaceable>node</replaceable></arg>
66 a8083063 Iustin Pop
          <arg>-s <replaceable>disksize</replaceable></arg>
67 a8083063 Iustin Pop
          <arg>-o <replaceable>os-type</replaceable></arg>
68 a8083063 Iustin Pop
          <arg>-m <replaceable>memsize</replaceable></arg>
69 a8083063 Iustin Pop
          <arg>-b <replaceable>bridge</replaceable></arg>
70 a8083063 Iustin Pop
          <sbr>
71 a8083063 Iustin Pop
          <arg choice="req">-t<group>
72 a8083063 Iustin Pop
              <arg>diskless</arg>
73 a8083063 Iustin Pop
              <arg>plain</arg>
74 a8083063 Iustin Pop
              <arg>local_raid1</arg>
75 a8083063 Iustin Pop
              <arg>remote_raid1</arg>
76 a8083063 Iustin Pop
            </group>
77 a8083063 Iustin Pop
          </arg>
78 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
79 a8083063 Iustin Pop
        </cmdsynopsis>
80 a8083063 Iustin Pop
        <para>
81 a8083063 Iustin Pop
          Creates a new instance on the specified
82 a8083063 Iustin Pop
          host. <replaceable>instance</replaceable> must be in DNS and
83 a8083063 Iustin Pop
          resolve to a IP in the same network as the nodes in the
84 a8083063 Iustin Pop
          cluster.
85 a8083063 Iustin Pop
        </para>
86 a8083063 Iustin Pop
87 a8083063 Iustin Pop
        <para>
88 a8083063 Iustin Pop
          The <option>-s</option> option specifies the disk size for
89 a8083063 Iustin Pop
          the instance, in gigibytes (defaults to 20 GiB).
90 a8083063 Iustin Pop
        </para>
91 a8083063 Iustin Pop
92 a8083063 Iustin Pop
        <para>
93 a8083063 Iustin Pop
          The <option>-o</option> options specifies the operating
94 a8083063 Iustin Pop
          system to be installed. The available operating systems can
95 a8083063 Iustin Pop
          be listed with <command>gnt-os list</command>.
96 a8083063 Iustin Pop
        </para>
97 a8083063 Iustin Pop
98 a8083063 Iustin Pop
        <para>
99 a8083063 Iustin Pop
          The <option>-m</option> option specifies the memory size for
100 a8083063 Iustin Pop
          the instance, in megibytes (defaults to 128 MiB).
101 a8083063 Iustin Pop
        </para>
102 a8083063 Iustin Pop
103 a8083063 Iustin Pop
        <para>
104 a8083063 Iustin Pop
          The <option>-b</option> option specifies the bridge to which the
105 a8083063 Iustin Pop
          instance will be connected. (defaults to the cluster-wide default
106 7e84d392 Michael Hanselmann
          bridge specified at cluster initialization time).
107 a8083063 Iustin Pop
        </para>
108 a8083063 Iustin Pop
109 a8083063 Iustin Pop
        <para>
110 a8083063 Iustin Pop
          The <option>-t</option> options specifies the disk layout type for
111 a8083063 Iustin Pop
          the instance. The available choices are:
112 a8083063 Iustin Pop
          <variablelist>
113 a8083063 Iustin Pop
            <varlistentry>
114 a8083063 Iustin Pop
              <term>diskless</term>
115 a8083063 Iustin Pop
              <listitem>
116 a8083063 Iustin Pop
                <para>
117 a8083063 Iustin Pop
                  This creates an instance with no disks. Its useful for
118 a8083063 Iustin Pop
                  testing only (or other special cases).
119 a8083063 Iustin Pop
                </para>
120 a8083063 Iustin Pop
              </listitem>
121 a8083063 Iustin Pop
            </varlistentry>
122 a8083063 Iustin Pop
            <varlistentry>
123 a8083063 Iustin Pop
              <term>plain</term>
124 a8083063 Iustin Pop
              <listitem>
125 a8083063 Iustin Pop
                <para>Disk devices will be logical volumes.</para>
126 a8083063 Iustin Pop
              </listitem>
127 a8083063 Iustin Pop
            </varlistentry>
128 a8083063 Iustin Pop
            <varlistentry>
129 a8083063 Iustin Pop
              <term>local_raid1</term>
130 a8083063 Iustin Pop
              <listitem>
131 a8083063 Iustin Pop
                <para>
132 a8083063 Iustin Pop
                  Disk devices will be md raid1 arrays over two local
133 a8083063 Iustin Pop
                  logical volumes.
134 a8083063 Iustin Pop
                </para>
135 a8083063 Iustin Pop
              </listitem>
136 a8083063 Iustin Pop
            </varlistentry>
137 a8083063 Iustin Pop
            <varlistentry>
138 a8083063 Iustin Pop
              <term>remote_raid1</term>
139 a8083063 Iustin Pop
              <listitem>
140 a8083063 Iustin Pop
                <para>
141 a8083063 Iustin Pop
                  Disk devices will be md raid1 arrays with one
142 a8083063 Iustin Pop
                  component (so it's not actually raid1): a drbd device
143 a8083063 Iustin Pop
                  between the instance's primary node and the node given
144 a8083063 Iustin Pop
                  by the option <option>--secondary-node</option>.
145 a8083063 Iustin Pop
                </para>
146 a8083063 Iustin Pop
              </listitem>
147 a8083063 Iustin Pop
            </varlistentry>
148 a8083063 Iustin Pop
          </variablelist>
149 a8083063 Iustin Pop
        </para>
150 a8083063 Iustin Pop
151 a8083063 Iustin Pop
        <para>
152 a8083063 Iustin Pop
          The <option>--secondary-node</option> option is used with
153 a8083063 Iustin Pop
          the remote raid disk template type and specifies the remote
154 a8083063 Iustin Pop
          node.
155 a8083063 Iustin Pop
        </para>
156 a8083063 Iustin Pop
157 a8083063 Iustin Pop
        <para>
158 a8083063 Iustin Pop
          If you do not want gnt-instance to wait for the disk mirror
159 a8083063 Iustin Pop
          to be synced, use the <option>--no-wait-for-sync</option>
160 a8083063 Iustin Pop
          option.
161 a8083063 Iustin Pop
        </para>
162 a8083063 Iustin Pop
163 a8083063 Iustin Pop
164 a8083063 Iustin Pop
        <para>
165 a8083063 Iustin Pop
          Example:
166 a8083063 Iustin Pop
          <screen>
167 a8083063 Iustin Pop
# gnt-instance add -t plain -s 30 -m 512 -n node1.example.com \
168 a8083063 Iustin Pop
> instance1.example.com
169 a8083063 Iustin Pop
# gnt-instance add -t remote_raid1 --secondary-node node3.example.com \
170 a8083063 Iustin Pop
> -s 30 -m 512 -n node1.example.com instance2.example.com
171 a8083063 Iustin Pop
          </screen>
172 a8083063 Iustin Pop
        </para>
173 a8083063 Iustin Pop
174 a8083063 Iustin Pop
      </refsect3>
175 a8083063 Iustin Pop
176 a8083063 Iustin Pop
      <refsect3>
177 a8083063 Iustin Pop
        <title>REMOVE</title>
178 a8083063 Iustin Pop
179 a8083063 Iustin Pop
        <cmdsynopsis>
180 a8083063 Iustin Pop
          <command>remove</command>
181 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
182 a8083063 Iustin Pop
        </cmdsynopsis>
183 a8083063 Iustin Pop
184 a8083063 Iustin Pop
        <para>
185 a8083063 Iustin Pop
          Remove an instance. This will remove all data from the
186 a8083063 Iustin Pop
          instance and there is <emphasis>no way back</emphasis>. If
187 a8083063 Iustin Pop
          you are not sure if you use an instance again, use
188 a8083063 Iustin Pop
          <command>shutdown</command> first and leave it in the
189 a8083063 Iustin Pop
          shutdown state for a while.
190 a8083063 Iustin Pop
        </para>
191 a8083063 Iustin Pop
192 a8083063 Iustin Pop
        <para>
193 a8083063 Iustin Pop
          Example:
194 a8083063 Iustin Pop
          <screen>
195 a8083063 Iustin Pop
# gnt-instance remove instance1.example.com
196 a8083063 Iustin Pop
          </screen>
197 a8083063 Iustin Pop
        </para>
198 a8083063 Iustin Pop
      </refsect3>
199 a8083063 Iustin Pop
200 a8083063 Iustin Pop
      <refsect3>
201 a8083063 Iustin Pop
        <title>LIST</title>
202 a8083063 Iustin Pop
203 a8083063 Iustin Pop
        <cmdsynopsis>
204 a8083063 Iustin Pop
          <command>list</command>
205 a8083063 Iustin Pop
          <arg>--no-headers</arg>
206 a8083063 Iustin Pop
          <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
207 a8083063 Iustin Pop
          <arg>-o <replaceable>FIELD,...</replaceable></arg>
208 a8083063 Iustin Pop
        </cmdsynopsis>
209 a8083063 Iustin Pop
210 a8083063 Iustin Pop
        <para>
211 a8083063 Iustin Pop
          Shows the currently configured instances with memory usage,
212 a8083063 Iustin Pop
          disk usage, the node they are running on, and the CPU time,
213 a8083063 Iustin Pop
          counted in seconds, used by each instance since its latest
214 a8083063 Iustin Pop
          restart.
215 a8083063 Iustin Pop
        </para>
216 a8083063 Iustin Pop
217 a8083063 Iustin Pop
        <para>
218 a8083063 Iustin Pop
          The <option>--no-headers</option> option will skip the
219 a8083063 Iustin Pop
          initial header line. The <option>--separator</option> option
220 a8083063 Iustin Pop
          takes an argument which denotes what will be used between
221 a8083063 Iustin Pop
          the output fields. Both these options are to help scripting.
222 a8083063 Iustin Pop
        </para>
223 a8083063 Iustin Pop
224 a8083063 Iustin Pop
        <para>
225 a8083063 Iustin Pop
          The <option>-o</option> option takes a comma-separated list
226 a8083063 Iustin Pop
          of output fields. The available fields and their meaning
227 a8083063 Iustin Pop
          are:
228 a8083063 Iustin Pop
          <variablelist>
229 a8083063 Iustin Pop
            <varlistentry>
230 a8083063 Iustin Pop
              <term>name</term>
231 a8083063 Iustin Pop
              <listitem>
232 a8083063 Iustin Pop
                <simpara>the instance name</simpara>
233 a8083063 Iustin Pop
              </listitem>
234 a8083063 Iustin Pop
            </varlistentry>
235 a8083063 Iustin Pop
            <varlistentry>
236 a8083063 Iustin Pop
              <term>os</term>
237 a8083063 Iustin Pop
              <listitem>
238 a8083063 Iustin Pop
                <simpara>the OS of the instance</simpara>
239 a8083063 Iustin Pop
              </listitem>
240 a8083063 Iustin Pop
            </varlistentry>
241 a8083063 Iustin Pop
            <varlistentry>
242 a8083063 Iustin Pop
              <term>pnode</term>
243 a8083063 Iustin Pop
              <listitem>
244 a8083063 Iustin Pop
                <simpara>the primary node of the instance</simpara>
245 a8083063 Iustin Pop
              </listitem>
246 a8083063 Iustin Pop
            </varlistentry>
247 a8083063 Iustin Pop
            <varlistentry>
248 a8083063 Iustin Pop
              <term>snodes</term>
249 a8083063 Iustin Pop
              <listitem>
250 a8083063 Iustin Pop
                <simpara>comma-separated list of secondary-nodes for the
251 a8083063 Iustin Pop
                  instance; usually this will be just one node</simpara>
252 a8083063 Iustin Pop
              </listitem>
253 a8083063 Iustin Pop
            </varlistentry>
254 a8083063 Iustin Pop
            <varlistentry>
255 a8083063 Iustin Pop
              <term>admin_state</term>
256 a8083063 Iustin Pop
              <listitem>
257 a8083063 Iustin Pop
                <simpara>the desired state of the instance (either "yes"
258 a8083063 Iustin Pop
                  or "no" denoting the instance should run or
259 a8083063 Iustin Pop
                  not)</simpara>
260 a8083063 Iustin Pop
              </listitem>
261 a8083063 Iustin Pop
            </varlistentry>
262 a8083063 Iustin Pop
            <varlistentry>
263 a8083063 Iustin Pop
              <term>admin_ram</term>
264 a8083063 Iustin Pop
              <listitem>
265 a8083063 Iustin Pop
                <simpara>the desired memory for the instance</simpara>
266 a8083063 Iustin Pop
              </listitem>
267 a8083063 Iustin Pop
            </varlistentry>
268 a8083063 Iustin Pop
            <varlistentry>
269 a8083063 Iustin Pop
              <term>disk_template</term>
270 a8083063 Iustin Pop
              <listitem>
271 a8083063 Iustin Pop
                <simpara>the disk template of the instance</simpara>
272 a8083063 Iustin Pop
              </listitem>
273 a8083063 Iustin Pop
            </varlistentry>
274 a8083063 Iustin Pop
            <varlistentry>
275 a8083063 Iustin Pop
              <term>oper_state</term>
276 a8083063 Iustin Pop
              <listitem>
277 a8083063 Iustin Pop
                <simpara>the actual state of the instance; can take of
278 a8083063 Iustin Pop
                  the values "running", "stopped", "(node down)"</simpara>
279 a8083063 Iustin Pop
              </listitem>
280 a8083063 Iustin Pop
            </varlistentry>
281 a8083063 Iustin Pop
            <varlistentry>
282 a8083063 Iustin Pop
              <term>oper_ram</term>
283 a8083063 Iustin Pop
              <listitem>
284 a8083063 Iustin Pop
                <simpara>the actual memory usage of the instance as seen
285 a8083063 Iustin Pop
                  by the hypervisor</simpara>
286 a8083063 Iustin Pop
              </listitem>
287 a8083063 Iustin Pop
            </varlistentry>
288 a8083063 Iustin Pop
            <varlistentry>
289 a8083063 Iustin Pop
              <term>ip</term>
290 a8083063 Iustin Pop
              <listitem>
291 a8083063 Iustin Pop
                <simpara>the ip address ganeti recognizes as associated with
292 a8083063 Iustin Pop
                the instance interface</simpara>
293 a8083063 Iustin Pop
              </listitem>
294 a8083063 Iustin Pop
            </varlistentry>
295 a8083063 Iustin Pop
            <varlistentry>
296 a8083063 Iustin Pop
              <term>mac</term>
297 a8083063 Iustin Pop
              <listitem>
298 a8083063 Iustin Pop
                <simpara>the instance interface MAC address</simpara>
299 a8083063 Iustin Pop
              </listitem>
300 a8083063 Iustin Pop
            </varlistentry>
301 a8083063 Iustin Pop
            <varlistentry>
302 a8083063 Iustin Pop
              <term>bridge</term>
303 a8083063 Iustin Pop
              <listitem>
304 a8083063 Iustin Pop
                <simpara>bridge the instance is connected to
305 a8083063 Iustin Pop
                </simpara>
306 a8083063 Iustin Pop
              </listitem>
307 a8083063 Iustin Pop
            </varlistentry>
308 a8083063 Iustin Pop
          </variablelist>
309 a8083063 Iustin Pop
        </para>
310 a8083063 Iustin Pop
311 a8083063 Iustin Pop
        <para>
312 a8083063 Iustin Pop
          There is a subtle grouping about the available output
313 a8083063 Iustin Pop
          fields: all fields except for <option>oper_state</option>
314 a8083063 Iustin Pop
          and <option>oper_ram</option> are configuration value and
315 a8083063 Iustin Pop
          not run-time values. So if you don't select any of the
316 a8083063 Iustin Pop
          <option>oper_*</option> fields, the query will be satisfied
317 a8083063 Iustin Pop
          instantly from the cluster configuration, without having to
318 a8083063 Iustin Pop
          ask the remote nodes for the data. This can be helpful for
319 a8083063 Iustin Pop
          big clusters when you only want some data and it makes sense
320 a8083063 Iustin Pop
          to specify a reduced set of output fields.
321 a8083063 Iustin Pop
        </para>
322 a8083063 Iustin Pop
323 a8083063 Iustin Pop
        <para>The default output field list is:
324 a8083063 Iustin Pop
          <simplelist type="inline">
325 a8083063 Iustin Pop
            <member>name</member>
326 a8083063 Iustin Pop
            <member>os</member>
327 a8083063 Iustin Pop
            <member>pnode</member>
328 a8083063 Iustin Pop
            <member>admin_state</member>
329 a8083063 Iustin Pop
            <member>oper_state</member>
330 a8083063 Iustin Pop
            <member>oper_ram</member>
331 a8083063 Iustin Pop
          </simplelist>.
332 a8083063 Iustin Pop
        </para>
333 a8083063 Iustin Pop
      </refsect3>
334 a8083063 Iustin Pop
335 a8083063 Iustin Pop
      <refsect3>
336 a8083063 Iustin Pop
        <title>INFO</title>
337 a8083063 Iustin Pop
338 a8083063 Iustin Pop
        <cmdsynopsis>
339 a8083063 Iustin Pop
          <command>info</command>
340 a8083063 Iustin Pop
          <arg rep="repeat"><replaceable>instance</replaceable></arg>
341 a8083063 Iustin Pop
        </cmdsynopsis>
342 a8083063 Iustin Pop
343 a8083063 Iustin Pop
        <para>
344 a8083063 Iustin Pop
          Show detailed information about the (given) instances. This
345 a8083063 Iustin Pop
          is different from <command>list</command> as it shows
346 a8083063 Iustin Pop
          detailed data about the instance's disks (especially useful
347 a8083063 Iustin Pop
          for remote raid templates).
348 a8083063 Iustin Pop
        </para>
349 a8083063 Iustin Pop
      </refsect3>
350 a8083063 Iustin Pop
351 a8083063 Iustin Pop
      <refsect3>
352 a8083063 Iustin Pop
        <title>MODIFY</title>
353 a8083063 Iustin Pop
354 a8083063 Iustin Pop
        <cmdsynopsis>
355 a8083063 Iustin Pop
          <command>modify</command>
356 a8083063 Iustin Pop
          <arg choice="opt">-m <replaceable>memsize</replaceable></arg>
357 a8083063 Iustin Pop
          <arg choice="opt">-p <replaceable>vcpus</replaceable></arg>
358 a8083063 Iustin Pop
          <arg choice="opt">-i <replaceable>ip</replaceable></arg>
359 a8083063 Iustin Pop
          <arg choice="opt">-b <replaceable>bridge</replaceable></arg>
360 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
361 a8083063 Iustin Pop
        </cmdsynopsis>
362 a8083063 Iustin Pop
363 a8083063 Iustin Pop
        <para>
364 a8083063 Iustin Pop
          Modify the memory size, number of vcpus, ip address and/or bridge
365 a8083063 Iustin Pop
          for an instance.
366 a8083063 Iustin Pop
        </para>
367 a8083063 Iustin Pop
368 a8083063 Iustin Pop
        <para>
369 a8083063 Iustin Pop
          The memory size is given in MiB. Note that you need to give
370 a8083063 Iustin Pop
          at least one of the arguments, otherwise the command
371 a8083063 Iustin Pop
          complains.
372 a8083063 Iustin Pop
        </para>
373 a8083063 Iustin Pop
374 a8083063 Iustin Pop
        <para>
375 a8083063 Iustin Pop
          All the changes take effect at the next restart. If the
376 a8083063 Iustin Pop
          instance is running, there is no effect on the instance.
377 a8083063 Iustin Pop
        </para>
378 a8083063 Iustin Pop
      </refsect3>
379 a8083063 Iustin Pop
380 d0834de3 Michael Hanselmann
      <refsect3>
381 d0834de3 Michael Hanselmann
        <title>REINSTALL</title>
382 d0834de3 Michael Hanselmann
383 d0834de3 Michael Hanselmann
        <cmdsynopsis>
384 d0834de3 Michael Hanselmann
          <command>reinstall</command>
385 d0834de3 Michael Hanselmann
          <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
386 d0834de3 Michael Hanselmann
          <arg choice="opt">-f <replaceable>force</replaceable></arg>
387 d0834de3 Michael Hanselmann
          <arg choice="req"><replaceable>instance</replaceable></arg>
388 d0834de3 Michael Hanselmann
        </cmdsynopsis>
389 d0834de3 Michael Hanselmann
390 d0834de3 Michael Hanselmann
        <para>
391 d0834de3 Michael Hanselmann
          Reinstalls the operating system on the given instance. The instance
392 d0834de3 Michael Hanselmann
          must be stopped when running this command. If the
393 d0834de3 Michael Hanselmann
          <option>--os-type</option> is specified, the operating system is
394 d0834de3 Michael Hanselmann
          changed.
395 d0834de3 Michael Hanselmann
        </para>
396 d0834de3 Michael Hanselmann
      </refsect3>
397 d0834de3 Michael Hanselmann
398 a8083063 Iustin Pop
    </refsect2>
399 a8083063 Iustin Pop
400 a8083063 Iustin Pop
    <refsect2>
401 a8083063 Iustin Pop
      <title>Starting/stopping/connecting to console</title>
402 a8083063 Iustin Pop
403 a8083063 Iustin Pop
      <refsect3>
404 a8083063 Iustin Pop
        <title>STARTUP</title>
405 a8083063 Iustin Pop
406 a8083063 Iustin Pop
        <cmdsynopsis>
407 a8083063 Iustin Pop
          <command>startup</command>
408 a8083063 Iustin Pop
          <arg>--extra=<replaceable>PARAMS</replaceable></arg>
409 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
410 a8083063 Iustin Pop
        </cmdsynopsis>
411 a8083063 Iustin Pop
412 a8083063 Iustin Pop
        <para>
413 a8083063 Iustin Pop
          Starts an instance. The node where to start the instance is
414 a8083063 Iustin Pop
          taken from the configuration.
415 a8083063 Iustin Pop
        </para>
416 a8083063 Iustin Pop
417 a8083063 Iustin Pop
        <para>
418 a8083063 Iustin Pop
          The <option>--extra</option> option is used to pass
419 a8083063 Iustin Pop
          additional argument to the instance's kernel for this start
420 a8083063 Iustin Pop
          only. Currently there is no way to specify a persistent set
421 a8083063 Iustin Pop
          of arguments (beside the one hardcoded). Note that this may
422 a8083063 Iustin Pop
          not apply to all virtualization types.
423 a8083063 Iustin Pop
        </para>
424 a8083063 Iustin Pop
425 a8083063 Iustin Pop
426 a8083063 Iustin Pop
        <para>
427 a8083063 Iustin Pop
          Example:
428 a8083063 Iustin Pop
          <screen>
429 a8083063 Iustin Pop
# gnt-instance start instance1.example.com
430 a8083063 Iustin Pop
# gnt-instance start --extra single test1.example.com
431 a8083063 Iustin Pop
          </screen>
432 a8083063 Iustin Pop
        </para>
433 a8083063 Iustin Pop
      </refsect3>
434 a8083063 Iustin Pop
435 a8083063 Iustin Pop
      <refsect3>
436 a8083063 Iustin Pop
        <title>SHUTDOWN</title>
437 a8083063 Iustin Pop
438 a8083063 Iustin Pop
        <cmdsynopsis>
439 a8083063 Iustin Pop
          <command>shutdown</command>
440 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
441 a8083063 Iustin Pop
        </cmdsynopsis>
442 a8083063 Iustin Pop
443 a8083063 Iustin Pop
        <para>
444 a8083063 Iustin Pop
          Stops the instance. If the instance cannot be cleanly
445 a8083063 Iustin Pop
          stopped during a hardcoded interval (currently 2 minutes),
446 a8083063 Iustin Pop
          it will forcibly stop the instance (equivalent to switching
447 a8083063 Iustin Pop
          off the power on a physical machine).
448 a8083063 Iustin Pop
        </para>
449 a8083063 Iustin Pop
450 a8083063 Iustin Pop
        <para>
451 a8083063 Iustin Pop
          Example:
452 a8083063 Iustin Pop
          <screen>
453 a8083063 Iustin Pop
# gnt-instance shutdown instance1.example.com
454 a8083063 Iustin Pop
          </screen>
455 a8083063 Iustin Pop
        </para>
456 a8083063 Iustin Pop
      </refsect3>
457 a8083063 Iustin Pop
458 a8083063 Iustin Pop
      <refsect3>
459 a8083063 Iustin Pop
        <title>CONSOLE</title>
460 a8083063 Iustin Pop
        <cmdsynopsis>
461 a8083063 Iustin Pop
          <command>console</command>
462 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
463 a8083063 Iustin Pop
        </cmdsynopsis>
464 a8083063 Iustin Pop
465 a8083063 Iustin Pop
        <para>
466 a8083063 Iustin Pop
          Connects to the console of the given instance. If the instance
467 a8083063 Iustin Pop
          is not up, an error is returned.
468 a8083063 Iustin Pop
        </para>
469 a8083063 Iustin Pop
470 a8083063 Iustin Pop
        <para>
471 a8083063 Iustin Pop
          Example:
472 a8083063 Iustin Pop
          <screen>
473 a8083063 Iustin Pop
# gnt-instance console instance1.example.com
474 a8083063 Iustin Pop
          </screen>
475 a8083063 Iustin Pop
        </para>
476 a8083063 Iustin Pop
      </refsect3>
477 a8083063 Iustin Pop
478 a8083063 Iustin Pop
    </refsect2>
479 a8083063 Iustin Pop
480 a8083063 Iustin Pop
    <refsect2>
481 a8083063 Iustin Pop
      <title>Disk management</title>
482 a8083063 Iustin Pop
483 a8083063 Iustin Pop
      <refsect3>
484 a8083063 Iustin Pop
        <title>REPLACE-DISKS</title>
485 a8083063 Iustin Pop
486 a8083063 Iustin Pop
        <cmdsynopsis>
487 a8083063 Iustin Pop
          <command>replace-disks</command>
488 a8083063 Iustin Pop
          <arg choice="req">--new-secondary <replaceable>NODE</replaceable></arg>
489 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
490 a8083063 Iustin Pop
        </cmdsynopsis>
491 a8083063 Iustin Pop
492 a8083063 Iustin Pop
        <para>
493 a8083063 Iustin Pop
          This command does a full add and replace for both disks of
494 a8083063 Iustin Pop
          an instance.  It basically does an
495 a8083063 Iustin Pop
          <command>addmirror</command> and
496 a8083063 Iustin Pop
          <command>removemirror</command> for both disks of the
497 a8083063 Iustin Pop
          instance.
498 a8083063 Iustin Pop
        </para>
499 a8083063 Iustin Pop
500 a8083063 Iustin Pop
        <para>
501 a8083063 Iustin Pop
          If you also want to replace the secondary node during this
502 a8083063 Iustin Pop
          process (for example to fix a broken secondary node), you
503 a8083063 Iustin Pop
          can do so using the <option>--new-secondary</option> option.
504 a8083063 Iustin Pop
        </para>
505 a8083063 Iustin Pop
      </refsect3>
506 a8083063 Iustin Pop
507 a8083063 Iustin Pop
      <refsect3>
508 a8083063 Iustin Pop
        <title>ADD-MIRROR</title>
509 a8083063 Iustin Pop
        <cmdsynopsis>
510 a8083063 Iustin Pop
          <command>add-mirror</command>
511 a8083063 Iustin Pop
          <arg choice="req">-b <replaceable>sdX</replaceable></arg>
512 a8083063 Iustin Pop
          <arg choice="req">-n <replaceable>node</replaceable></arg>
513 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
514 a8083063 Iustin Pop
        </cmdsynopsis>
515 a8083063 Iustin Pop
        <para>
516 a8083063 Iustin Pop
          Adds a new mirror to the disk layout of the instance, if the
517 a8083063 Iustin Pop
          instance has a remote raid disk layout.
518 a8083063 Iustin Pop
519 a8083063 Iustin Pop
          The new mirror member will be between the instance's primary
520 a8083063 Iustin Pop
          node and the node given with the <option>-n</option> option.
521 a8083063 Iustin Pop
        </para>
522 a8083063 Iustin Pop
      </refsect3>
523 a8083063 Iustin Pop
524 a8083063 Iustin Pop
      <refsect3>
525 a8083063 Iustin Pop
        <title>REMOVE-MIRROR</title>
526 a8083063 Iustin Pop
527 a8083063 Iustin Pop
        <cmdsynopsis>
528 a8083063 Iustin Pop
          <command>removemirror</command>
529 a8083063 Iustin Pop
          <arg choice="req">-b <replaceable>sdX</replaceable></arg>
530 a8083063 Iustin Pop
          <arg choice="req">-p <replaceable>id</replaceable></arg>
531 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
532 a8083063 Iustin Pop
        </cmdsynopsis>
533 a8083063 Iustin Pop
        <para>
534 a8083063 Iustin Pop
          Removes a mirror componenent from the disk layout of the
535 a8083063 Iustin Pop
          instance, if the instance has a remote raid disk layout.
536 a8083063 Iustin Pop
        </para>
537 a8083063 Iustin Pop
538 a8083063 Iustin Pop
        <para>
539 a8083063 Iustin Pop
          You need to specifiy on which disk to act on using the
540 a8083063 Iustin Pop
          <option>-b</option> option (either <filename>sda</filename>
541 a8083063 Iustin Pop
          or <filename>sdb</filename>) and the mirror component, which
542 a8083063 Iustin Pop
          is identified by the <option>-p</option> option. You can
543 a8083063 Iustin Pop
          find the list of valid identifiers with the
544 a8083063 Iustin Pop
          <command>info</command> command.
545 a8083063 Iustin Pop
        </para>
546 a8083063 Iustin Pop
547 a8083063 Iustin Pop
      <refsect3>
548 a8083063 Iustin Pop
        <title>ACTIVATE-DISKS</title>
549 a8083063 Iustin Pop
550 a8083063 Iustin Pop
        <cmdsynopsis>
551 a8083063 Iustin Pop
          <command>activate-disks</command>
552 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
553 a8083063 Iustin Pop
        </cmdsynopsis>
554 a8083063 Iustin Pop
        <para>
555 a8083063 Iustin Pop
          Activates the block devices of the given instance. If
556 a8083063 Iustin Pop
          successful, the command will show the location and name of
557 a8083063 Iustin Pop
          the block devices:
558 a8083063 Iustin Pop
          <screen>
559 a8083063 Iustin Pop
node1.example.com:sda:/dev/md0
560 a8083063 Iustin Pop
node1.example.com:sdb:/dev/md1
561 a8083063 Iustin Pop
          </screen>
562 a8083063 Iustin Pop
563 a8083063 Iustin Pop
          In this example, <emphasis>node1.example.com</emphasis> is
564 a8083063 Iustin Pop
          the name of the node on which the devices have been
565 a8083063 Iustin Pop
          activated. The <emphasis>sda</emphasis> and
566 a8083063 Iustin Pop
          <emphasis>sdb</emphasis> are the names of the block devices
567 a8083063 Iustin Pop
          inside the instance. <emphasis>/dev/md0</emphasis> and
568 a8083063 Iustin Pop
          <emphasis>/dev/md1</emphasis> are the names of the block
569 a8083063 Iustin Pop
          devices as visible on the node.
570 a8083063 Iustin Pop
        </para>
571 a8083063 Iustin Pop
572 a8083063 Iustin Pop
        <para>
573 a8083063 Iustin Pop
          Note that it is safe to run this command while the instance
574 a8083063 Iustin Pop
          is already running.
575 a8083063 Iustin Pop
        </para>
576 a8083063 Iustin Pop
      </refsect3>
577 a8083063 Iustin Pop
578 a8083063 Iustin Pop
      <refsect3>
579 a8083063 Iustin Pop
        <title>DEACTIVATE-DISKS</title>
580 a8083063 Iustin Pop
581 a8083063 Iustin Pop
        <cmdsynopsis>
582 a8083063 Iustin Pop
          <command>deactivate-disks</command>
583 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
584 a8083063 Iustin Pop
        </cmdsynopsis>
585 a8083063 Iustin Pop
        <para>
586 a8083063 Iustin Pop
          De-activates the block devices of the given instance. Note
587 a8083063 Iustin Pop
          that if you run this command for a remote raid instance
588 a8083063 Iustin Pop
          type, while it is running, it will not be able to shutdown
589 a8083063 Iustin Pop
          the block devices on the primary node, but it will shutdown
590 a8083063 Iustin Pop
          the block devices on the secondary nodes, thus breaking the
591 a8083063 Iustin Pop
          replication.
592 a8083063 Iustin Pop
        </para>
593 a8083063 Iustin Pop
594 a8083063 Iustin Pop
      </refsect3>
595 a8083063 Iustin Pop
596 a8083063 Iustin Pop
    </refsect2>
597 a8083063 Iustin Pop
598 a8083063 Iustin Pop
    <refsect2>
599 a8083063 Iustin Pop
      <title>Recovery</title>
600 a8083063 Iustin Pop
601 a8083063 Iustin Pop
      <refsect3>
602 a8083063 Iustin Pop
        <title>FAILOVER</title>
603 a8083063 Iustin Pop
604 a8083063 Iustin Pop
        <cmdsynopsis>
605 a8083063 Iustin Pop
          <command>failover</command>
606 a8083063 Iustin Pop
          <arg>-f</arg>
607 a8083063 Iustin Pop
          <arg>--ignore-consistency</arg>
608 a8083063 Iustin Pop
          <arg choice="req"><replaceable>instance</replaceable></arg>
609 a8083063 Iustin Pop
        </cmdsynopsis>
610 a8083063 Iustin Pop
611 a8083063 Iustin Pop
        <para>
612 a8083063 Iustin Pop
          Failover will fail the instance over its secondary
613 a8083063 Iustin Pop
          node. This works only for instances having a remote raid
614 a8083063 Iustin Pop
          disk layout.
615 a8083063 Iustin Pop
        </para>
616 a8083063 Iustin Pop
617 a8083063 Iustin Pop
        <para>
618 a8083063 Iustin Pop
          Normally the failover will check the consistency of the
619 a8083063 Iustin Pop
          disks before failing over the instance. If you are trying to
620 a8083063 Iustin Pop
          migrate instances off a dead node, this will fail. Use the
621 a8083063 Iustin Pop
          <option>--ignore-consistency</option> option for this
622 a8083063 Iustin Pop
          purpose.
623 a8083063 Iustin Pop
        </para>
624 a8083063 Iustin Pop
625 a8083063 Iustin Pop
        <para>
626 a8083063 Iustin Pop
          Example:
627 a8083063 Iustin Pop
          <screen>
628 a8083063 Iustin Pop
# gnt-instance failover instance1.example.com
629 a8083063 Iustin Pop
          </screen>
630 a8083063 Iustin Pop
        </para>
631 a8083063 Iustin Pop
      </refsect3>
632 a8083063 Iustin Pop
633 a8083063 Iustin Pop
    </refsect2>
634 a8083063 Iustin Pop
635 a8083063 Iustin Pop
  </refsect1>
636 a8083063 Iustin Pop
637 a8083063 Iustin Pop
  &footer;
638 a8083063 Iustin Pop
639 a8083063 Iustin Pop
</refentry>
640 a8083063 Iustin Pop
641 a8083063 Iustin Pop
<!-- Keep this comment at the end of the file
642 a8083063 Iustin Pop
Local variables:
643 a8083063 Iustin Pop
mode: sgml
644 a8083063 Iustin Pop
sgml-omittag:t
645 a8083063 Iustin Pop
sgml-shorttag:t
646 a8083063 Iustin Pop
sgml-minimize-attributes:nil
647 a8083063 Iustin Pop
sgml-always-quote-attributes:t
648 a8083063 Iustin Pop
sgml-indent-step:2
649 a8083063 Iustin Pop
sgml-indent-data:t
650 a8083063 Iustin Pop
sgml-parent-document:nil
651 a8083063 Iustin Pop
sgml-default-dtd-file:nil
652 a8083063 Iustin Pop
sgml-exposed-tags:nil
653 a8083063 Iustin Pop
sgml-local-catalogs:nil
654 a8083063 Iustin Pop
sgml-local-ecat-files:nil
655 a8083063 Iustin Pop
End:
656 a8083063 Iustin Pop
-->