1MOGADM(1)             User Contributed Perl Documentation            MOGADM(1)
2
3
4

NAME

6       mogadm - MogileFS admin tool
7

SYNOPSIS

9        $ mogadm [config options] <argument(s)> [argument options]
10
11        $ mogadm
12          ....
13          (prints contextual help, if missing command/arguments)
14          ...
15

OPTIONS

17       --lib=/path/to/lib
18               Set this option to a path to include this directory in the
19               module search path.
20
21       --trackers=10.0.0.117:7001,10.0.0.118:7001,...
22               Use these MogileFS trackers for status information.
23

ARGUMENTS

25       check   Check to ensure that all of the MogileFS system components are
26               functioning and that we can contact everybody.  The quickest
27               way of ensuring that the entire MogileFS system is functional
28               from the current machine's point of view.
29
30       stats   Attempt to get statistics for the MogileFS world. This should
31               provide statistics on: the number of files present on each
32               device; the number of files in each (domain,class) tuple;
33               statistics about present replication devcounts and pending
34               replications.
35
36               Due to design constraints, the stats command may presently fail
37               if some statistic takes too long to generate.
38
39       host add <host> [host options]
40       host modify <host> [host options]
41       host mark <host> <status>
42       host delete <host>
43       host list
44               Functions for manipulating hosts.  For add and modify, host
45               options is in the format of normal command line options and can
46               include anything in the "HOST OPTIONS" section.
47
48       device add <host> <device id>
49       device mark <host> <device id> <status>
50       device modify <host> <device> [device options]
51       device delete <host> <device>
52       device list
53               Functions for manipulating devices. For add and modify, device
54               options are in the format of normal command line options and
55               can include anything in the "DEVICE OPTIONS" section.
56
57       domain add <domain>
58       domain delete <domain>
59       domain list
60               Simple commands for managing MogileFS domains.  Note that you
61               cannot delete a domain unless it has no classes and is devoid
62               of files.
63
64       class add <domain> <class> [class options]
65       class modify <domain> <class> [class options]
66       class delete <domain> <class>
67       class list
68               Commands for working with classes.  Please see the "CLASS
69               OPTIONS" section for the options to use with add/modify.  Also,
70               delete requires that the class have no files in it before it
71               will allow the deletion.
72
73       slave ...
74               Add/remove slaves replicating from MogileFS master database.
75
76               TODO: detail this
77
78               Run mogadm slave by itself for contextual help.
79
80       fsck printlog
81       fsck taillog
82       fsck clearlog
83               Display or clear the log of fsck events.
84
85       fsck reset [fsck options]
86               Reset fsck position back to the beginning.  Please see the
87               "FSCK OPTIONS" section for options to use with fsck.
88
89       fsck start
90               Start (or resume) background fsck from the last checked fid. If
91               you want to check every fid, you must call fsck reset before
92               calling start.
93
94       fsck status
95               Show the status of the presently active (or last if none
96               active) fsck. This includes what FIDs are being checked, time
97               statistics, check type as well as a summary of problems
98               encountered so far.
99
100       fsck stop
101               Stop (pause) background fsck
102
103       settings list
104               Display all present MogileFS settings.
105
106       settings set <key> <value>
107               Set the server setting for 'key' to 'value'.
108
109               The current settings are <enable_rebalance> (set to 1 to start
110               rebalance mode to move files to under-used devices) and
111               <memcache_servers> (enable memcached caching in the tracker).
112

HOST OPTIONS

114       --ip=<ip of host>
115       --port=<port of mogstored on host>
116               Contact information for the host.  This is the minimum set of
117               information needed to setup a host.
118
119       --getport=<alternate retrieval part on host>
120               If provided, causes the tracker to use this port for retrieving
121               files.  Uploads are still processed at the standard port.
122
123       --altip=<alternate IP>
124       --altmask=<mask to activate alternate IP>
125               If a client request comes in from an IP that matches the
126               alternate mask, then the host IP is treated as the alternate IP
127               instead of the standard IP.  This can be used, for example, if
128               you have two networks and you need to return one IP to reach
129               the node on one network, but a second IP to reach it on the
130               alternate network.
131
132       --status=<host status>
133               Valid host statuses are one of: alive, down, dead.
134

DEVICE OPTIONS

136       --status=<device status>
137               Valid device statuses are one of: alive, dead, down, drain,
138               readonly.
139
140       --weight=<device weight<gt>
141               The weight used in calculation of preferred paths. It must be a
142               positive integer.
143

CLASS OPTIONS

145       --mindevcount=<value>
146               Number of devices the files in this class should be replicated
147               across.  Can be set to anything >= 1.
148
149       --replpolicy=<value>
150               Stringified replication policy. ie "MultipleHosts(3)" is
151               equivalent to a --mindevcount=3. See documentation or plugins
152               on alternative policies.
153

FSCK OPTIONS

155       --policy-only
156               Check replication policy (assumed locations) only; don't stat
157               storage nodes for actual file presence.
158

EXAMPLES

160       Host manipulation:
161
162           $ mogadm host list
163           $ mogadm host add foo.local
164           $ mogadm host add foo.local --status=down --ip=10.0.0.34 --port=7900
165           $ mogadm host mark foo.local down
166           $ mogadm host modify foo.local --port=7500
167           $ mogadm host delete foo.local
168
169       Device manipulation:
170
171           $ mogadm device list
172           $ mogadm device summary
173           $ mogadm device summary --status=dead,down
174           $ mogadm device add foo.local 16
175           $ mogadm device add foo.local 17 --status=alive
176           $ mogadm device mark foo.local 17 down
177           $ mogadm device modify foo.local 17 --status=alive --weight=10
178           $ mogadm device delete foo.local 17
179
180       Domain manipulation:
181
182           $ mogadm domain list
183           $ mogadm domain add first.domain
184           $ mogadm domain delete first.domain
185
186       Class manipulation
187
188           $ mogadm class list
189           $ mogadm class add first.domain my.class
190           $ mogadm class add first.domain my.class --mindevcount=3
191           $ mogadm class add first.domain my.class --replpolicy="MultipleHosts(3)"
192           $ mogadm class modify first.domain my.class --mindevcount=2
193           $ mogadm class modify first.domain my.class --replpolicy="MultipleHosts(3)"
194           $ mogadm class delete first.domain my.class
195
196       Check the status of your entire MogileFS system:
197
198           $ mogadm check
199
200       Check MogileFS system statistics:
201
202           $ mogadm stats
203
204       Check every file in the entire MogileFS system:
205
206           $ mogadm fsck reset
207           $ mogadm fsck start
208           $ mogadm fsck status
209           $ mogadm fsck printlog
210
211       See all the things mogadm can do:
212
213           $ mogadm
214
215       Get help on a sub-command:
216
217           $ mogadm device
218

CONFIGURATION

220       It is recommended that you create a configuration file such as
221       "/etc/mogilefs/mogilefs.conf" (or at "~/.mogilefs.conf") to be used for
222       configuration information.  Basically all you need is something like:
223
224           trackers = 10.0.0.23:7001, 10.0.0.15:7001
225
226           # if MogileFS::Admin files aren't installed in standard places:
227           lib = /home/mogilefs/cgi-bin
228
229       Note that these can also be specified on the command line, as per
230       above.
231

AUTHOR

233       Brad Fitzpatrick <brad@danga.com>
234
235       Mark Smith <junior@danga.com>
236
237       Leon Brocard <acme@astray.com>, open sourced permissions from Foxtons
238       Ltd.
239
240       Robin H. Johnson <robbat2@orbis-terrarum.net>
241

BUGS

243       Please report any on the MogileFS mailing list:
244       <http://groups.google.com/group/mogile/>.
245

LICENSE

247       Licensed for use and redistribution under the same terms as Perl
248       itself.
249
250
251
252perl v5.12.1                      2010-04-02                         MOGADM(1)
Impressum