Statistics
| Branch: | Tag: | Revision:

root / man / gnt-node.rst @ f7b769b1

History | View | Annotate | Download (18 kB)

1 7db441e6 Iustin Pop
gnt-node(8) Ganeti | Version @GANETI_VERSION@
2 7db441e6 Iustin Pop
=============================================
3 7db441e6 Iustin Pop
4 7db441e6 Iustin Pop
Name
5 7db441e6 Iustin Pop
----
6 7db441e6 Iustin Pop
7 7db441e6 Iustin Pop
gnt-node - Node administration
8 7db441e6 Iustin Pop
9 7db441e6 Iustin Pop
Synopsis
10 7db441e6 Iustin Pop
--------
11 7db441e6 Iustin Pop
12 7db441e6 Iustin Pop
**gnt-node** {command} [arguments...]
13 7db441e6 Iustin Pop
14 7db441e6 Iustin Pop
DESCRIPTION
15 7db441e6 Iustin Pop
-----------
16 7db441e6 Iustin Pop
17 7db441e6 Iustin Pop
The **gnt-node** is used for managing the (physical) nodes in the
18 7db441e6 Iustin Pop
Ganeti system.
19 7db441e6 Iustin Pop
20 7db441e6 Iustin Pop
COMMANDS
21 7db441e6 Iustin Pop
--------
22 7db441e6 Iustin Pop
23 7db441e6 Iustin Pop
ADD
24 7db441e6 Iustin Pop
~~~
25 7db441e6 Iustin Pop
26 0a68e0ff Iustin Pop
| **add** [--readd] [{-s|--secondary-ip} *secondary\_ip*]
27 0a68e0ff Iustin Pop
| [{-g|--node-group} *nodegroup*]
28 4e37f591 René Nussbaumer
| [--master-capable=``yes|no``] [--vm-capable=``yes|no``]
29 4e37f591 René Nussbaumer
| [--node-parameters *ndparams*]
30 4e37f591 René Nussbaumer
| {*nodename*}
31 7db441e6 Iustin Pop
32 7db441e6 Iustin Pop
Adds the given node to the cluster.
33 7db441e6 Iustin Pop
34 7db441e6 Iustin Pop
This command is used to join a new node to the cluster. You will
35 7db441e6 Iustin Pop
have to provide the password for root of the node to be able to add
36 7db441e6 Iustin Pop
the node in the cluster. The command needs to be run on the Ganeti
37 7db441e6 Iustin Pop
master.
38 7db441e6 Iustin Pop
39 7db441e6 Iustin Pop
Note that the command is potentially destructive, as it will
40 7db441e6 Iustin Pop
forcibly join the specified host the cluster, not paying attention
41 7db441e6 Iustin Pop
to its current status (it could be already in a cluster, etc.)
42 7db441e6 Iustin Pop
43 0a68e0ff Iustin Pop
The ``-s (--secondary-ip)`` is used in dual-home clusters and
44 0a68e0ff Iustin Pop
specifies the new node's IP in the secondary network. See the
45 0a68e0ff Iustin Pop
discussion in **gnt-cluster**(8) for more information.
46 7db441e6 Iustin Pop
47 7db441e6 Iustin Pop
In case you're readding a node after hardware failure, you can use
48 7db441e6 Iustin Pop
the ``--readd`` parameter. In this case, you don't need to pass the
49 7db441e6 Iustin Pop
secondary IP again, it will reused from the cluster. Also, the
50 7db441e6 Iustin Pop
drained and offline flags of the node will be cleared before
51 7db441e6 Iustin Pop
re-adding it.
52 7db441e6 Iustin Pop
53 61413377 Stephen Shirley
The ``--force-join`` option is to proceed with adding a node even if it already
54 61413377 Stephen Shirley
appears to belong to another cluster. This is used during cluster merging, for
55 61413377 Stephen Shirley
example.
56 61413377 Stephen Shirley
57 0a68e0ff Iustin Pop
The ``-g (--node-group)`` option is used to add the new node into a
58 0a68e0ff Iustin Pop
specific node group, specified by UUID or name. If only one node group
59 0a68e0ff Iustin Pop
exists you can skip this option, otherwise it's mandatory.
60 7db441e6 Iustin Pop
61 4e37f591 René Nussbaumer
The ``vm_capable``, ``master_capable`` and ``ndparams`` options are
62 4e37f591 René Nussbaumer
described in **ganeti**(7), and are used to set the properties of the
63 4e37f591 René Nussbaumer
new node.
64 7db441e6 Iustin Pop
65 7db441e6 Iustin Pop
Example::
66 7db441e6 Iustin Pop
67 7db441e6 Iustin Pop
    # gnt-node add node5.example.com
68 7db441e6 Iustin Pop
    # gnt-node add -s 192.0.2.5 node5.example.com
69 7db441e6 Iustin Pop
    # gnt-node add -g group2 -s 192.0.2.9 node9.group2.example.com
70 7db441e6 Iustin Pop
71 7db441e6 Iustin Pop
72 7db441e6 Iustin Pop
ADD-TAGS
73 7db441e6 Iustin Pop
~~~~~~~~
74 7db441e6 Iustin Pop
75 7db441e6 Iustin Pop
**add-tags** [--from *file*] {*nodename*} {*tag*...}
76 7db441e6 Iustin Pop
77 7db441e6 Iustin Pop
Add tags to the given node. If any of the tags contains invalid
78 7db441e6 Iustin Pop
characters, the entire operation will abort.
79 7db441e6 Iustin Pop
80 7db441e6 Iustin Pop
If the ``--from`` option is given, the list of tags will be
81 7db441e6 Iustin Pop
extended with the contents of that file (each line becomes a tag).
82 7db441e6 Iustin Pop
In this case, there is not need to pass tags on the command line
83 7db441e6 Iustin Pop
(if you do, both sources will be used). A file name of - will be
84 7db441e6 Iustin Pop
interpreted as stdin.
85 7db441e6 Iustin Pop
86 7db441e6 Iustin Pop
EVACUATE
87 7db441e6 Iustin Pop
~~~~~~~~
88 7db441e6 Iustin Pop
89 7db441e6 Iustin Pop
**evacuate** [-f] [--early-release] [--iallocator *NAME* \|
90 7db441e6 Iustin Pop
--new-secondary *destination\_node*] {*node*...}
91 7db441e6 Iustin Pop
92 7db441e6 Iustin Pop
This command will move all secondary instances away from the given
93 7db441e6 Iustin Pop
node(s). It works only for instances having a drbd disk template.
94 7db441e6 Iustin Pop
95 7db441e6 Iustin Pop
The new location for the instances can be specified in two ways:
96 7db441e6 Iustin Pop
97 0a68e0ff Iustin Pop
- as a single node for all instances, via the ``-n (--new-secondary)``
98 7db441e6 Iustin Pop
  option
99 7db441e6 Iustin Pop
100 0a68e0ff Iustin Pop
- or via the ``-I (--iallocator)`` option, giving a script name as
101 7db441e6 Iustin Pop
  parameter, so each instance will be in turn placed on the (per the
102 7db441e6 Iustin Pop
  script) optimal node
103 7db441e6 Iustin Pop
104 7db441e6 Iustin Pop
105 7db441e6 Iustin Pop
The ``--early-release`` changes the code so that the old storage on
106 7db441e6 Iustin Pop
node being evacuated is removed early (before the resync is
107 7db441e6 Iustin Pop
completed) and the internal Ganeti locks are also released for both
108 7db441e6 Iustin Pop
the current secondary and the new secondary, thus allowing more
109 7db441e6 Iustin Pop
parallelism in the cluster operation. This should be used only when
110 7db441e6 Iustin Pop
recovering from a disk failure on the current secondary (thus the
111 7db441e6 Iustin Pop
old storage is already broken) or when the storage on the primary
112 7db441e6 Iustin Pop
node is known to be fine (thus we won't need the old storage for
113 7db441e6 Iustin Pop
potential recovery).
114 7db441e6 Iustin Pop
115 7db441e6 Iustin Pop
Example::
116 7db441e6 Iustin Pop
117 0a68e0ff Iustin Pop
    # gnt-node evacuate -I hail node3.example.com
118 7db441e6 Iustin Pop
119 7db441e6 Iustin Pop
120 7db441e6 Iustin Pop
FAILOVER
121 7db441e6 Iustin Pop
~~~~~~~~
122 7db441e6 Iustin Pop
123 7db441e6 Iustin Pop
**failover** [-f] [--ignore-consistency] {*node*}
124 7db441e6 Iustin Pop
125 7db441e6 Iustin Pop
This command will fail over all instances having the given node as
126 7db441e6 Iustin Pop
primary to their secondary nodes. This works only for instances having
127 7db441e6 Iustin Pop
a drbd disk template.
128 7db441e6 Iustin Pop
129 7db441e6 Iustin Pop
Normally the failover will check the consistency of the disks before
130 7db441e6 Iustin Pop
failing over the instance. If you are trying to migrate instances off
131 7db441e6 Iustin Pop
a dead node, this will fail. Use the ``--ignore-consistency`` option
132 7db441e6 Iustin Pop
for this purpose.
133 7db441e6 Iustin Pop
134 7db441e6 Iustin Pop
Example::
135 7db441e6 Iustin Pop
136 7db441e6 Iustin Pop
    # gnt-node failover node1.example.com
137 7db441e6 Iustin Pop
138 7db441e6 Iustin Pop
139 7db441e6 Iustin Pop
INFO
140 7db441e6 Iustin Pop
~~~~
141 7db441e6 Iustin Pop
142 7db441e6 Iustin Pop
**info** [*node*...]
143 7db441e6 Iustin Pop
144 7db441e6 Iustin Pop
Show detailed information about the nodes in the cluster. If you
145 7db441e6 Iustin Pop
don't give any arguments, all nodes will be shows, otherwise the
146 7db441e6 Iustin Pop
output will be restricted to the given names.
147 7db441e6 Iustin Pop
148 7db441e6 Iustin Pop
LIST
149 7db441e6 Iustin Pop
~~~~
150 7db441e6 Iustin Pop
151 7f5443a0 Michael Hanselmann
| **list**
152 7db441e6 Iustin Pop
| [--no-headers] [--separator=*SEPARATOR*]
153 0a68e0ff Iustin Pop
| [--units=*UNITS*] [-v] [{-o|--output} *[+]FIELD,...*]
154 7db441e6 Iustin Pop
| [node...]
155 7db441e6 Iustin Pop
156 7db441e6 Iustin Pop
Lists the nodes in the cluster.
157 7db441e6 Iustin Pop
158 7db441e6 Iustin Pop
The ``--no-headers`` option will skip the initial header line. The
159 7db441e6 Iustin Pop
``--separator`` option takes an argument which denotes what will be
160 7db441e6 Iustin Pop
used between the output fields. Both these options are to help
161 7db441e6 Iustin Pop
scripting.
162 7db441e6 Iustin Pop
163 7db441e6 Iustin Pop
The units used to display the numeric values in the output varies,
164 7db441e6 Iustin Pop
depending on the options given. By default, the values will be
165 7db441e6 Iustin Pop
formatted in the most appropriate unit. If the ``--separator``
166 7db441e6 Iustin Pop
option is given, then the values are shown in mebibytes to allow
167 7db441e6 Iustin Pop
parsing by scripts. In both cases, the ``--units`` option can be
168 7db441e6 Iustin Pop
used to enforce a given output unit.
169 7db441e6 Iustin Pop
170 7f5443a0 Michael Hanselmann
Queries of nodes will be done in parallel with any running jobs. This might
171 7f5443a0 Michael Hanselmann
give inconsistent results for the free disk/memory.
172 7db441e6 Iustin Pop
173 f0b1bafe Iustin Pop
The ``-v`` option activates verbose mode, which changes the display of
174 f0b1bafe Iustin Pop
special field states (see **ganeti(7)**).
175 f0b1bafe Iustin Pop
176 0a68e0ff Iustin Pop
The ``-o (--output)`` option takes a comma-separated list of output
177 0a68e0ff Iustin Pop
fields. The available fields and their meaning are:
178 7db441e6 Iustin Pop
179 7db441e6 Iustin Pop
180 7db441e6 Iustin Pop
name
181 7db441e6 Iustin Pop
    the node name
182 7db441e6 Iustin Pop
183 7db441e6 Iustin Pop
pinst_cnt
184 7db441e6 Iustin Pop
    the number of instances having this node as primary
185 7db441e6 Iustin Pop
186 7db441e6 Iustin Pop
pinst_list
187 7db441e6 Iustin Pop
    the list of instances having this node as primary, comma separated
188 7db441e6 Iustin Pop
189 7db441e6 Iustin Pop
sinst_cnt
190 7db441e6 Iustin Pop
    the number of instances having this node as a secondary node
191 7db441e6 Iustin Pop
192 7db441e6 Iustin Pop
sinst_list
193 7db441e6 Iustin Pop
    the list of instances having this node as a secondary node, comma
194 7db441e6 Iustin Pop
    separated
195 7db441e6 Iustin Pop
196 7db441e6 Iustin Pop
pip
197 7db441e6 Iustin Pop
    the primary ip of this node (used for cluster communication)
198 7db441e6 Iustin Pop
199 7db441e6 Iustin Pop
sip
200 7db441e6 Iustin Pop
    the secondary ip of this node (used for data replication in dual-ip
201 7db441e6 Iustin Pop
    clusters, see gnt-cluster(8)
202 7db441e6 Iustin Pop
203 7db441e6 Iustin Pop
dtotal
204 7db441e6 Iustin Pop
    total disk space in the volume group used for instance disk
205 7db441e6 Iustin Pop
    allocations
206 7db441e6 Iustin Pop
207 7db441e6 Iustin Pop
dfree
208 7db441e6 Iustin Pop
    available disk space in the volume group
209 7db441e6 Iustin Pop
210 7db441e6 Iustin Pop
mtotal
211 7db441e6 Iustin Pop
    total memory on the physical node
212 7db441e6 Iustin Pop
213 7db441e6 Iustin Pop
mnode
214 7db441e6 Iustin Pop
    the memory used by the node itself
215 7db441e6 Iustin Pop
216 7db441e6 Iustin Pop
mfree
217 7db441e6 Iustin Pop
    memory available for instance allocations
218 7db441e6 Iustin Pop
219 7db441e6 Iustin Pop
bootid
220 7db441e6 Iustin Pop
    the node bootid value; this is a linux specific feature that
221 7db441e6 Iustin Pop
    assigns a new UUID to the node at each boot and can be use to
222 7db441e6 Iustin Pop
    detect node reboots (by tracking changes in this value)
223 7db441e6 Iustin Pop
224 7db441e6 Iustin Pop
tags
225 7db441e6 Iustin Pop
    comma-separated list of the node's tags
226 7db441e6 Iustin Pop
227 7db441e6 Iustin Pop
serial_no
228 7db441e6 Iustin Pop
    the so called 'serial number' of the node; this is a numeric field
229 7db441e6 Iustin Pop
    that is incremented each time the node is modified, and it can be
230 7db441e6 Iustin Pop
    used to detect modifications
231 7db441e6 Iustin Pop
232 7db441e6 Iustin Pop
ctime
233 7db441e6 Iustin Pop
    the creation time of the node; note that this field contains spaces
234 7db441e6 Iustin Pop
    and as such it's harder to parse
235 7db441e6 Iustin Pop
236 7db441e6 Iustin Pop
    if this attribute is not present (e.g. when upgrading from older
237 7db441e6 Iustin Pop
    versions), then "N/A" will be shown instead
238 7db441e6 Iustin Pop
239 7db441e6 Iustin Pop
mtime
240 7db441e6 Iustin Pop
    the last modification time of the node; note that this field
241 7db441e6 Iustin Pop
    contains spaces and as such it's harder to parse
242 7db441e6 Iustin Pop
243 7db441e6 Iustin Pop
    if this attribute is not present (e.g. when upgrading from older
244 7db441e6 Iustin Pop
    versions), then "N/A" will be shown instead
245 7db441e6 Iustin Pop
246 7db441e6 Iustin Pop
uuid
247 7db441e6 Iustin Pop
    Show the UUID of the node (generated automatically by Ganeti)
248 7db441e6 Iustin Pop
249 7db441e6 Iustin Pop
ctotal
250 7db441e6 Iustin Pop
    the toal number of logical processors
251 7db441e6 Iustin Pop
252 7db441e6 Iustin Pop
cnodes
253 7db441e6 Iustin Pop
    the number of NUMA domains on the node, if the hypervisor can
254 7db441e6 Iustin Pop
    export this information
255 7db441e6 Iustin Pop
256 7db441e6 Iustin Pop
csockets
257 7db441e6 Iustin Pop
    the number of physical CPU sockets, if the hypervisor can export
258 7db441e6 Iustin Pop
    this information
259 7db441e6 Iustin Pop
260 7db441e6 Iustin Pop
master_candidate
261 7db441e6 Iustin Pop
    whether the node is a master candidate or not
262 7db441e6 Iustin Pop
263 7db441e6 Iustin Pop
drained
264 7db441e6 Iustin Pop
    whether the node is drained or not; the cluster still communicates
265 7db441e6 Iustin Pop
    with drained nodes but excludes them from allocation operations
266 7db441e6 Iustin Pop
267 7db441e6 Iustin Pop
offline
268 7db441e6 Iustin Pop
    whether the node is offline or not; if offline, the cluster does
269 7db441e6 Iustin Pop
    not communicate with offline nodes; useful for nodes that are not
270 7db441e6 Iustin Pop
    reachable in order to avoid delays
271 7db441e6 Iustin Pop
272 7db441e6 Iustin Pop
role
273 7db441e6 Iustin Pop
    A condensed version of the node flags; this field will output a
274 7db441e6 Iustin Pop
    one-character field, with the following possible values:
275 7db441e6 Iustin Pop
276 7db441e6 Iustin Pop
    - *M* for the master node
277 7db441e6 Iustin Pop
278 7db441e6 Iustin Pop
    - *C* for a master candidate
279 7db441e6 Iustin Pop
280 7db441e6 Iustin Pop
    - *R* for a regular node
281 7db441e6 Iustin Pop
282 7db441e6 Iustin Pop
    - *D* for a drained node
283 7db441e6 Iustin Pop
284 7db441e6 Iustin Pop
    - *O* for an offline node
285 7db441e6 Iustin Pop
286 7db441e6 Iustin Pop
master_capable
287 7db441e6 Iustin Pop
    whether the node can become a master candidate
288 7db441e6 Iustin Pop
289 7db441e6 Iustin Pop
vm_capable
290 7db441e6 Iustin Pop
    whether the node can host instances
291 7db441e6 Iustin Pop
292 7db441e6 Iustin Pop
group
293 7db441e6 Iustin Pop
    the name of the node's group, if known (the query is done without
294 7db441e6 Iustin Pop
    locking, so data consistency is not guaranteed)
295 7db441e6 Iustin Pop
296 7db441e6 Iustin Pop
group.uuid
297 7db441e6 Iustin Pop
    the UUID of the node's group
298 7db441e6 Iustin Pop
299 7db441e6 Iustin Pop
300 7db441e6 Iustin Pop
If the value of the option starts with the character ``+``, the new
301 f7b769b1 Iustin Pop
fields will be added to the default list. This allows one to quickly
302 7db441e6 Iustin Pop
see the default list plus a few other fields, instead of retyping
303 7db441e6 Iustin Pop
the entire list of fields.
304 7db441e6 Iustin Pop
305 7db441e6 Iustin Pop
Note that some of this fields are known from the configuration of
306 7db441e6 Iustin Pop
the cluster (e.g. name, pinst, sinst, pip, sip and thus the master
307 7db441e6 Iustin Pop
does not need to contact the node for this data (making the listing
308 7db441e6 Iustin Pop
fast if only fields from this set are selected), whereas the other
309 7db441e6 Iustin Pop
fields are "live" fields and we need to make a query to the cluster
310 7db441e6 Iustin Pop
nodes.
311 7db441e6 Iustin Pop
312 7db441e6 Iustin Pop
Depending on the virtualization type and implementation details,
313 7db441e6 Iustin Pop
the mtotal, mnode and mfree may have slighly varying meanings. For
314 7db441e6 Iustin Pop
example, some solutions share the node memory with the pool of
315 7db441e6 Iustin Pop
memory used for instances (KVM), whereas others have separate
316 7db441e6 Iustin Pop
memory for the node and for the instances (Xen).
317 7db441e6 Iustin Pop
318 7db441e6 Iustin Pop
If no node names are given, then all nodes are queried. Otherwise,
319 7db441e6 Iustin Pop
only the given nodes will be listed.
320 7db441e6 Iustin Pop
321 7f5443a0 Michael Hanselmann
322 7f5443a0 Michael Hanselmann
LIST-FIELDS
323 7f5443a0 Michael Hanselmann
~~~~~~~~~~~
324 7f5443a0 Michael Hanselmann
325 7f5443a0 Michael Hanselmann
**list-fields** [field...]
326 7f5443a0 Michael Hanselmann
327 7f5443a0 Michael Hanselmann
Lists available fields for nodes.
328 7f5443a0 Michael Hanselmann
329 7f5443a0 Michael Hanselmann
330 7db441e6 Iustin Pop
LIST-TAGS
331 7db441e6 Iustin Pop
~~~~~~~~~
332 7db441e6 Iustin Pop
333 7db441e6 Iustin Pop
**list-tags** {*nodename*}
334 7db441e6 Iustin Pop
335 7db441e6 Iustin Pop
List the tags of the given node.
336 7db441e6 Iustin Pop
337 7db441e6 Iustin Pop
MIGRATE
338 7db441e6 Iustin Pop
~~~~~~~
339 7db441e6 Iustin Pop
340 7db441e6 Iustin Pop
**migrate** [-f] [--non-live] [--migration-mode=live\|non-live]
341 7db441e6 Iustin Pop
{*node*}
342 7db441e6 Iustin Pop
343 7db441e6 Iustin Pop
This command will migrate all instances having the given node as
344 7db441e6 Iustin Pop
primary to their secondary nodes. This works only for instances
345 7db441e6 Iustin Pop
having a drbd disk template.
346 7db441e6 Iustin Pop
347 7db441e6 Iustin Pop
As for the **gnt-instance migrate** command, the options
348 7db441e6 Iustin Pop
``--no-live`` and ``--migration-mode`` can be given to influence
349 7db441e6 Iustin Pop
the migration type.
350 7db441e6 Iustin Pop
351 7db441e6 Iustin Pop
Example::
352 7db441e6 Iustin Pop
353 7db441e6 Iustin Pop
    # gnt-node migrate node1.example.com
354 7db441e6 Iustin Pop
355 7db441e6 Iustin Pop
356 7db441e6 Iustin Pop
MODIFY
357 7db441e6 Iustin Pop
~~~~~~
358 7db441e6 Iustin Pop
359 7db441e6 Iustin Pop
| **modify** [-f] [--submit]
360 0a68e0ff Iustin Pop
| [{-C|--master-candidate} ``yes|no``]
361 0a68e0ff Iustin Pop
| [{-D|--drained} ``yes|no``] [{-O|--offline} ``yes|no``]
362 7db441e6 Iustin Pop
| [--master-capable=``yes|no``] [--vm-capable=``yes|no``] [--auto-promote]
363 0a68e0ff Iustin Pop
| [{-s|--secondary-ip} *secondary_ip*]
364 4e37f591 René Nussbaumer
| [--node-parameters *ndparams*]
365 dd94e9f6 René Nussbaumer
| [--node-powered=``yes|no``]
366 7db441e6 Iustin Pop
| {*node*}
367 7db441e6 Iustin Pop
368 7db441e6 Iustin Pop
This command changes the role of the node. Each options takes
369 7db441e6 Iustin Pop
either a literal yes or no, and only one option should be given as
370 7db441e6 Iustin Pop
yes. The meaning of the roles and flags are described in the
371 7db441e6 Iustin Pop
manpage **ganeti**(7).
372 7db441e6 Iustin Pop
373 0a68e0ff Iustin Pop
The option ``--node-powered`` can be used to modify state-of-record if
374 0a68e0ff Iustin Pop
it doesn't reflect the reality anymore.
375 dd94e9f6 René Nussbaumer
376 7db441e6 Iustin Pop
In case a node is demoted from the master candidate role, the
377 7db441e6 Iustin Pop
operation will be refused unless you pass the ``--auto-promote``
378 7db441e6 Iustin Pop
option. This option will cause the operation to lock all cluster nodes
379 7db441e6 Iustin Pop
(thus it will not be able to run in parallel with most other jobs),
380 7db441e6 Iustin Pop
but it allows automated maintenance of the cluster candidate pool. If
381 7db441e6 Iustin Pop
locking all cluster node is too expensive, another option is to
382 7db441e6 Iustin Pop
promote manually another node to master candidate before demoting the
383 7db441e6 Iustin Pop
current one.
384 7db441e6 Iustin Pop
385 7db441e6 Iustin Pop
Example (setting a node offline, which will demote it from master
386 7db441e6 Iustin Pop
candidate role if is in that role)::
387 7db441e6 Iustin Pop
388 7db441e6 Iustin Pop
    # gnt-node modify --offline=yes node1.example.com
389 7db441e6 Iustin Pop
390 0a68e0ff Iustin Pop
The ``-s (--secondary-ip)`` option can be used to change the node's
391 0a68e0ff Iustin Pop
secondary ip. No drbd instances can be running on the node, while this
392 0a68e0ff Iustin Pop
operation is taking place.
393 7db441e6 Iustin Pop
394 7db441e6 Iustin Pop
Example (setting the node back to online and master candidate)::
395 7db441e6 Iustin Pop
396 7db441e6 Iustin Pop
    # gnt-node modify --offline=no --master-candidate=yes node1.example.com
397 7db441e6 Iustin Pop
398 7db441e6 Iustin Pop
399 7db441e6 Iustin Pop
REMOVE
400 7db441e6 Iustin Pop
~~~~~~
401 7db441e6 Iustin Pop
402 7db441e6 Iustin Pop
**remove** {*nodename*}
403 7db441e6 Iustin Pop
404 7db441e6 Iustin Pop
Removes a node from the cluster. Instances must be removed or
405 7db441e6 Iustin Pop
migrated to another cluster before.
406 7db441e6 Iustin Pop
407 7db441e6 Iustin Pop
Example::
408 7db441e6 Iustin Pop
409 7db441e6 Iustin Pop
    # gnt-node remove node5.example.com
410 7db441e6 Iustin Pop
411 7db441e6 Iustin Pop
412 7db441e6 Iustin Pop
REMOVE-TAGS
413 7db441e6 Iustin Pop
~~~~~~~~~~~
414 7db441e6 Iustin Pop
415 7db441e6 Iustin Pop
**remove-tags** [--from *file*] {*nodename*} {*tag*...}
416 7db441e6 Iustin Pop
417 7db441e6 Iustin Pop
Remove tags from the given node. If any of the tags are not
418 7db441e6 Iustin Pop
existing on the node, the entire operation will abort.
419 7db441e6 Iustin Pop
420 7db441e6 Iustin Pop
If the ``--from`` option is given, the list of tags to be removed will
421 7db441e6 Iustin Pop
be extended with the contents of that file (each line becomes a tag).
422 7db441e6 Iustin Pop
In this case, there is not need to pass tags on the command line (if
423 7db441e6 Iustin Pop
you do, tags from both sources will be removed). A file name of - will
424 7db441e6 Iustin Pop
be interpreted as stdin.
425 7db441e6 Iustin Pop
426 7db441e6 Iustin Pop
VOLUMES
427 7db441e6 Iustin Pop
~~~~~~~
428 7db441e6 Iustin Pop
429 7db441e6 Iustin Pop
| **volumes** [--no-headers] [--human-readable]
430 0a68e0ff Iustin Pop
| [--separator=*SEPARATOR*] [{-o|--output} *FIELDS*]
431 7db441e6 Iustin Pop
| [*node*...]
432 7db441e6 Iustin Pop
433 7db441e6 Iustin Pop
Lists all logical volumes and their physical disks from the node(s)
434 7db441e6 Iustin Pop
provided.
435 7db441e6 Iustin Pop
436 7db441e6 Iustin Pop
The ``--no-headers`` option will skip the initial header line. The
437 7db441e6 Iustin Pop
``--separator`` option takes an argument which denotes what will be
438 7db441e6 Iustin Pop
used between the output fields. Both these options are to help
439 7db441e6 Iustin Pop
scripting.
440 7db441e6 Iustin Pop
441 7db441e6 Iustin Pop
The units used to display the numeric values in the output varies,
442 7db441e6 Iustin Pop
depending on the options given. By default, the values will be
443 7db441e6 Iustin Pop
formatted in the most appropriate unit. If the ``--separator``
444 7db441e6 Iustin Pop
option is given, then the values are shown in mebibytes to allow
445 7db441e6 Iustin Pop
parsing by scripts. In both cases, the ``--units`` option can be
446 7db441e6 Iustin Pop
used to enforce a given output unit.
447 7db441e6 Iustin Pop
448 0a68e0ff Iustin Pop
The ``-o (--output)`` option takes a comma-separated list of output
449 0a68e0ff Iustin Pop
fields. The available fields and their meaning are:
450 7db441e6 Iustin Pop
451 7db441e6 Iustin Pop
node
452 7db441e6 Iustin Pop
    the node name on which the volume exists
453 7db441e6 Iustin Pop
454 7db441e6 Iustin Pop
phys
455 7db441e6 Iustin Pop
    the physical drive (on which the LVM physical volume lives)
456 7db441e6 Iustin Pop
457 7db441e6 Iustin Pop
vg
458 7db441e6 Iustin Pop
    the volume group name
459 7db441e6 Iustin Pop
460 7db441e6 Iustin Pop
name
461 7db441e6 Iustin Pop
    the logical volume name
462 7db441e6 Iustin Pop
463 7db441e6 Iustin Pop
size
464 7db441e6 Iustin Pop
    the logical volume size
465 7db441e6 Iustin Pop
466 7db441e6 Iustin Pop
instance
467 7db441e6 Iustin Pop
    The name of the instance to which this volume belongs, or (in case
468 7db441e6 Iustin Pop
    it's an orphan volume) the character "-"
469 7db441e6 Iustin Pop
470 7db441e6 Iustin Pop
471 7db441e6 Iustin Pop
Example::
472 7db441e6 Iustin Pop
473 7db441e6 Iustin Pop
    # gnt-node volumes node5.example.com
474 7db441e6 Iustin Pop
    Node              PhysDev   VG    Name                                 Size Instance
475 7db441e6 Iustin Pop
    node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11000.meta 128  instance1.example.com
476 7db441e6 Iustin Pop
    node1.example.com /dev/hdc1 xenvg instance1.example.com-sda_11001.data 256  instance1.example.com
477 7db441e6 Iustin Pop
478 7db441e6 Iustin Pop
479 7db441e6 Iustin Pop
LIST-STORAGE
480 7db441e6 Iustin Pop
~~~~~~~~~~~~
481 7db441e6 Iustin Pop
482 7db441e6 Iustin Pop
| **list-storage** [--no-headers] [--human-readable]
483 7db441e6 Iustin Pop
| [--separator=*SEPARATOR*] [--storage-type=*STORAGE\_TYPE*]
484 0a68e0ff Iustin Pop
| [{-o|--output} *FIELDS*]
485 7db441e6 Iustin Pop
| [*node*...]
486 7db441e6 Iustin Pop
487 7db441e6 Iustin Pop
Lists the available storage units and their details for the given
488 7db441e6 Iustin Pop
node(s).
489 7db441e6 Iustin Pop
490 7db441e6 Iustin Pop
The ``--no-headers`` option will skip the initial header line. The
491 7db441e6 Iustin Pop
``--separator`` option takes an argument which denotes what will be
492 7db441e6 Iustin Pop
used between the output fields. Both these options are to help
493 7db441e6 Iustin Pop
scripting.
494 7db441e6 Iustin Pop
495 7db441e6 Iustin Pop
The units used to display the numeric values in the output varies,
496 7db441e6 Iustin Pop
depending on the options given. By default, the values will be
497 7db441e6 Iustin Pop
formatted in the most appropriate unit. If the ``--separator``
498 7db441e6 Iustin Pop
option is given, then the values are shown in mebibytes to allow
499 7db441e6 Iustin Pop
parsing by scripts. In both cases, the ``--units`` option can be
500 7db441e6 Iustin Pop
used to enforce a given output unit.
501 7db441e6 Iustin Pop
502 7db441e6 Iustin Pop
The ``--storage-type`` option can be used to choose a storage unit
503 7db441e6 Iustin Pop
type. Possible choices are lvm-pv, lvm-vg or file.
504 7db441e6 Iustin Pop
505 0a68e0ff Iustin Pop
The ``-o (--output)`` option takes a comma-separated list of output
506 0a68e0ff Iustin Pop
fields. The available fields and their meaning are:
507 7db441e6 Iustin Pop
508 7db441e6 Iustin Pop
node
509 7db441e6 Iustin Pop
    the node name on which the volume exists
510 7db441e6 Iustin Pop
511 7db441e6 Iustin Pop
type
512 7db441e6 Iustin Pop
    the type of the storage unit (currently just what is passed in via
513 7db441e6 Iustin Pop
    ``--storage-type``)
514 7db441e6 Iustin Pop
515 7db441e6 Iustin Pop
name
516 7db441e6 Iustin Pop
    the path/identifier of the storage unit
517 7db441e6 Iustin Pop
518 7db441e6 Iustin Pop
size
519 7db441e6 Iustin Pop
    total size of the unit; for the file type see a note below
520 7db441e6 Iustin Pop
521 7db441e6 Iustin Pop
used
522 7db441e6 Iustin Pop
    used space in the unit; for the file type see a note below
523 7db441e6 Iustin Pop
524 7db441e6 Iustin Pop
free
525 7db441e6 Iustin Pop
    available disk space
526 7db441e6 Iustin Pop
527 7db441e6 Iustin Pop
allocatable
528 7db441e6 Iustin Pop
    whether we the unit is available for allocation (only lvm-pv can
529 7db441e6 Iustin Pop
    change this setting, the other types always report true)
530 7db441e6 Iustin Pop
531 7db441e6 Iustin Pop
532 7db441e6 Iustin Pop
Note that for the "file" type, the total disk space might not equal
533 7db441e6 Iustin Pop
to the sum of used and free, due to the method Ganeti uses to
534 7db441e6 Iustin Pop
compute each of them. The total and free values are computed as the
535 7db441e6 Iustin Pop
total and free space values for the filesystem to which the
536 7db441e6 Iustin Pop
directory belongs, but the used space is computed from the used
537 7db441e6 Iustin Pop
space under that directory *only*, which might not be necessarily
538 7db441e6 Iustin Pop
the root of the filesystem, and as such there could be files
539 7db441e6 Iustin Pop
outside the file storage directory using disk space and causing a
540 7db441e6 Iustin Pop
mismatch in the values.
541 7db441e6 Iustin Pop
542 7db441e6 Iustin Pop
Example::
543 7db441e6 Iustin Pop
544 7db441e6 Iustin Pop
    node1# gnt-node list-storage node2
545 7db441e6 Iustin Pop
    Node  Type   Name        Size Used   Free Allocatable
546 7db441e6 Iustin Pop
    node2 lvm-pv /dev/sda7 673.8G 1.5G 672.3G Y
547 7db441e6 Iustin Pop
    node2 lvm-pv /dev/sdb1 698.6G   0M 698.6G Y
548 7db441e6 Iustin Pop
549 7db441e6 Iustin Pop
550 7db441e6 Iustin Pop
MODIFY-STORAGE
551 7db441e6 Iustin Pop
~~~~~~~~~~~~~~
552 7db441e6 Iustin Pop
553 7db441e6 Iustin Pop
**modify-storage** [``--allocatable=yes|no``]
554 7db441e6 Iustin Pop
{*node*} {*storage-type*} {*volume-name*}
555 7db441e6 Iustin Pop
556 7db441e6 Iustin Pop
Modifies storage volumes on a node. Only LVM physical volumes can
557 7db441e6 Iustin Pop
be modified at the moment. They have a storage type of "lvm-pv".
558 7db441e6 Iustin Pop
559 7db441e6 Iustin Pop
Example::
560 7db441e6 Iustin Pop
561 7db441e6 Iustin Pop
    # gnt-node modify-storage --allocatable no node5.example.com lvm-pv /dev/sdb1
562 7db441e6 Iustin Pop
563 7db441e6 Iustin Pop
564 7db441e6 Iustin Pop
REPAIR-STORAGE
565 7db441e6 Iustin Pop
~~~~~~~~~~~~~~
566 7db441e6 Iustin Pop
567 7db441e6 Iustin Pop
**repair-storage** [--ignore-consistency] {*node*} {*storage-type*}
568 7db441e6 Iustin Pop
{*volume-name*}
569 7db441e6 Iustin Pop
570 7db441e6 Iustin Pop
Repairs a storage volume on a node. Only LVM volume groups can be
571 7db441e6 Iustin Pop
repaired at this time. They have the storage type "lvm-vg".
572 7db441e6 Iustin Pop
573 7db441e6 Iustin Pop
On LVM volume groups, **repair-storage** runs "vgreduce
574 7db441e6 Iustin Pop
--removemissing".
575 7db441e6 Iustin Pop
576 7db441e6 Iustin Pop
577 7db441e6 Iustin Pop
578 7db441e6 Iustin Pop
**Caution:** Running this command can lead to data loss. Use it with
579 7db441e6 Iustin Pop
care.
580 7db441e6 Iustin Pop
581 7db441e6 Iustin Pop
The ``--ignore-consistency`` option will ignore any inconsistent
582 7db441e6 Iustin Pop
disks (on the nodes paired with this one). Use of this option is
583 7db441e6 Iustin Pop
most likely to lead to data-loss.
584 7db441e6 Iustin Pop
585 7db441e6 Iustin Pop
Example::
586 7db441e6 Iustin Pop
587 7db441e6 Iustin Pop
    # gnt-node repair-storage node5.example.com lvm-vg xenvg
588 7db441e6 Iustin Pop
589 7db441e6 Iustin Pop
590 7db441e6 Iustin Pop
POWERCYCLE
591 7db441e6 Iustin Pop
~~~~~~~~~~
592 7db441e6 Iustin Pop
593 7db441e6 Iustin Pop
**powercycle** [``--yes``] [``--force``] {*node*}
594 7db441e6 Iustin Pop
595 7db441e6 Iustin Pop
This commands (tries to) forcefully reboot a node. It is a command
596 7db441e6 Iustin Pop
that can be used if the node environemnt is broken, such that the
597 7db441e6 Iustin Pop
admin can no longer login over ssh, but the Ganeti node daemon is
598 7db441e6 Iustin Pop
still working.
599 7db441e6 Iustin Pop
600 7db441e6 Iustin Pop
Note that this command is not guaranteed to work; it depends on the
601 7db441e6 Iustin Pop
hypervisor how effective is the reboot attempt. For Linux, this
602 7db441e6 Iustin Pop
command require that the kernel option CONFIG\_MAGIC\_SYSRQ is
603 7db441e6 Iustin Pop
enabled.
604 7db441e6 Iustin Pop
605 7db441e6 Iustin Pop
The ``--yes`` option can be used to skip confirmation, while the
606 7db441e6 Iustin Pop
``--force`` option is needed if the target node is the master
607 7db441e6 Iustin Pop
node.
608 abefdcff René Nussbaumer
609 abefdcff René Nussbaumer
POWER
610 abefdcff René Nussbaumer
~~~~~
611 abefdcff René Nussbaumer
612 abefdcff René Nussbaumer
**power** on|off|cycle|status {*node*}
613 abefdcff René Nussbaumer
614 abefdcff René Nussbaumer
This commands calls out to out-of-band management to change the power
615 abefdcff René Nussbaumer
state of given node. With ``status`` you get the power status as reported
616 abefdcff René Nussbaumer
by the out-of-band managment script.
617 bee8c465 Iustin Pop
618 bee8c465 Iustin Pop
Note that this command will only work if the out-of-band functionality
619 bee8c465 Iustin Pop
is configured and enabled on the cluster. If this is not the case,
620 bee8c465 Iustin Pop
please use the **powercycle** command above.