Statistics
| Branch: | Tag: | Revision:

root / man / gnt-node.sgml @ f8c9fa5c

History | View | Annotate | Download (33.2 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 d3b4cf9f Iustin Pop
  <!ENTITY dhdate      "<date>February 12, 2009</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-node</refentrytitle>">
10 a8083063 Iustin Pop
  <!ENTITY dhpackage   "gnt-node">
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 e7c6e02b Michael Hanselmann
      <year>2008</year>
24 d3b4cf9f Iustin Pop
      <year>2009</year>
25 a8083063 Iustin Pop
      <holder>Google Inc.</holder>
26 a8083063 Iustin Pop
    </copyright>
27 a8083063 Iustin Pop
    &dhdate;
28 a8083063 Iustin Pop
  </refentryinfo>
29 a8083063 Iustin Pop
  <refmeta>
30 a8083063 Iustin Pop
    &dhucpackage;
31 a8083063 Iustin Pop
32 a8083063 Iustin Pop
    &dhsection;
33 d3b4cf9f Iustin Pop
    <refmiscinfo>ganeti 2.0</refmiscinfo>
34 a8083063 Iustin Pop
  </refmeta>
35 a8083063 Iustin Pop
  <refnamediv>
36 a8083063 Iustin Pop
    <refname>&dhpackage;</refname>
37 a8083063 Iustin Pop
38 a8083063 Iustin Pop
    <refpurpose>node administration</refpurpose>
39 a8083063 Iustin Pop
  </refnamediv>
40 a8083063 Iustin Pop
  <refsynopsisdiv>
41 a8083063 Iustin Pop
    <cmdsynopsis>
42 a8083063 Iustin Pop
      <command>&dhpackage; </command>
43 a8083063 Iustin Pop
44 a8083063 Iustin Pop
      <arg choice="req">command</arg>
45 a8083063 Iustin Pop
      <arg>arguments...</arg>
46 a8083063 Iustin Pop
    </cmdsynopsis>
47 a8083063 Iustin Pop
  </refsynopsisdiv>
48 a8083063 Iustin Pop
  <refsect1>
49 a8083063 Iustin Pop
    <title>DESCRIPTION</title>
50 a8083063 Iustin Pop
51 a8083063 Iustin Pop
    <para>
52 a8083063 Iustin Pop
      The <command>&dhpackage;</command> is used for managing the
53 a8083063 Iustin Pop
      (physical) nodes in the ganeti system.
54 a8083063 Iustin Pop
    </para>
55 a8083063 Iustin Pop
56 a8083063 Iustin Pop
  </refsect1>
57 a8083063 Iustin Pop
  <refsect1>
58 a8083063 Iustin Pop
    <title>COMMANDS</title>
59 a8083063 Iustin Pop
60 a8083063 Iustin Pop
    <refsect2>
61 a8083063 Iustin Pop
      <title>ADD</title>
62 a8083063 Iustin Pop
63 a8083063 Iustin Pop
      <cmdsynopsis>
64 a8083063 Iustin Pop
        <command>add</command>
65 e7c6e02b Michael Hanselmann
        <arg>--readd</arg>
66 a8083063 Iustin Pop
        <arg>-s <replaceable>secondary_ip</replaceable></arg>
67 a8083063 Iustin Pop
        <arg choice="req"><replaceable>nodename</replaceable></arg>
68 a8083063 Iustin Pop
      </cmdsynopsis>
69 a8083063 Iustin Pop
70 a8083063 Iustin Pop
      <para>
71 a8083063 Iustin Pop
        Adds the given node to the cluster.
72 a8083063 Iustin Pop
      </para>
73 a8083063 Iustin Pop
74 a8083063 Iustin Pop
      <para>
75 a8083063 Iustin Pop
        This command is used to join a new node to the cluster. You
76 a8083063 Iustin Pop
        will have to provide the password for root of the node to be
77 a8083063 Iustin Pop
        able to add the node in the cluster. The command needs to be
78 a8083063 Iustin Pop
        run on the ganeti master.
79 a8083063 Iustin Pop
      </para>
80 a8083063 Iustin Pop
81 a8083063 Iustin Pop
      <para>
82 a8083063 Iustin Pop
        Note that the command is potentially destructive, as it will
83 a8083063 Iustin Pop
        forcibly join the specified host the cluster, not paying
84 a8083063 Iustin Pop
        attention to its current status (it could be already in a
85 a8083063 Iustin Pop
        cluster, etc.)
86 a8083063 Iustin Pop
      </para>
87 a8083063 Iustin Pop
88 a8083063 Iustin Pop
      <para>
89 a8083063 Iustin Pop
        The <option>-s</option> is used in dual-home clusters and
90 a8083063 Iustin Pop
        specifies the new node's IP in the secondary network. See the
91 a8083063 Iustin Pop
        discussion in <citerefentry>
92 a8083063 Iustin Pop
        <refentrytitle>gnt-cluster</refentrytitle>
93 a8083063 Iustin Pop
        <manvolnum>8</manvolnum> </citerefentry> for more
94 5bbd3f7f Michael Hanselmann
        information.
95 a8083063 Iustin Pop
      </para>
96 a8083063 Iustin Pop
97 a8083063 Iustin Pop
      <para>
98 d3b4cf9f Iustin Pop
        In case you're readding a node after hardware failure, you can
99 d3b4cf9f Iustin Pop
        use the <option>--readd</option> parameter. In this case, you
100 d3b4cf9f Iustin Pop
        don't need to pass the secondary IP again, it will reused from
101 d3b4cf9f Iustin Pop
        the cluster. Also, the <literal>drained</literal> and
102 d3b4cf9f Iustin Pop
        <literal>offline</literal> flags of the node will be cleared
103 d3b4cf9f Iustin Pop
        before re-adding it.
104 e7c6e02b Michael Hanselmann
      </para>
105 e7c6e02b Michael Hanselmann
106 e7c6e02b Michael Hanselmann
      <para>
107 a8083063 Iustin Pop
        Example:
108 a8083063 Iustin Pop
        <screen>
109 a8083063 Iustin Pop
# gnt-node add node5.example.com
110 a8083063 Iustin Pop
# gnt-node add -s 192.168.44.5 node5.example.com
111 a8083063 Iustin Pop
        </screen>
112 a8083063 Iustin Pop
      </para>
113 a8083063 Iustin Pop
    </refsect2>
114 a8083063 Iustin Pop
115 a8083063 Iustin Pop
    <refsect2>
116 cc425644 Iustin Pop
      <title>ADD-TAGS</title>
117 cc425644 Iustin Pop
118 cc425644 Iustin Pop
      <cmdsynopsis>
119 cc425644 Iustin Pop
        <command>add-tags</command>
120 810c50b7 Iustin Pop
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
121 cc425644 Iustin Pop
        <arg choice="req"><replaceable>nodename</replaceable></arg>
122 cc425644 Iustin Pop
        <arg choice="req"
123 cc425644 Iustin Pop
        rep="repeat"><replaceable>tag</replaceable></arg>
124 cc425644 Iustin Pop
      </cmdsynopsis>
125 cc425644 Iustin Pop
126 cc425644 Iustin Pop
      <para>
127 cc425644 Iustin Pop
        Add tags to the given node. If any of the tags contains
128 cc425644 Iustin Pop
        invalid characters, the entire operation will abort.
129 cc425644 Iustin Pop
      </para>
130 810c50b7 Iustin Pop
131 810c50b7 Iustin Pop
      <para>
132 810c50b7 Iustin Pop
        If the <option>--from</option> option is given, the list of
133 810c50b7 Iustin Pop
        tags will be extended with the contents of that file (each
134 810c50b7 Iustin Pop
        line becomes a tag). In this case, there is not need to pass
135 810c50b7 Iustin Pop
        tags on the command line (if you do, both sources will be
136 810c50b7 Iustin Pop
        used). A file name of - will be interpreted as stdin.
137 810c50b7 Iustin Pop
      </para>
138 cc425644 Iustin Pop
    </refsect2>
139 cc425644 Iustin Pop
140 cc425644 Iustin Pop
    <refsect2>
141 a5bc662a Iustin Pop
      <title>EVACUATE</title>
142 a5bc662a Iustin Pop
143 a5bc662a Iustin Pop
      <cmdsynopsis>
144 a5bc662a Iustin Pop
        <command>evacuate</command>
145 a5bc662a Iustin Pop
        <arg>-f</arg>
146 7ea7bcf6 Iustin Pop
        <arg>--early-release</arg>
147 d3b4cf9f Iustin Pop
        <group>
148 d3b4cf9f Iustin Pop
          <arg>--iallocator <replaceable>NAME</replaceable></arg>
149 d3b4cf9f Iustin Pop
          <arg>--new-secondary <replaceable>destination_node</replaceable></arg>
150 d3b4cf9f Iustin Pop
        </group>
151 f8c9fa5c Iustin Pop
        <arg choice="req" rep="repeat"><replaceable>node</replaceable></arg>
152 a5bc662a Iustin Pop
      </cmdsynopsis>
153 a5bc662a Iustin Pop
154 a5bc662a Iustin Pop
      <para>
155 d3b4cf9f Iustin Pop
        This command will move all secondary instances away from the
156 f8c9fa5c Iustin Pop
        given node(s). It works only for instances having a drbd disk
157 d3b4cf9f Iustin Pop
        template.
158 d3b4cf9f Iustin Pop
      </para>
159 d3b4cf9f Iustin Pop
160 d3b4cf9f Iustin Pop
      <para>
161 d3b4cf9f Iustin Pop
        The new location for the instances can be specified in two ways:
162 d3b4cf9f Iustin Pop
        <itemizedlist>
163 d3b4cf9f Iustin Pop
          <listitem>
164 d3b4cf9f Iustin Pop
            <simpara>as a single node for all instances, via the
165 d3b4cf9f Iustin Pop
            <option>--new-secondary</option> option</simpara>
166 d3b4cf9f Iustin Pop
          </listitem>
167 d3b4cf9f Iustin Pop
          <listitem>
168 d3b4cf9f Iustin Pop
            <simpara>or via the <option>--iallocator</option> option,
169 d3b4cf9f Iustin Pop
            giving a script name as parameter, so each instance will
170 d3b4cf9f Iustin Pop
            be in turn placed on the (per the script) optimal
171 d3b4cf9f Iustin Pop
            node</simpara>
172 d3b4cf9f Iustin Pop
          </listitem>
173 d3b4cf9f Iustin Pop
        </itemizedlist>
174 a5bc662a Iustin Pop
      </para>
175 a5bc662a Iustin Pop
176 a5bc662a Iustin Pop
      <para>
177 7ea7bcf6 Iustin Pop
        The <option>--early-release</option> changes the code so that
178 7ea7bcf6 Iustin Pop
        the old storage on node being evacuated is removed early
179 7ea7bcf6 Iustin Pop
        (before the resync is completed) and the internal Ganeti locks
180 7ea7bcf6 Iustin Pop
        are also released for both the current secondary and the new
181 7ea7bcf6 Iustin Pop
        secondary, thus allowing more parallelism in the cluster
182 7ea7bcf6 Iustin Pop
        operation. This should be used only when recovering from a
183 7ea7bcf6 Iustin Pop
        disk failure on the current secondary (thus the old storage is
184 7ea7bcf6 Iustin Pop
        already broken) or when the storage on the primary node is
185 7ea7bcf6 Iustin Pop
        known to be fine (thus we won't need the old storage for
186 7ea7bcf6 Iustin Pop
        potential recovery).
187 7ea7bcf6 Iustin Pop
      </para>
188 7ea7bcf6 Iustin Pop
189 7ea7bcf6 Iustin Pop
      <para>
190 a5bc662a Iustin Pop
        Example:
191 a5bc662a Iustin Pop
        <screen>
192 d3b4cf9f Iustin Pop
          # gnt-node evacuate -I dumb node3.example.com
193 a5bc662a Iustin Pop
        </screen>
194 a5bc662a Iustin Pop
      </para>
195 a5bc662a Iustin Pop
    </refsect2>
196 a5bc662a Iustin Pop
197 a5bc662a Iustin Pop
    <refsect2>
198 c450e9b0 Iustin Pop
      <title>FAILOVER</title>
199 c450e9b0 Iustin Pop
200 c450e9b0 Iustin Pop
      <cmdsynopsis>
201 c450e9b0 Iustin Pop
        <command>failover</command>
202 c450e9b0 Iustin Pop
        <arg>-f</arg>
203 c450e9b0 Iustin Pop
        <arg>--ignore-consistency</arg>
204 c450e9b0 Iustin Pop
        <arg choice="req"><replaceable>node</replaceable></arg>
205 c450e9b0 Iustin Pop
      </cmdsynopsis>
206 c450e9b0 Iustin Pop
207 c450e9b0 Iustin Pop
      <para>
208 c450e9b0 Iustin Pop
        This command will fail over all instances having the given
209 c450e9b0 Iustin Pop
        node as primary to their secondary nodes. This works only for
210 bd028152 Iustin Pop
        instances having a drbd disk template.
211 c450e9b0 Iustin Pop
      </para>
212 c450e9b0 Iustin Pop
213 c450e9b0 Iustin Pop
      <para>
214 c450e9b0 Iustin Pop
        Normally the failover will check the consistency of the disks
215 c450e9b0 Iustin Pop
        before failing over the instance. If you are trying to migrate
216 c450e9b0 Iustin Pop
        instances off a dead node, this will fail. Use the
217 c450e9b0 Iustin Pop
        <option>--ignore-consistency</option> option for this purpose.
218 c450e9b0 Iustin Pop
      </para>
219 c450e9b0 Iustin Pop
220 c450e9b0 Iustin Pop
      <para>
221 c450e9b0 Iustin Pop
        Example:
222 c450e9b0 Iustin Pop
        <screen>
223 c450e9b0 Iustin Pop
          # gnt-node failover node1.example.com
224 c450e9b0 Iustin Pop
        </screen>
225 c450e9b0 Iustin Pop
      </para>
226 c450e9b0 Iustin Pop
    </refsect2>
227 c450e9b0 Iustin Pop
228 c450e9b0 Iustin Pop
    <refsect2>
229 a8083063 Iustin Pop
      <title>INFO</title>
230 a8083063 Iustin Pop
231 a8083063 Iustin Pop
      <cmdsynopsis>
232 a8083063 Iustin Pop
        <command>info</command>
233 a8083063 Iustin Pop
        <arg rep="repeat"><replaceable>node</replaceable></arg>
234 a8083063 Iustin Pop
      </cmdsynopsis>
235 a8083063 Iustin Pop
236 a8083063 Iustin Pop
      <para>
237 a8083063 Iustin Pop
        Show detailed information about the nodes in the cluster. If you
238 a8083063 Iustin Pop
        don't give any arguments, all nodes will be shows, otherwise the
239 a8083063 Iustin Pop
        output will be restricted to the given names.
240 a8083063 Iustin Pop
      </para>
241 a8083063 Iustin Pop
    </refsect2>
242 a8083063 Iustin Pop
243 a8083063 Iustin Pop
    <refsect2>
244 a8083063 Iustin Pop
      <title>LIST</title>
245 a8083063 Iustin Pop
246 a8083063 Iustin Pop
      <cmdsynopsis>
247 a8083063 Iustin Pop
        <command>list</command>
248 d3b4cf9f Iustin Pop
        <arg>--sync</arg>
249 d3b4cf9f Iustin Pop
        <sbr>
250 a8083063 Iustin Pop
        <arg>--no-headers</arg>
251 a8083063 Iustin Pop
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
252 d3b4cf9f Iustin Pop
        <sbr>
253 d3b4cf9f Iustin Pop
        <arg>--units=<replaceable>UNITS</replaceable></arg>
254 48c4dfa8 Iustin Pop
        <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
255 d3b4cf9f Iustin Pop
        <sbr>
256 d3b4cf9f Iustin Pop
        <arg rep="repeat">node</arg>
257 a8083063 Iustin Pop
      </cmdsynopsis>
258 a8083063 Iustin Pop
259 a8083063 Iustin Pop
      <para>
260 d3b4cf9f Iustin Pop
        Lists the nodes in the cluster.
261 a8083063 Iustin Pop
      </para>
262 a8083063 Iustin Pop
263 a8083063 Iustin Pop
      <para>
264 a8083063 Iustin Pop
        The <option>--no-headers</option> option will skip the initial
265 a8083063 Iustin Pop
        header line. The <option>--separator</option> option takes an
266 a8083063 Iustin Pop
        argument which denotes what will be used between the output
267 a8083063 Iustin Pop
        fields. Both these options are to help scripting.
268 a8083063 Iustin Pop
      </para>
269 a8083063 Iustin Pop
270 a8083063 Iustin Pop
      <para>
271 d3b4cf9f Iustin Pop
        The units used to display the numeric values in the output
272 d3b4cf9f Iustin Pop
        varies, depending on the options given. By default, the values
273 d3b4cf9f Iustin Pop
        will be formatted in the most appropriate unit. If the
274 d3b4cf9f Iustin Pop
        <option>--separator</option> option is given, then the values
275 d3b4cf9f Iustin Pop
        are shown in mebibytes to allow parsing by scripts. In both
276 d3b4cf9f Iustin Pop
        cases, the <option>--units</option> option can be used to
277 d3b4cf9f Iustin Pop
        enforce a given output unit.
278 d3b4cf9f Iustin Pop
      </para>
279 d3b4cf9f Iustin Pop
280 d3b4cf9f Iustin Pop
      <para>
281 d3b4cf9f Iustin Pop
        By default, the query of nodes will be done in parallel with
282 d3b4cf9f Iustin Pop
        any running jobs. This might give inconsistent results for the
283 d3b4cf9f Iustin Pop
        free disk/memory. The <option>--sync</option> can be used to
284 d3b4cf9f Iustin Pop
        grab locks for all the nodes and ensure consistent view of the
285 d3b4cf9f Iustin Pop
        cluster (but this might stall the query for a long time).
286 d3b4cf9f Iustin Pop
      </para>
287 d3b4cf9f Iustin Pop
288 d3b4cf9f Iustin Pop
      <para>
289 a8083063 Iustin Pop
        The <option>-o</option> option takes a comma-separated list of
290 a8083063 Iustin Pop
        output fields. The available fields and their meaning are:
291 a8083063 Iustin Pop
        <variablelist>
292 a8083063 Iustin Pop
          <varlistentry>
293 a8083063 Iustin Pop
            <term>name</term>
294 a8083063 Iustin Pop
            <listitem>
295 a8083063 Iustin Pop
              <simpara>the node name</simpara>
296 a8083063 Iustin Pop
            </listitem>
297 a8083063 Iustin Pop
          </varlistentry>
298 a8083063 Iustin Pop
          <varlistentry>
299 d8a4b51d Iustin Pop
            <term>pinst_cnt</term>
300 a8083063 Iustin Pop
            <listitem>
301 a8083063 Iustin Pop
              <simpara>the number of instances having this node as
302 a8083063 Iustin Pop
              primary</simpara>
303 a8083063 Iustin Pop
            </listitem>
304 a8083063 Iustin Pop
          </varlistentry>
305 a8083063 Iustin Pop
          <varlistentry>
306 d8a4b51d Iustin Pop
            <term>pinst_list</term>
307 d8a4b51d Iustin Pop
            <listitem>
308 d8a4b51d Iustin Pop
              <simpara>the list of instances having this node as
309 d8a4b51d Iustin Pop
              primary, comma separated</simpara>
310 d8a4b51d Iustin Pop
            </listitem>
311 d8a4b51d Iustin Pop
          </varlistentry>
312 d8a4b51d Iustin Pop
          <varlistentry>
313 d8a4b51d Iustin Pop
            <term>sinst_cnt</term>
314 a8083063 Iustin Pop
            <listitem>
315 a8083063 Iustin Pop
              <simpara>the number of instances having this node as a
316 a8083063 Iustin Pop
              secondary node</simpara>
317 a8083063 Iustin Pop
            </listitem>
318 a8083063 Iustin Pop
          </varlistentry>
319 a8083063 Iustin Pop
          <varlistentry>
320 d8a4b51d Iustin Pop
            <term>sinst_list</term>
321 d8a4b51d Iustin Pop
            <listitem>
322 d8a4b51d Iustin Pop
              <simpara>the list of instances having this node as a
323 d8a4b51d Iustin Pop
              secondary node, comma separated</simpara>
324 d8a4b51d Iustin Pop
            </listitem>
325 d8a4b51d Iustin Pop
          </varlistentry>
326 d8a4b51d Iustin Pop
          <varlistentry>
327 a8083063 Iustin Pop
            <term>pip</term>
328 a8083063 Iustin Pop
            <listitem>
329 a8083063 Iustin Pop
              <simpara>the primary ip of this node (used for cluster
330 a8083063 Iustin Pop
              communication)</simpara>
331 a8083063 Iustin Pop
            </listitem>
332 a8083063 Iustin Pop
          </varlistentry>
333 a8083063 Iustin Pop
          <varlistentry>
334 a8083063 Iustin Pop
            <term>sip</term>
335 a8083063 Iustin Pop
            <listitem>
336 a8083063 Iustin Pop
              <simpara>
337 a8083063 Iustin Pop
                the secondary ip of this node (used for data
338 a8083063 Iustin Pop
                replication in dual-ip clusters, see <citerefentry>
339 a8083063 Iustin Pop
                <refentrytitle>gnt-cluster</refentrytitle>
340 a8083063 Iustin Pop
                <manvolnum>8</manvolnum>
341 a8083063 Iustin Pop
                </citerefentry>
342 a8083063 Iustin Pop
              </simpara>
343 a8083063 Iustin Pop
            </listitem>
344 a8083063 Iustin Pop
          </varlistentry>
345 a8083063 Iustin Pop
          <varlistentry>
346 a8083063 Iustin Pop
            <term>dtotal</term>
347 a8083063 Iustin Pop
            <listitem>
348 a8083063 Iustin Pop
              <simpara>total disk space in the volume group used for
349 a8083063 Iustin Pop
              instance disk allocations</simpara>
350 a8083063 Iustin Pop
            </listitem>
351 a8083063 Iustin Pop
          </varlistentry>
352 a8083063 Iustin Pop
          <varlistentry>
353 a8083063 Iustin Pop
            <term>dfree</term>
354 a8083063 Iustin Pop
            <listitem>
355 a8083063 Iustin Pop
              <simpara>available disk space in the volume group</simpara>
356 a8083063 Iustin Pop
            </listitem>
357 a8083063 Iustin Pop
          </varlistentry>
358 a8083063 Iustin Pop
          <varlistentry>
359 a8083063 Iustin Pop
            <term>mtotal</term>
360 a8083063 Iustin Pop
            <listitem>
361 a8083063 Iustin Pop
              <simpara>total memory on the physical node</simpara>
362 a8083063 Iustin Pop
            </listitem>
363 a8083063 Iustin Pop
          </varlistentry>
364 a8083063 Iustin Pop
          <varlistentry>
365 a8083063 Iustin Pop
            <term>mnode</term>
366 a8083063 Iustin Pop
            <listitem>
367 a8083063 Iustin Pop
              <simpara>the memory used by the node itself</simpara>
368 a8083063 Iustin Pop
            </listitem>
369 a8083063 Iustin Pop
          </varlistentry>
370 a8083063 Iustin Pop
          <varlistentry>
371 a8083063 Iustin Pop
            <term>mfree</term>
372 a8083063 Iustin Pop
            <listitem>
373 a8083063 Iustin Pop
              <simpara>memory available for instance
374 a8083063 Iustin Pop
              allocations</simpara>
375 a8083063 Iustin Pop
            </listitem>
376 a8083063 Iustin Pop
          </varlistentry>
377 d8a4b51d Iustin Pop
          <varlistentry>
378 d8a4b51d Iustin Pop
            <term>bootid</term>
379 d8a4b51d Iustin Pop
            <listitem>
380 d8a4b51d Iustin Pop
              <simpara>the node bootid value; this is a linux specific
381 d8a4b51d Iustin Pop
              feature that assigns a new UUID to the node at each boot
382 d8a4b51d Iustin Pop
              and can be use to detect node reboots (by tracking
383 d8a4b51d Iustin Pop
              changes in this value)</simpara>
384 d8a4b51d Iustin Pop
            </listitem>
385 d8a4b51d Iustin Pop
          </varlistentry>
386 130a6a6f Iustin Pop
          <varlistentry>
387 130a6a6f Iustin Pop
            <term>tags</term>
388 130a6a6f Iustin Pop
            <listitem>
389 130a6a6f Iustin Pop
              <simpara>comma-separated list of the node's
390 130a6a6f Iustin Pop
              tags</simpara>
391 130a6a6f Iustin Pop
            </listitem>
392 130a6a6f Iustin Pop
          </varlistentry>
393 38d7239a Iustin Pop
          <varlistentry>
394 38d7239a Iustin Pop
            <term>serial_no</term>
395 38d7239a Iustin Pop
            <listitem>
396 90f72445 Iustin Pop
              <simpara>the so called 'serial number' of the node;
397 38d7239a Iustin Pop
              this is a numeric field that is incremented each time
398 90f72445 Iustin Pop
              the node is modified, and it can be used to detect
399 38d7239a Iustin Pop
              modifications</simpara>
400 38d7239a Iustin Pop
            </listitem>
401 38d7239a Iustin Pop
          </varlistentry>
402 d3b4cf9f Iustin Pop
          <varlistentry>
403 90f72445 Iustin Pop
            <term>ctime</term>
404 90f72445 Iustin Pop
            <listitem>
405 90f72445 Iustin Pop
              <para>
406 90f72445 Iustin Pop
                the creation time of the node; note that this field
407 90f72445 Iustin Pop
                contains spaces and as such it's harder to parse
408 90f72445 Iustin Pop
              </para>
409 90f72445 Iustin Pop
              <para>
410 90f72445 Iustin Pop
                if this attribute is not present (e.g. when upgrading
411 90f72445 Iustin Pop
                from older versions), then "N/A" will be shown instead
412 90f72445 Iustin Pop
              </para>
413 90f72445 Iustin Pop
            </listitem>
414 90f72445 Iustin Pop
          </varlistentry>
415 90f72445 Iustin Pop
          <varlistentry>
416 90f72445 Iustin Pop
            <term>mtime</term>
417 90f72445 Iustin Pop
            <listitem>
418 90f72445 Iustin Pop
              <para>
419 90f72445 Iustin Pop
                the last modification time of the node; note that this
420 90f72445 Iustin Pop
                field contains spaces and as such it's harder to parse
421 90f72445 Iustin Pop
              </para>
422 90f72445 Iustin Pop
              <para>
423 90f72445 Iustin Pop
                if this attribute is not present (e.g. when upgrading
424 90f72445 Iustin Pop
                from older versions), then "N/A" will be shown instead
425 90f72445 Iustin Pop
              </para>
426 90f72445 Iustin Pop
            </listitem>
427 90f72445 Iustin Pop
          </varlistentry>
428 90f72445 Iustin Pop
          <varlistentry>
429 edc8fc5f Iustin Pop
            <term>uuid</term>
430 edc8fc5f Iustin Pop
            <listitem>
431 edc8fc5f Iustin Pop
              <simpara>Show the UUID of the node (generated
432 edc8fc5f Iustin Pop
                automatically by Ganeti)</simpara>
433 edc8fc5f Iustin Pop
            </listitem>
434 edc8fc5f Iustin Pop
          </varlistentry>
435 edc8fc5f Iustin Pop
436 edc8fc5f Iustin Pop
          <varlistentry>
437 d3b4cf9f Iustin Pop
            <term>ctotal</term>
438 d3b4cf9f Iustin Pop
            <listitem>
439 d3b4cf9f Iustin Pop
              <simpara>the toal number of logical processors</simpara>
440 d3b4cf9f Iustin Pop
            </listitem>
441 d3b4cf9f Iustin Pop
          </varlistentry>
442 d3b4cf9f Iustin Pop
          <varlistentry>
443 d3b4cf9f Iustin Pop
            <term>cnodes</term>
444 d3b4cf9f Iustin Pop
            <listitem>
445 d3b4cf9f Iustin Pop
              <simpara>the number of NUMA domains on the node, if the
446 d3b4cf9f Iustin Pop
              hypervisor can export this information</simpara>
447 d3b4cf9f Iustin Pop
            </listitem>
448 d3b4cf9f Iustin Pop
          </varlistentry>
449 d3b4cf9f Iustin Pop
          <varlistentry>
450 d3b4cf9f Iustin Pop
            <term>csockets</term>
451 d3b4cf9f Iustin Pop
            <listitem>
452 d3b4cf9f Iustin Pop
              <simpara>the number of physical CPU sockets, if the
453 d3b4cf9f Iustin Pop
              hypervisor can export this information</simpara>
454 d3b4cf9f Iustin Pop
            </listitem>
455 d3b4cf9f Iustin Pop
          </varlistentry>
456 d3b4cf9f Iustin Pop
          <varlistentry>
457 d3b4cf9f Iustin Pop
            <term>master_candidate</term>
458 d3b4cf9f Iustin Pop
            <listitem>
459 d3b4cf9f Iustin Pop
              <simpara>whether the node is a master candidate or not</simpara>
460 d3b4cf9f Iustin Pop
            </listitem>
461 d3b4cf9f Iustin Pop
          </varlistentry>
462 d3b4cf9f Iustin Pop
          <varlistentry>
463 d3b4cf9f Iustin Pop
            <term>drained</term>
464 d3b4cf9f Iustin Pop
            <listitem>
465 253ba78f Raiford Storey
              <simpara>whether the node is drained or not; the cluster
466 253ba78f Raiford Storey
              still communicates with drained nodes but excludes them
467 253ba78f Raiford Storey
              from allocation operations</simpara>
468 d3b4cf9f Iustin Pop
            </listitem>
469 d3b4cf9f Iustin Pop
          </varlistentry>
470 d3b4cf9f Iustin Pop
          <varlistentry>
471 d3b4cf9f Iustin Pop
            <term>offline</term>
472 d3b4cf9f Iustin Pop
            <listitem>
473 253ba78f Raiford Storey
              <simpara>whether the node is offline or not; if offline,
474 253ba78f Raiford Storey
              the cluster does not communicate with offline nodes;
475 253ba78f Raiford Storey
              useful for nodes that are not reachable in order to
476 253ba78f Raiford Storey
              avoid delays</simpara>
477 d3b4cf9f Iustin Pop
            </listitem>
478 d3b4cf9f Iustin Pop
          </varlistentry>
479 c120ff34 Iustin Pop
          <varlistentry>
480 c120ff34 Iustin Pop
            <term>role</term>
481 c120ff34 Iustin Pop
            <listitem>
482 c120ff34 Iustin Pop
              <para>
483 c120ff34 Iustin Pop
                A condensed version of the node flags; this field will
484 c120ff34 Iustin Pop
                output a one-character field, with the following
485 c120ff34 Iustin Pop
                possible values:
486 c120ff34 Iustin Pop
                <itemizedlist>
487 c120ff34 Iustin Pop
                  <listitem>
488 c120ff34 Iustin Pop
                    <simpara><emphasis>M</emphasis> for the master
489 c120ff34 Iustin Pop
                    node</simpara>
490 c120ff34 Iustin Pop
                  </listitem>
491 c120ff34 Iustin Pop
                  <listitem>
492 c120ff34 Iustin Pop
                    <simpara><emphasis>C</emphasis> for a master
493 c120ff34 Iustin Pop
                    candidate</simpara>
494 c120ff34 Iustin Pop
                  </listitem>
495 c120ff34 Iustin Pop
                  <listitem>
496 c120ff34 Iustin Pop
                    <simpara><emphasis>R</emphasis> for a regular
497 c120ff34 Iustin Pop
                    node</simpara>
498 c120ff34 Iustin Pop
                  </listitem>
499 c120ff34 Iustin Pop
                  <listitem>
500 c120ff34 Iustin Pop
                    <simpara><emphasis>D</emphasis> for a drained
501 c120ff34 Iustin Pop
                    node</simpara>
502 c120ff34 Iustin Pop
                  </listitem>
503 c120ff34 Iustin Pop
                  <listitem>
504 c120ff34 Iustin Pop
                    <simpara><emphasis>O</emphasis> for an offline
505 c120ff34 Iustin Pop
                    node</simpara>
506 c120ff34 Iustin Pop
                  </listitem>
507 c120ff34 Iustin Pop
                </itemizedlist>
508 c120ff34 Iustin Pop
              </para>
509 c120ff34 Iustin Pop
            </listitem>
510 c120ff34 Iustin Pop
          </varlistentry>
511 a8083063 Iustin Pop
        </variablelist>
512 a8083063 Iustin Pop
      </para>
513 a8083063 Iustin Pop
514 a8083063 Iustin Pop
      <para>
515 48c4dfa8 Iustin Pop
        If the value of the option starts with the character
516 48c4dfa8 Iustin Pop
        <constant>+</constant>, the new fields will be added to the
517 48c4dfa8 Iustin Pop
        default list. This allows to quickly see the default list plus
518 48c4dfa8 Iustin Pop
        a few other fields, instead of retyping the entire list of
519 48c4dfa8 Iustin Pop
        fields.
520 48c4dfa8 Iustin Pop
      </para>
521 48c4dfa8 Iustin Pop
522 48c4dfa8 Iustin Pop
      <para>
523 a8083063 Iustin Pop
        Note that some of this fields are known from the configuration
524 d3b4cf9f Iustin Pop
        of the cluster (e.g. <simplelist type="inline">
525 a8083063 Iustin Pop
        <member>name</member> <member>pinst</member>
526 a8083063 Iustin Pop
        <member>sinst</member> <member>pip</member>
527 a8083063 Iustin Pop
        <member>sip</member> </simplelist> and thus the master does
528 a8083063 Iustin Pop
        not need to contact the node for this data (making the listing
529 a8083063 Iustin Pop
        fast if only fields from this set are selected), whereas the
530 a8083063 Iustin Pop
        other fields are "live" fields and we need to make a query to
531 a8083063 Iustin Pop
        the cluster nodes.
532 a8083063 Iustin Pop
      </para>
533 a8083063 Iustin Pop
534 a8083063 Iustin Pop
      <para>
535 a8083063 Iustin Pop
        Depending on the virtualization type and implementation
536 a8083063 Iustin Pop
        details, the mtotal, mnode and mfree may have slighly varying
537 a8083063 Iustin Pop
        meanings. For example, some solutions share the node memory
538 a8083063 Iustin Pop
        with the pool of memory used for instances
539 d3b4cf9f Iustin Pop
        (<acronym>KVM</acronym>), whereas others have separate memory
540 a8083063 Iustin Pop
        for the node and for the instances (Xen).
541 a8083063 Iustin Pop
      </para>
542 d3b4cf9f Iustin Pop
543 d3b4cf9f Iustin Pop
      <para>
544 d3b4cf9f Iustin Pop
        If no node names are given, then all nodes are
545 d3b4cf9f Iustin Pop
        queried. Otherwise, only the given nodes will be listed.
546 d3b4cf9f Iustin Pop
      </para>
547 a8083063 Iustin Pop
    </refsect2>
548 a8083063 Iustin Pop
549 a8083063 Iustin Pop
    <refsect2>
550 cc425644 Iustin Pop
      <title>LIST-TAGS</title>
551 cc425644 Iustin Pop
552 cc425644 Iustin Pop
      <cmdsynopsis>
553 cc425644 Iustin Pop
        <command>list-tags</command>
554 cc425644 Iustin Pop
        <arg choice="req"><replaceable>nodename</replaceable></arg>
555 cc425644 Iustin Pop
      </cmdsynopsis>
556 cc425644 Iustin Pop
557 cc425644 Iustin Pop
      <para>List the tags of the given node.</para>
558 cc425644 Iustin Pop
    </refsect2>
559 cc425644 Iustin Pop
560 cc425644 Iustin Pop
    <refsect2>
561 d3b4cf9f Iustin Pop
      <title>MIGRATE</title>
562 d3b4cf9f Iustin Pop
      <cmdsynopsis>
563 d3b4cf9f Iustin Pop
        <command>migrate</command>
564 d3b4cf9f Iustin Pop
        <arg>-f</arg>
565 d3b4cf9f Iustin Pop
        <arg>--non-live</arg>
566 d3b4cf9f Iustin Pop
        <arg choice="req"><replaceable>node</replaceable></arg>
567 d3b4cf9f Iustin Pop
      </cmdsynopsis>
568 d3b4cf9f Iustin Pop
569 d3b4cf9f Iustin Pop
      <para>
570 d3b4cf9f Iustin Pop
        This command will migrate all instances having the given
571 d3b4cf9f Iustin Pop
        node as primary to their secondary nodes. This works only for
572 d3b4cf9f Iustin Pop
        instances having a drbd disk template.
573 d3b4cf9f Iustin Pop
      </para>
574 d3b4cf9f Iustin Pop
575 d3b4cf9f Iustin Pop
      <para>
576 d3b4cf9f Iustin Pop
        As for the <command>gnt-instance migrate</command> command,
577 d3b4cf9f Iustin Pop
        the <option>--no-live</option> option can be given to do a
578 d3b4cf9f Iustin Pop
        non-live migration.
579 d3b4cf9f Iustin Pop
      </para>
580 d3b4cf9f Iustin Pop
581 d3b4cf9f Iustin Pop
      <para>
582 d3b4cf9f Iustin Pop
        Example:
583 d3b4cf9f Iustin Pop
        <screen>
584 d3b4cf9f Iustin Pop
          # gnt-node migrate node1.example.com
585 d3b4cf9f Iustin Pop
        </screen>
586 d3b4cf9f Iustin Pop
      </para>
587 d3b4cf9f Iustin Pop
588 d3b4cf9f Iustin Pop
    </refsect2>
589 d3b4cf9f Iustin Pop
590 d3b4cf9f Iustin Pop
    <refsect2>
591 949bdabe Iustin Pop
      <title>MODIFY</title>
592 949bdabe Iustin Pop
      <cmdsynopsis>
593 949bdabe Iustin Pop
        <command>modify</command>
594 949bdabe Iustin Pop
        <arg>-f</arg>
595 949bdabe Iustin Pop
        <arg>--submit</arg>
596 949bdabe Iustin Pop
        <arg>--master-candidate=<option>yes|no</option></arg>
597 949bdabe Iustin Pop
        <arg>--drained=<option>yes|no</option></arg>
598 949bdabe Iustin Pop
        <arg>--offline=<option>yes|no</option></arg>
599 949bdabe Iustin Pop
        <arg choice="req"><replaceable>node</replaceable></arg>
600 949bdabe Iustin Pop
      </cmdsynopsis>
601 949bdabe Iustin Pop
602 949bdabe Iustin Pop
      <para>
603 949bdabe Iustin Pop
        This command changes the role of the node. Each options takes
604 949bdabe Iustin Pop
        either a literal <literal>yes</literal> or
605 949bdabe Iustin Pop
        <literal>no</literal>, and only one option should be given as
606 949bdabe Iustin Pop
        <literal>yes</literal>. The meaning of the roles are described
607 949bdabe Iustin Pop
        in the manpage <citerefentry>
608 949bdabe Iustin Pop
        <refentrytitle>ganeti</refentrytitle> <manvolnum>7</manvolnum>
609 949bdabe Iustin Pop
        </citerefentry>.
610 949bdabe Iustin Pop
      </para>
611 949bdabe Iustin Pop
612 949bdabe Iustin Pop
      <para>
613 949bdabe Iustin Pop
        In case a node is demoted from the master candidate role, but
614 949bdabe Iustin Pop
        there are not enough new nodes for this case, the operation
615 949bdabe Iustin Pop
        will be refused. To override this check, pass the
616 949bdabe Iustin Pop
        <option>--force</option> option.
617 949bdabe Iustin Pop
      </para>
618 949bdabe Iustin Pop
619 949bdabe Iustin Pop
      <para>
620 949bdabe Iustin Pop
        Example (setting a node offline, which will demote it from
621 949bdabe Iustin Pop
        master candidate role if is in that role):
622 949bdabe Iustin Pop
        <screen>
623 949bdabe Iustin Pop
# gnt-node modify --offline=yes node1.example.com
624 949bdabe Iustin Pop
        </screen>
625 949bdabe Iustin Pop
      </para>
626 949bdabe Iustin Pop
627 949bdabe Iustin Pop
      <para>Example (setting the node back to online and master candidate):
628 949bdabe Iustin Pop
        <screen>
629 949bdabe Iustin Pop
# gnt-node modify --offline=no --master-candidate=yes node1.example.com
630 949bdabe Iustin Pop
        </screen>
631 949bdabe Iustin Pop
      </para>
632 949bdabe Iustin Pop
633 949bdabe Iustin Pop
    </refsect2>
634 949bdabe Iustin Pop
635 949bdabe Iustin Pop
    <refsect2>
636 a8083063 Iustin Pop
      <title>REMOVE</title>
637 a8083063 Iustin Pop
638 a8083063 Iustin Pop
      <cmdsynopsis>
639 a8083063 Iustin Pop
        <command>remove</command>
640 a8083063 Iustin Pop
        <arg choice="req"><replaceable>nodename</replaceable></arg>
641 a8083063 Iustin Pop
      </cmdsynopsis>
642 a8083063 Iustin Pop
643 a8083063 Iustin Pop
      <para>
644 a8083063 Iustin Pop
        Removes a node from the cluster. Instances must be removed or
645 a8083063 Iustin Pop
        migrated to another cluster before.
646 a8083063 Iustin Pop
      </para>
647 a8083063 Iustin Pop
648 a8083063 Iustin Pop
      <para>
649 a8083063 Iustin Pop
        Example:
650 a8083063 Iustin Pop
        <screen>
651 a8083063 Iustin Pop
# gnt-node remove node5.example.com
652 a8083063 Iustin Pop
        </screen>
653 a8083063 Iustin Pop
      </para>
654 a8083063 Iustin Pop
    </refsect2>
655 a8083063 Iustin Pop
656 dcb93971 Michael Hanselmann
    <refsect2>
657 cc425644 Iustin Pop
      <title>REMOVE-TAGS</title>
658 cc425644 Iustin Pop
      <cmdsynopsis>
659 cc425644 Iustin Pop
        <command>remove-tags</command>
660 810c50b7 Iustin Pop
        <arg choice="opt">--from <replaceable>file</replaceable></arg>
661 cc425644 Iustin Pop
        <arg choice="req"><replaceable>nodename</replaceable></arg>
662 cc425644 Iustin Pop
        <arg choice="req"
663 cc425644 Iustin Pop
        rep="repeat"><replaceable>tag</replaceable></arg>
664 cc425644 Iustin Pop
      </cmdsynopsis>
665 cc425644 Iustin Pop
666 cc425644 Iustin Pop
      <para>
667 cc425644 Iustin Pop
        Remove tags from the given node. If any of the tags are not
668 cc425644 Iustin Pop
        existing on the node, the entire operation will abort.
669 cc425644 Iustin Pop
      </para>
670 810c50b7 Iustin Pop
671 810c50b7 Iustin Pop
      <para>
672 810c50b7 Iustin Pop
        If the <option>--from</option> option is given, the list of
673 810c50b7 Iustin Pop
        tags will be extended with the contents of that file (each
674 810c50b7 Iustin Pop
        line becomes a tag). In this case, there is not need to pass
675 810c50b7 Iustin Pop
        tags on the command line (if you do, both sources will be
676 810c50b7 Iustin Pop
        used). A file name of - will be interpreted as stdin.
677 810c50b7 Iustin Pop
      </para>
678 cc425644 Iustin Pop
    </refsect2>
679 cc425644 Iustin Pop
680 cc425644 Iustin Pop
    <refsect2>
681 dcb93971 Michael Hanselmann
      <title>VOLUMES</title>
682 dcb93971 Michael Hanselmann
683 dcb93971 Michael Hanselmann
      <cmdsynopsis>
684 dcb93971 Michael Hanselmann
        <command>volumes</command>
685 f69dab6d Iustin Pop
        <arg>--no-headers</arg>
686 f69dab6d Iustin Pop
        <arg>--human-readable</arg>
687 f69dab6d Iustin Pop
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
688 f69dab6d Iustin Pop
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
689 f69dab6d Iustin Pop
        <sbr>
690 dcb93971 Michael Hanselmann
        <arg rep="repeat"><replaceable>node</replaceable></arg>
691 dcb93971 Michael Hanselmann
      </cmdsynopsis>
692 dcb93971 Michael Hanselmann
693 dcb93971 Michael Hanselmann
      <para>
694 dcb93971 Michael Hanselmann
        Lists all logical volumes and their physical disks from the node(s)
695 dcb93971 Michael Hanselmann
        provided.
696 dcb93971 Michael Hanselmann
      </para>
697 dcb93971 Michael Hanselmann
698 dcb93971 Michael Hanselmann
      <para>
699 f69dab6d Iustin Pop
        The <option>--no-headers</option> option will skip the initial
700 f69dab6d Iustin Pop
        header line. The <option>--separator</option> option takes an
701 f69dab6d Iustin Pop
        argument which denotes what will be used between the output
702 f69dab6d Iustin Pop
        fields. Both these options are to help scripting.
703 f69dab6d Iustin Pop
      </para>
704 f69dab6d Iustin Pop
705 f69dab6d Iustin Pop
      <para>
706 d3b4cf9f Iustin Pop
        The units used to display the numeric values in the output
707 d3b4cf9f Iustin Pop
        varies, depending on the options given. By default, the values
708 d3b4cf9f Iustin Pop
        will be formatted in the most appropriate unit. If the
709 d3b4cf9f Iustin Pop
        <option>--separator</option> option is given, then the values
710 d3b4cf9f Iustin Pop
        are shown in mebibytes to allow parsing by scripts. In both
711 d3b4cf9f Iustin Pop
        cases, the <option>--units</option> option can be used to
712 d3b4cf9f Iustin Pop
        enforce a given output unit.
713 d3b4cf9f Iustin Pop
      </para>
714 d3b4cf9f Iustin Pop
715 d3b4cf9f Iustin Pop
      <para>
716 f69dab6d Iustin Pop
        The <option>-o</option> option takes a comma-separated list of
717 f69dab6d Iustin Pop
        output fields. The available fields and their meaning are:
718 f69dab6d Iustin Pop
        <variablelist>
719 f69dab6d Iustin Pop
          <varlistentry>
720 f69dab6d Iustin Pop
            <term>node</term>
721 f69dab6d Iustin Pop
            <listitem>
722 f69dab6d Iustin Pop
              <simpara>the node name on which the volume exists</simpara>
723 f69dab6d Iustin Pop
            </listitem>
724 f69dab6d Iustin Pop
          </varlistentry>
725 f69dab6d Iustin Pop
          <varlistentry>
726 f69dab6d Iustin Pop
            <term>phys</term>
727 f69dab6d Iustin Pop
            <listitem>
728 f69dab6d Iustin Pop
              <simpara>the physical drive (on which the LVM physical
729 f69dab6d Iustin Pop
              volume lives)</simpara>
730 f69dab6d Iustin Pop
            </listitem>
731 f69dab6d Iustin Pop
          </varlistentry>
732 f69dab6d Iustin Pop
          <varlistentry>
733 f69dab6d Iustin Pop
            <term>vg</term>
734 f69dab6d Iustin Pop
            <listitem>
735 f69dab6d Iustin Pop
              <simpara>the volume group name</simpara>
736 f69dab6d Iustin Pop
            </listitem>
737 f69dab6d Iustin Pop
          </varlistentry>
738 f69dab6d Iustin Pop
          <varlistentry>
739 f69dab6d Iustin Pop
            <term>name</term>
740 f69dab6d Iustin Pop
            <listitem>
741 f69dab6d Iustin Pop
              <simpara>the logical volume name</simpara>
742 f69dab6d Iustin Pop
            </listitem>
743 f69dab6d Iustin Pop
          </varlistentry>
744 f69dab6d Iustin Pop
          <varlistentry>
745 f69dab6d Iustin Pop
            <term>size</term>
746 f69dab6d Iustin Pop
            <listitem>
747 f69dab6d Iustin Pop
              <simpara>the logical volume size</simpara>
748 f69dab6d Iustin Pop
            </listitem>
749 f69dab6d Iustin Pop
          </varlistentry>
750 f69dab6d Iustin Pop
          <varlistentry>
751 f69dab6d Iustin Pop
            <term>instance</term>
752 f69dab6d Iustin Pop
            <listitem>
753 f69dab6d Iustin Pop
              <simpara>The name of the instance to which this volume
754 f69dab6d Iustin Pop
              belongs, or (in case it's an orphan volume) the
755 f69dab6d Iustin Pop
              character <quote>-</quote></simpara>
756 f69dab6d Iustin Pop
            </listitem>
757 f69dab6d Iustin Pop
          </varlistentry>
758 f69dab6d Iustin Pop
        </variablelist>
759 f69dab6d Iustin Pop
      </para>
760 f69dab6d Iustin Pop
761 f69dab6d Iustin Pop
      <para>
762 dcb93971 Michael Hanselmann
        Example:
763 dcb93971 Michael Hanselmann
        <screen>
764 dcb93971 Michael Hanselmann
# gnt-node volumes node5.example.com
765 dcb93971 Michael Hanselmann
Node              PhysDev   VG    Name                                 Size Instance
766 dcb93971 Michael Hanselmann
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
767 dcb93971 Michael Hanselmann
node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
768 dcb93971 Michael Hanselmann
        </screen>
769 dcb93971 Michael Hanselmann
      </para>
770 dcb93971 Michael Hanselmann
    </refsect2>
771 dcb93971 Michael Hanselmann
772 f5118ade Iustin Pop
    <refsect2>
773 9b94905f Iustin Pop
      <title>LIST-STORAGE</title>
774 4007f57d Michael Hanselmann
775 4007f57d Michael Hanselmann
      <cmdsynopsis>
776 9b94905f Iustin Pop
        <command>list-storage</command>
777 4007f57d Michael Hanselmann
        <arg>--no-headers</arg>
778 4007f57d Michael Hanselmann
        <arg>--human-readable</arg>
779 4007f57d Michael Hanselmann
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
780 53548798 Michael Hanselmann
        <arg>--storage-type=<replaceable>STORAGE_TYPE</replaceable></arg>
781 4007f57d Michael Hanselmann
        <arg>--output=<replaceable>FIELDS</replaceable></arg>
782 4007f57d Michael Hanselmann
        <sbr>
783 4007f57d Michael Hanselmann
        <arg rep="repeat"><replaceable>node</replaceable></arg>
784 4007f57d Michael Hanselmann
      </cmdsynopsis>
785 4007f57d Michael Hanselmann
786 4007f57d Michael Hanselmann
      <para>
787 9b94905f Iustin Pop
        Lists the available storage units and their details for the
788 9b94905f Iustin Pop
        given node(s).
789 4007f57d Michael Hanselmann
      </para>
790 4007f57d Michael Hanselmann
791 4007f57d Michael Hanselmann
      <para>
792 4007f57d Michael Hanselmann
        The <option>--no-headers</option> option will skip the initial header
793 4007f57d Michael Hanselmann
        line. The <option>--separator</option> option takes an argument which
794 4007f57d Michael Hanselmann
        denotes what will be used between the output fields. Both these options
795 4007f57d Michael Hanselmann
        are to help scripting.
796 4007f57d Michael Hanselmann
      </para>
797 4007f57d Michael Hanselmann
798 4007f57d Michael Hanselmann
      <para>
799 4007f57d Michael Hanselmann
        The units used to display the numeric values in the output varies,
800 4007f57d Michael Hanselmann
        depending on the options given. By default, the values will be
801 4007f57d Michael Hanselmann
        formatted in the most appropriate unit. If the
802 4007f57d Michael Hanselmann
        <option>--separator</option> option is given, then the values are shown
803 4007f57d Michael Hanselmann
        in mebibytes to allow parsing by scripts. In both cases, the
804 4007f57d Michael Hanselmann
        <option>--units</option> option can be used to enforce a given output
805 4007f57d Michael Hanselmann
        unit.
806 4007f57d Michael Hanselmann
      </para>
807 4007f57d Michael Hanselmann
808 4007f57d Michael Hanselmann
      <para>
809 53548798 Michael Hanselmann
        The <option>--storage-type</option> option can be used to choose a
810 53548798 Michael Hanselmann
        storage unit type. Possible choices are <literal>lvm-pv</literal>,
811 620a85fd Iustin Pop
        <literal>lvm-vg</literal> or <literal>file</literal>.
812 53548798 Michael Hanselmann
      </para>
813 53548798 Michael Hanselmann
814 53548798 Michael Hanselmann
      <para>
815 4007f57d Michael Hanselmann
        The <option>-o</option> option takes a comma-separated list of
816 4007f57d Michael Hanselmann
        output fields. The available fields and their meaning are:
817 4007f57d Michael Hanselmann
        <variablelist>
818 4007f57d Michael Hanselmann
          <varlistentry>
819 4007f57d Michael Hanselmann
            <term>node</term>
820 4007f57d Michael Hanselmann
            <listitem>
821 4007f57d Michael Hanselmann
              <simpara>the node name on which the volume exists</simpara>
822 4007f57d Michael Hanselmann
            </listitem>
823 4007f57d Michael Hanselmann
          </varlistentry>
824 4007f57d Michael Hanselmann
          <varlistentry>
825 620a85fd Iustin Pop
            <term>type</term>
826 620a85fd Iustin Pop
            <listitem>
827 620a85fd Iustin Pop
              <simpara>the type of the storage unit (currently just
828 620a85fd Iustin Pop
              what is passed in via
829 620a85fd Iustin Pop
              <option>--storage-type</option>)</simpara>
830 620a85fd Iustin Pop
            </listitem>
831 620a85fd Iustin Pop
          </varlistentry>
832 620a85fd Iustin Pop
          <varlistentry>
833 4007f57d Michael Hanselmann
            <term>name</term>
834 4007f57d Michael Hanselmann
            <listitem>
835 620a85fd Iustin Pop
              <simpara>the path/identifier of the storage unit</simpara>
836 4007f57d Michael Hanselmann
            </listitem>
837 4007f57d Michael Hanselmann
          </varlistentry>
838 4007f57d Michael Hanselmann
          <varlistentry>
839 4007f57d Michael Hanselmann
            <term>size</term>
840 4007f57d Michael Hanselmann
            <listitem>
841 53548798 Michael Hanselmann
              <simpara>
842 620a85fd Iustin Pop
                total size of the unit; for the file type see a note below
843 53548798 Michael Hanselmann
              </simpara>
844 4007f57d Michael Hanselmann
            </listitem>
845 4007f57d Michael Hanselmann
          </varlistentry>
846 4007f57d Michael Hanselmann
          <varlistentry>
847 4007f57d Michael Hanselmann
            <term>used</term>
848 4007f57d Michael Hanselmann
            <listitem>
849 53548798 Michael Hanselmann
              <simpara>
850 620a85fd Iustin Pop
                used space in the unit; for the file type see a note below
851 53548798 Michael Hanselmann
              </simpara>
852 4007f57d Michael Hanselmann
            </listitem>
853 4007f57d Michael Hanselmann
          </varlistentry>
854 4007f57d Michael Hanselmann
          <varlistentry>
855 4007f57d Michael Hanselmann
            <term>free</term>
856 4007f57d Michael Hanselmann
            <listitem>
857 53548798 Michael Hanselmann
              <simpara>
858 53548798 Michael Hanselmann
                available disk space
859 53548798 Michael Hanselmann
              </simpara>
860 4007f57d Michael Hanselmann
            </listitem>
861 4007f57d Michael Hanselmann
          </varlistentry>
862 4007f57d Michael Hanselmann
          <varlistentry>
863 4007f57d Michael Hanselmann
            <term>allocatable</term>
864 4007f57d Michael Hanselmann
            <listitem>
865 53548798 Michael Hanselmann
              <simpara>
866 620a85fd Iustin Pop
                whether we the unit is available for allocation
867 620a85fd Iustin Pop
                (only <literal>lvm-pv</literal> can change this
868 620a85fd Iustin Pop
                setting, the other types always report true)
869 53548798 Michael Hanselmann
              </simpara>
870 4007f57d Michael Hanselmann
            </listitem>
871 4007f57d Michael Hanselmann
          </varlistentry>
872 4007f57d Michael Hanselmann
        </variablelist>
873 4007f57d Michael Hanselmann
      </para>
874 4007f57d Michael Hanselmann
875 4007f57d Michael Hanselmann
      <para>
876 620a85fd Iustin Pop
        Note that for the <quote>file</quote> type, the total disk
877 620a85fd Iustin Pop
        space might not equal to the sum of used and free, due to the
878 620a85fd Iustin Pop
        method Ganeti uses to compute each of them. The total and free
879 620a85fd Iustin Pop
        values are computed as the total and free space values for the
880 620a85fd Iustin Pop
        filesystem to which the directory belongs, but the used space
881 620a85fd Iustin Pop
        is computed from the used space under that directory
882 620a85fd Iustin Pop
        <emphasis>only</emphasis>, which might not be necessarily the
883 620a85fd Iustin Pop
        root of the filesystem, and as such there could be files
884 620a85fd Iustin Pop
        outside the file storage directory using disk space and
885 620a85fd Iustin Pop
        causing a mismatch in the values.
886 620a85fd Iustin Pop
      </para>
887 620a85fd Iustin Pop
888 620a85fd Iustin Pop
      <para>
889 4007f57d Michael Hanselmann
        Example:
890 4007f57d Michael Hanselmann
        <screen>
891 620a85fd Iustin Pop
node1# gnt-node list-storage node2
892 620a85fd Iustin Pop
Node  Type   Name        Size Used   Free Allocatable
893 620a85fd Iustin Pop
node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y
894 620a85fd Iustin Pop
node2 lvm-pv /dev/sdb1 698.6G   0M 698.6G Y
895 4007f57d Michael Hanselmann
        </screen>
896 4007f57d Michael Hanselmann
      </para>
897 4007f57d Michael Hanselmann
    </refsect2>
898 4007f57d Michael Hanselmann
899 4007f57d Michael Hanselmann
    <refsect2>
900 9b94905f Iustin Pop
      <title>MODIFY-STORAGE</title>
901 0e89fc2d Michael Hanselmann
902 0e89fc2d Michael Hanselmann
      <cmdsynopsis>
903 9b94905f Iustin Pop
        <command>modify-storage</command>
904 0e89fc2d Michael Hanselmann
        <arg><option>--allocatable=yes|no</option></arg>
905 0e89fc2d Michael Hanselmann
        <sbr>
906 7e9c6a78 Iustin Pop
        <arg choice="req"><replaceable>node</replaceable></arg>
907 7e9c6a78 Iustin Pop
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
908 7e9c6a78 Iustin Pop
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
909 0e89fc2d Michael Hanselmann
      </cmdsynopsis>
910 0e89fc2d Michael Hanselmann
911 0e89fc2d Michael Hanselmann
      <para>
912 9b94905f Iustin Pop
        Modifies storage volumes on a node. Only LVM physical volumes
913 9b94905f Iustin Pop
        can be modified at the moment. They have a storage type
914 9b94905f Iustin Pop
        of <quote>lvm-pv</quote>.
915 0e89fc2d Michael Hanselmann
      </para>
916 0e89fc2d Michael Hanselmann
917 0e89fc2d Michael Hanselmann
      <para>
918 0e89fc2d Michael Hanselmann
        Example:
919 0e89fc2d Michael Hanselmann
        <screen>
920 9b94905f Iustin Pop
# gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
921 0e89fc2d Michael Hanselmann
        </screen>
922 0e89fc2d Michael Hanselmann
      </para>
923 0e89fc2d Michael Hanselmann
    </refsect2>
924 0e89fc2d Michael Hanselmann
925 0e89fc2d Michael Hanselmann
    <refsect2>
926 9b94905f Iustin Pop
      <title>REPAIR-STORAGE</title>
927 1e3463f1 Michael Hanselmann
928 1e3463f1 Michael Hanselmann
      <cmdsynopsis>
929 9b94905f Iustin Pop
        <command>repair-storage</command>
930 7e9c6a78 Iustin Pop
        <arg>--ignore-consistency</arg>
931 7e9c6a78 Iustin Pop
        <arg choice="req"><replaceable>node</replaceable></arg>
932 7e9c6a78 Iustin Pop
        <arg choice="req"><replaceable>storage-type</replaceable></arg>
933 7e9c6a78 Iustin Pop
        <arg choice="req"><replaceable>volume-name</replaceable></arg>
934 1e3463f1 Michael Hanselmann
      </cmdsynopsis>
935 1e3463f1 Michael Hanselmann
936 1e3463f1 Michael Hanselmann
      <para>
937 9b94905f Iustin Pop
        Repairs a storage volume on a node. Only LVM volume groups can
938 9b94905f Iustin Pop
        be repaired at this time. They have the storage type
939 1e3463f1 Michael Hanselmann
        <quote>lvm-vg</quote>.
940 1e3463f1 Michael Hanselmann
      </para>
941 1e3463f1 Michael Hanselmann
942 1e3463f1 Michael Hanselmann
      <para>
943 c71a1a3d Iustin Pop
        On LVM volume groups, <command>repair-storage</command> runs
944 1e3463f1 Michael Hanselmann
        <quote>vgreduce --removemissing</quote>.
945 1e3463f1 Michael Hanselmann
      </para>
946 1e3463f1 Michael Hanselmann
947 1e3463f1 Michael Hanselmann
      <caution>
948 1e3463f1 Michael Hanselmann
        <para>
949 1e3463f1 Michael Hanselmann
          Running this command can lead to data loss. Use it with care.
950 1e3463f1 Michael Hanselmann
        </para>
951 1e3463f1 Michael Hanselmann
      </caution>
952 1e3463f1 Michael Hanselmann
953 1e3463f1 Michael Hanselmann
      <para>
954 7e9c6a78 Iustin Pop
        The <option>--ignore-consistency</option> option will ignore
955 7e9c6a78 Iustin Pop
        any inconsistent disks (on the nodes paired with this
956 7e9c6a78 Iustin Pop
        one). Use of this option is most likely to lead to data-loss.
957 7e9c6a78 Iustin Pop
      </para>
958 7e9c6a78 Iustin Pop
959 7e9c6a78 Iustin Pop
      <para>
960 1e3463f1 Michael Hanselmann
        Example:
961 1e3463f1 Michael Hanselmann
        <screen>
962 9b94905f Iustin Pop
# gnt-node repair-storage node5.example.com lvm-vg xenvg
963 1e3463f1 Michael Hanselmann
        </screen>
964 1e3463f1 Michael Hanselmann
      </para>
965 1e3463f1 Michael Hanselmann
    </refsect2>
966 1e3463f1 Michael Hanselmann
967 1e3463f1 Michael Hanselmann
    <refsect2>
968 f5118ade Iustin Pop
      <title>POWERCYCLE</title>
969 f5118ade Iustin Pop
970 f5118ade Iustin Pop
      <cmdsynopsis>
971 f5118ade Iustin Pop
        <command>powercycle</command>
972 f5118ade Iustin Pop
        <arg><option>--confirm</option></arg>
973 f5118ade Iustin Pop
        <arg><option>--force</option></arg>
974 f5118ade Iustin Pop
        <arg choice="req"><replaceable>node</replaceable></arg>
975 f5118ade Iustin Pop
      </cmdsynopsis>
976 f5118ade Iustin Pop
977 f5118ade Iustin Pop
      <para>
978 f5118ade Iustin Pop
        This commands (tries to) forcefully reboot a node. It is a
979 f5118ade Iustin Pop
        command that can be used if the node environemnt is broken,
980 f5118ade Iustin Pop
        such that the admin can no longer login over ssh, but the
981 f5118ade Iustin Pop
        ganeti node daemon is still working.
982 f5118ade Iustin Pop
      </para>
983 f5118ade Iustin Pop
984 f5118ade Iustin Pop
      <para>
985 f5118ade Iustin Pop
        Note that this command is not guaranteed to work; it depends
986 f5118ade Iustin Pop
        on the hypervisor how effective is the reboot attempt. For
987 f5118ade Iustin Pop
        Linux, this command require that the kernel option
988 f5118ade Iustin Pop
        <literal>CONFIG_MAGIC_SYSRQ</literal> is enabled.
989 f5118ade Iustin Pop
      </para>
990 f5118ade Iustin Pop
991 f5118ade Iustin Pop
      <para>
992 f5118ade Iustin Pop
        The <option>--yes</option> option can be used to skip
993 f5118ade Iustin Pop
        confirmation, while the <option>--force</option> option is
994 f5118ade Iustin Pop
        needed if the target node is the master node.
995 f5118ade Iustin Pop
      </para>
996 f5118ade Iustin Pop
997 a8083063 Iustin Pop
  </refsect1>
998 a8083063 Iustin Pop
999 a8083063 Iustin Pop
  &footer;
1000 a8083063 Iustin Pop
1001 a8083063 Iustin Pop
</refentry>
1002 a8083063 Iustin Pop
1003 a8083063 Iustin Pop
<!-- Keep this comment at the end of the file
1004 a8083063 Iustin Pop
Local variables:
1005 a8083063 Iustin Pop
mode: sgml
1006 a8083063 Iustin Pop
sgml-omittag:t
1007 a8083063 Iustin Pop
sgml-shorttag:t
1008 a8083063 Iustin Pop
sgml-minimize-attributes:nil
1009 a8083063 Iustin Pop
sgml-always-quote-attributes:t
1010 a8083063 Iustin Pop
sgml-indent-step:2
1011 a8083063 Iustin Pop
sgml-indent-data:t
1012 a8083063 Iustin Pop
sgml-parent-document:nil
1013 a8083063 Iustin Pop
sgml-default-dtd-file:nil
1014 a8083063 Iustin Pop
sgml-exposed-tags:nil
1015 a8083063 Iustin Pop
sgml-local-catalogs:nil
1016 a8083063 Iustin Pop
sgml-local-ecat-files:nil
1017 a8083063 Iustin Pop
End:
1018 a8083063 Iustin Pop
-->