1MOGADM(1) User Contributed Perl Documentation MOGADM(1)
2
3
4
6 mogadm - MogileFS admin tool
7
9 $ mogadm [config options] <argument(s)> [argument options]
10
11 $ mogadm
12 ....
13 (prints contextual help, if missing command/arguments)
14 ...
15
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
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 host add <host> [host options]
31 host modify <host> [host options]
32 host mark <host> <status>
33 host delete <host>
34 host list
35 Functions for manipulating hosts. For add and modify, host
36 options is in the format of normal command line options and can
37 include anything in the "HOST OPTIONS" section.
38
39 device add <host> <device id>
40 device mark <host> <device id> <status>
41 device modify <host> <device> [device options]
42 device delete <host> <device>
43 device list
44 device next
45 Functions for manipulating devices. For add and modify, device
46 options are in the format of normal command line options and
47 can include anything in the "DEVICE OPTIONS" section.
48
49 domain add <domain>
50 domain delete <domain>
51 domain list
52 Simple commands for managing MogileFS domains. Note that you
53 cannot delete a domain unless it has no classes and is devoid
54 of files.
55
56 class add <domain> <class> [class options]
57 class modify <domain> <class> [class options]
58 class delete <domain> <class>
59 class list
60 Commands for working with classes. Please see the "CLASS
61 OPTIONS" section for the options to use with add/modify. Also,
62 delete requires that the class have no files in it before it
63 will allow the deletion.
64
65 slave ...
66 Add/remove slaves replicating from MogileFS master database.
67
68 TODO: detail this
69
70 Run mogadm slave by itself for contextual help.
71
72 fsck printlog
73 fsck taillog
74 fsck clearlog
75 Display or clear the log of fsck events.
76
77 fsck reset [fsck options]
78 Reset fsck position back to the beginning. Please see the
79 "FSCK OPTIONS" section for options to use with fsck.
80
81 fsck start
82 Start (or resume) background fsck from the last checked fid. If
83 you want to check every fid, you must call fsck reset before
84 calling start.
85
86 fsck status
87 Show the status of the presently active (or last if none
88 active) fsck. This includes what FIDs are being checked, time
89 statistics, check type as well as a summary of problems
90 encountered so far.
91
92 fsck stop
93 Stop (pause) background fsck
94
95 settings list
96 Display all present MogileFS settings.
97
98 settings set <key> <value>
99 Set the server setting for 'key' to 'value'.
100
101 The current settings are <enable_rebalance> (set to 1 to start
102 rebalance mode to move files to under-used devices) and
103 <memcache_servers> (enable memcached caching in the tracker).
104
106 --ip=<ip of host>
107 --port=<port of mogstored on host>
108 Contact information for the host. This is the minimum set of
109 information needed to setup a host.
110
111 --getport=<alternate retrieval part on host>
112 If provided, causes the tracker to use this port for retrieving
113 files. Uploads are still processed at the standard port.
114
115 --altip=<alternate IP>
116 --altmask=<mask to activate alternate IP>
117 If a client request comes in from an IP that matches the
118 alternate mask, then the host IP is treated as the alternate IP
119 instead of the standard IP. This can be used, for example, if
120 you have two networks and you need to return one IP to reach
121 the node on one network, but a second IP to reach it on the
122 alternate network.
123
124 --status=<host status>
125 Valid host statuses are one of: alive, down, readonly.
126
128 --status=<device status>
129 Valid device statuses are one of: alive, dead, down, drain,
130 readonly.
131
132 --weight=<device weight<gt>
133 The weight used in calculation of preferred paths. It must be a
134 positive integer.
135
137 --mindevcount=<value>
138 Number of devices the files in this class should be replicated
139 across. Can be set to anything >= 1.
140
141 --replpolicy=<value>
142 Stringified replication policy. ie "MultipleHosts(3)" is
143 equivalent to a --mindevcount=3. See documentation or plugins
144 on alternative policies.
145
146 --hashtype=<value>
147 Name of the hash algorithm used for checksumming. "MD5" or
148 "NONE" for no checksumming.
149
151 --policy-only
152 Check replication policy (assumed locations) only; don't stat
153 storage nodes for actual file presence.
154
156 Host manipulation:
157
158 $ mogadm host list
159 $ mogadm host add foo.local
160 $ mogadm host add foo.local --status=down --ip=10.0.0.34 --port=7900
161 $ mogadm host mark foo.local down
162 $ mogadm host modify foo.local --port=7500
163 $ mogadm host delete foo.local
164
165 Device manipulation:
166
167 $ mogadm device list
168 $ mogadm device summary
169 $ mogadm device summary --status=dead,down
170 $ mogadm device next
171 $ mogadm device add foo.local 16
172 $ mogadm device add foo.local 17 --status=alive
173 $ mogadm device mark foo.local 17 down
174 $ mogadm device modify foo.local 17 --status=alive --weight=10
175 $ mogadm device delete foo.local 17
176
177 Domain manipulation:
178
179 $ mogadm domain list
180 $ mogadm domain add first.domain
181 $ mogadm domain delete first.domain
182
183 Class manipulation
184
185 $ mogadm class list
186 $ mogadm class add first.domain my.class
187 $ mogadm class add first.domain my.class --mindevcount=3
188 $ mogadm class add first.domain my.class --replpolicy="MultipleHosts(3)"
189 $ mogadm class modify first.domain my.class --mindevcount=2
190 $ mogadm class modify first.domain my.class --replpolicy="MultipleHosts(3)"
191 $ mogadm class delete first.domain my.class
192
193 Check the status of your entire MogileFS system:
194
195 $ mogadm check
196
197 Check every file in the entire MogileFS system:
198
199 $ mogadm fsck reset
200 $ mogadm fsck start
201 $ mogadm fsck status
202 $ mogadm fsck printlog
203
204 See all the things mogadm can do:
205
206 $ mogadm
207
208 Get help on a sub-command:
209
210 $ mogadm device
211
213 It is recommended that you create a configuration file such as
214 "/etc/mogilefs/mogilefs.conf" (or at "~/.mogilefs.conf") to be used for
215 configuration information. Basically all you need is something like:
216
217 trackers = 10.0.0.23:7001, 10.0.0.15:7001
218
219 # if MogileFS::Admin files aren't installed in standard places:
220 lib = /home/mogilefs/cgi-bin
221
222 Note that these can also be specified on the command line, as per
223 above.
224
226 Brad Fitzpatrick <brad@danga.com>
227
228 Mark Smith <junior@danga.com>
229
230 Leon Brocard <acme@astray.com>, open sourced permissions from Foxtons
231 Ltd.
232
233 Robin H. Johnson <robbat2@orbis-terrarum.net>
234
236 Please report any on the MogileFS mailing list:
237 <http://groups.google.com/group/mogile/>.
238
240 Licensed for use and redistribution under the same terms as Perl
241 itself.
242
243
244
245perl v5.38.0 2023-07-20 MOGADM(1)