Statistics
| Branch: | Tag: | Revision:

root / man / gnt-group.rst @ 919852da

History | View | Annotate | Download (4.2 kB)

1
gnt-group(8) Ganeti | Version @GANETI_VERSION@
2
==============================================
3

    
4
Name
5
----
6

    
7
gnt-group - Ganeti node-group administration
8

    
9
Synopsis
10
--------
11

    
12
**gnt-group** {command} [arguments...]
13

    
14
DESCRIPTION
15
-----------
16

    
17
The **gnt-group** command is used for node group administration in
18
the Ganeti system.
19

    
20
COMMANDS
21
--------
22

    
23
ADD
24
~~~
25

    
26
| **add**
27
| [--node-parameters=*NDPARAMS*]
28
| [--alloc-policy=*POLICY*]
29
| {*group*}
30

    
31
Creates a new group with the given name. The node group will be
32
initially empty; to add nodes to it, use ``gnt-group assign-nodes``.
33

    
34
The ``--node-parameters`` option allows you to set default node
35
parameters for nodes in the group. Please see **ganeti**(7) for more
36
information about supported key=value pairs.
37

    
38
The ``--alloc-policy`` option allows you to set an allocation policy for
39
the group at creation time. Possible values are:
40

    
41
unallocable
42
    nodes in the group should not be candidates for instance allocation,
43
    and the operation (e.g., instance creation) should fail if only
44
    groups in this state could be found to satisfy the requirements.
45

    
46
last_resort
47
    nodes in the group should not be used for instance allocations,
48
    unless this would be the only way to have the operation succeed.
49

    
50
preferred
51
    nodes in the group can be used freely for allocation of instances
52
    (this is the default). Note that prioritization among groups in this
53
    state will be deferred to the iallocator plugin that's being used.
54

    
55
ASSIGN-NODES
56
~~~~~~~~~~~~
57

    
58
| **assign-nodes**
59
| [--force]
60
| {*group*} {*node*...}
61

    
62
Assigns one or more nodes to the specified group, moving them from their
63
original group (or groups).
64

    
65
By default, this command will refuse to proceed if the move would split
66
between groups any instance that was not previously split (a split
67
instance is an instance with a mirrored disk template, e.g. DRBD, that
68
has the primary and secondary nodes in different node groups). You can
69
force the operation with ``--force``.
70

    
71
MODIFY
72
~~~~~~
73

    
74
| **modify**
75
| [--node-parameters=*NDPARAMS*]
76
| [--alloc-policy=*POLICY*]
77
| {*group*}
78

    
79
Modifies some parameters from the node group.
80

    
81
The ``--node-parameters`` and ``--alloc-policy`` optiosn are documented
82
in the **add** command above.
83

    
84
REMOVE
85
~~~~~~
86

    
87
| **remove** {*group*}
88

    
89
Deletes the indicated node group, which must be empty.
90

    
91
LIST
92
~~~~
93

    
94
| **list** [--no-headers] [--separator=*SEPARATOR*]
95
| [-o *[+]FIELD,...*] [group...]
96

    
97
Lists all existing node groups in the cluster.
98

    
99
The ``--no-headers`` option will skip the initial header line. The
100
``--separator`` option takes an argument which denotes what will be
101
used between the output fields. Both these options are to help
102
scripting.
103

    
104
The ``-o`` option takes a comma-separated list of output fields.
105
If the value of the option starts with the character ``+``, the new
106
fields will be added to the default list. This allows to quickly
107
see the default list plus a few other fields, instead of retyping
108
the entire list of fields.
109

    
110
The available fields and their meaning are:
111

    
112
name
113
    the group name
114

    
115
uuid
116
    the group's UUID
117

    
118
node_cnt
119
    the number of nodes in the node group
120

    
121
node_list
122
    the list of nodes that belong to this group
123

    
124
pinst_cnt
125
    the number of primary instances in the group (i.e., the number of
126
    primary instances nodes in this group have)
127

    
128
pinst_list
129
    the list of primary instances in the group
130

    
131
alloc_policy
132
    the current allocation policy for the group
133

    
134
ctime
135
    the creation time of the group; note that this field contains spaces
136
    and as such it's harder to parse
137

    
138
    if this attribute is not present (e.g. when upgrading from older
139
    versions), then "N/A" will be shown instead
140

    
141
mtime
142
    the last modification time of the group; note that this field
143
    contains spaces and as such it's harder to parse
144

    
145
serial_no
146
    the so called 'serial number' of the group; this is a numeric field
147
    that is incremented each time the node is modified, and it can be
148
    used to detect modifications
149

    
150
If no group names are given, then all groups are included. Otherwise,
151
only the named groups will be listed.
152

    
153
LIST-FIELDS
154
~~~~~~~~~~~
155

    
156
**list-fields** [field...]
157

    
158
List available fields for node groups.
159

    
160
RENAME
161
~~~~~~
162

    
163
| **rename** {*oldname*} {*newname*}
164

    
165
Renames a given group from *oldname* to *newname*.