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