File: 4s-admin.1

package info (click to toggle)
4store 1.1.6%2B20151109-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 82,388 kB
  • sloc: ansic: 65,689; sh: 2,916; perl: 2,245; makefile: 281; python: 213
file content (216 lines) | stat: -rw-r--r-- 6,071 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
.Dd 11 October, 2011
.Dt 4S-ADMIN 1J 4store
.Os 4store
.Sh NAME
.Nm 4s-admin
.Nd 4store cluster management tool
.Sh SYNOPSIS
.Nm
.Op Fl \-verbose
.Ar command
.Op Ar args
.Pp
.Nm
list-nodes
.Nm
list-stores
.Nm
start-stores
.Op Fl a | Fl \-all
.Op Ar store_name Li ...
.Nm
stop-stores
.Op Fl a | Fl \-all
.Op Ar store_name Li ...
.Nm
delete-stores
.Ar store_name Li ...
.Nm
create-store
.Op Ar create_options Li ...
.Ar store_name
.Nm
.Op Fl \-version
.Op Fl \-help
.Sh DESCRIPTION
The
.Nm
utility enables a 4store cluster (or single host) to be managed through a
number of supported commands.
Commands available are
.Sy list-nodes , Sy list-stores , Sy start-stores , Sy stop-stores ,
.Sy delete-stores .
Details on individual commands are below:
.Ss Command: list-nodes
Prints a list of all nodes in their cluster, and their status.
Output contains:
  node_number - starting at 0, the numbered index of a node in a cluster
  hostname    - name of the cluster node
  port        - the port that 4s-boss is running on
  status      - whether 4s-boss on that node is reachable or not
  ip_address  - IPv4 or IPv6 address of the node
.Ss Command: list-stores
Prints a list of all stores found on the cluster, along with their status.
The output will contain:
  store_name     - name of the store
  store_status   - whether the store is usable or not
  backend_status - status of the 4s-backend processes the store uses
.Pp
options:
.Bl -tag -width Ds
.It Fl \-verbose
Will show status of each backend on each node separately, rather than by
store.
.El
.Pp
The store_status will either be 'available' or 'unavailable'.
If a store is available, then it means that all necessary backend processes
are running on the cluster, and the store can be used with 4s-httpd, 4s-query,
and 4s-import.
If a store is not available, the 'backend_status' will list the reason why.
.Pp
If a backend is listed as 'stopped', it means that the 4s-backend process for
a store is definitely stopped on one or more nodes of a cluster.
If it is listed as 'unknown', this means that 4s-admin was unable to determine
the state of the backend process.
.Ss Command: start-stores, stop-stores
Starts or stops one or more stores on the cluster.
.Pp
options:
.Bl -tag -width Ds
.It Fl a, \-all
Starts or stops all stores on the cluster.
.El
.Pp
If the \-a or \-\-all option isn't present, then a space separated list of store
names to start or stop should be given.
.Pp
Each node is asked in turn to start or stop the 4s-backend process stores
given.
.Pp
For each node, this command will print:
  node_number - starting at 0, the numbered index of a node in a cluster
  hostname    - name of the cluster node
.Pp
For each 4s-backend process on the node, it will print:
  store_name     - name of the store
  backend_status - whether 4s-backend is now stopped or running
.Pp
The backend_status will be one of 'stopped', 'running', or 'unknown'.
.Pp
If start-stores is called for an already running store, or a stop-stores for
an already stopped store, then each node will take no action, but the status
of the backend will be printed.
.Ss Command: delete-stores
Deletes one or more stores from a cluster.
.Pp
Accepts a space separated list of stores to delete as arguments.
.Pp
Establishes a connection to all nodes of the cluster, stops a store if it is
running, then deletes that store.
.Ss Command: create-store
Creates a new store on one or more cluster nodes.
.Pp
options:
.Bl -tag -width Ds
.It Fl \-nodes Ar node_id_list
Comma separated list of numerical node numbers to create the store on.
Default is all nodes.
Use
.Nm
.Sy list-nodes
for a list of available nodes.
.It Fl \-segments Ar num_segments
Total number of segments to be split across all nodes, must be a power of 2.
Default is 2 per node (rounded to nearest power of 2).
.It Fl m, \-mirror
Enable mirroring of segments.
.It Fl \-password Ar password
Set a password for authentication.
.It Fl \-model-files
Use a file per model, useful for large models.
.It Fl \-force
If a store with the same name already exists, delete it and recreate.
.El
.Pp
All of the above are optional, and the only required argument is the name of
the store to create.
.Pp
Each node is asked in turn to create the store.
If any of the nodes fail to create a store, store creation is aborted, and
any segments already created will be deleted.
.Pp
.Pp
Existing stores won't be deleted unless the Fl \-force option is given.
.Ss Configuration file options
.Bl -tag -width Ds
.It Sy nodes = <node_list>
Semicolon separated list of hosts in the cluster.
.El
.Pp
Options for
.Nm
in
.Pa /etc/4store.conf
should all be within the
[4s-boss] section, or will be ignored.
.Pp
See
.Xr 4store.conf 5
for details on how to specify a cluster.
.Ss General Usage
When any
.Nm
command is called, it first reads
.Pa /etc/4store.conf
to determine the hostnames of nodes in the cluster.
It will then attempt to communicate with the
.Xr 4s-boss 8
daemon running on that node (running on port 6733 by default).
.Pp
Running the list-nodes command is the simplest way of checking that all nodes
are reachable over the network, and the 4s-boss on each is responding.
.Sh FILES
.Bl -tag -width Ds
.It Pa /etc/4store.conf
Main 4store configuration file, used to determine which hosts are in
the cluster.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Stop all stores on the cluster:
.Pp
.Dl $ 4s-admin stop-stores --all
.Pp
Start the stores
.Qq foo
and
.Qq bar :
.Pp
.Dl $ 4s-admin start-stores foo bar
.Pp
Delete stores
.Qq kb1 ,
.Qq kb2 ,
and
.Qq kb3 :
.Pp
.Dl $ 4s-admin delete-stores kb1 kb2 kb3
.Pp
Create store with 32 segments on 1st and 3rd nodes of cluster:
.Pp
.Dl $ 4s-admin create-store --nodes=0,2 --segments=32 kb1
.Sh SEE ALSO
.Xr 4store.conf 5 ,
.Xr 4s-boss 8
.Sh AUTHORS
.An Dave Challis Aq suicas@gmail.com .
.Sh SECURITY CONSIDERATIONS
.Nm
should not be run as root, use a non-privileged account instead.
.Pp
Since it can request that any nodes of a cluster start/stop/delete stores, 
only trusted users should be able to run
.Nm ,
or send packets to 4s-boss on cluster nodes.