Statistics
| Branch: | Tag: | Revision:

root / man / gnt-node.rst @ 216d23c0

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