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 mod‐
19               ule 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; sta‐
33               tistics about present replication devcounts and pending repli‐
34               cations.
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               encounted 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

HOST OPTIONS

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

DEVICE OPTIONS

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

CLASS OPTIONS

141       --mindevcount=<value>
142               Number of devices the files in this class should be replicated
143               across.  Can be set to anything >= 1.
144

FSCK OPTIONS

146       --policy-only
147               Check replication policy (assumed locations) only; don't stat
148               storage nodes for actual file presence.
149

EXAMPLES

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

CONFIGURATION

209       It is recommended that you create a configuration file such as
210       "/etc/mogilefs/mogilefs.conf" (or at "~/.mogilefs.conf") to be used for
211       configuration information.  Basically all you need is something like:
212
213           trackers = 10.0.0.23:7001, 10.0.0.15:7001
214
215           # if MogileFS::Admin files aren't installed in standard places:
216           lib = /home/mogilefs/cgi-bin
217
218       Note that these can also be specified on the command line, as per
219       above.
220

AUTHOR

222       Brad Fitzpatrick <brad@danga.com>
223
224       Mark Smith <junior@danga.com>
225
226       Leon Brocard <acme@astray.com>, open sourced permissions from Foxtons
227       Ltd.
228
229       Robin H. Johnson <robbat2@orbis-terrarum.net>
230

BUGS

232       Please report any on the MogileFS mailing list:
233       <http://lists.danga.com/mogilefs/>.
234

LICENSE

236       Licensed for use and redistribution under the same terms as Perl
237       itself.
238
239
240
241perl v5.8.8                       2007-08-01                         MOGADM(1)
Impressum