NAME
mogadm - MogileFS admin tool
SYNOPSIS
$ mogadm [config options] <argument(s)> [argument options]
$ mogadm
....
(prints contextual help, if missing command/arguments)
...
OPTIONS
- --lib=/path/to/lib
-
Set this option to a path to include this directory in the module search path.
- --trackers=10.0.0.117:7001,10.0.0.118:7001,...
-
Use these MogileFS trackers for status information.
ARGUMENTS
- check
-
Check to ensure that all of the MogileFS system components are functioning and that we can contact everybody. The quickest way of ensuring that the entire MogileFS system is functional from the current machine's point of view.
- host add <host> [host options]
- host modify <host> [host options]
- host mark <host> <status>
- host delete <host>
- host list
-
Functions for manipulating hosts. For add and modify, host options is in the format of normal command line options and can include anything in the "HOST OPTIONS" section.
- device add <host> [device id]
- device mark <host> <device id> <status>
- device delete <host> <device>
- device list
-
Adding, editing, and deleting devices. The device id is optional in the add command: if you provide one, it will be setup using the provided id; else, a new id is assigned and provided to you for setting up the device.
When marking devices, the status can be one of {alive|down|dead|readonly}.
- domain add <domain>
- domain delete <domain>
- domain list
-
Simple commands for managing MogileFS domains. Note that you cannot delete a domain unless it has no classes and is devoid of files.
- class add <domain> <class> [class options]
- class modify <domain> <class> [class options]
- class delete <domain> <class>
- class list
-
Commands for working with classes. Please see the "CLASS OPTIONS" section for the options to use with add/modify. Also, delete requires that the class have no files in it before it will allow the deletion.
- slave ...
-
Add/remove slaves replicating from MogileFS master database.
Run mogadm slave by itself for contextual help.
- fsck ...
-
Control a background filesystem check operation.
Run mogadm fsck by itself for contextual help.
HOST OPTIONS
- --ip=<ip of host>
- --port=<port of mogstored on host>
-
Contact information for the host. This is the minimum set of information needed to setup a host.
- --getport=<alternate retrieval part on host>
-
If provided, causes the tracker to use this port for retrieving files. Uploads are still processed at the standard port.
- --altip=<alternate IP>
- --altmask=<mask to activate alternate IP>
-
If a client request comes in from an IP that matches the alternate mask, then the host IP is treated as the alternate IP instead of the standard IP. This can be used, for example, if you have two networks and you need to return one IP to reach the node on one network, but a second IP to reach it on the alternate network.
- --status=<host status>
-
Valid statuses are one of: alive, down, dead.
CLASS OPTIONS
- --mindevcount=<value>
-
Number of devices the files in this class should be replicated across. Can be set to anything >= 1.
EXAMPLES
Host manipulation:
$ mogadm host list
$ mogadm host add foo.local
$ mogadm host add foo.local --status=down --ip=10.0.0.34 --port=7900
$ mogadm host mark foo.local down
$ mogadm host modify foo.local --port=7500
$ mogadm host delete foo.local
Device manipulation:
$ mogadm device list
$ mogadm device add foo.local 16
$ mogadm device add foo.local 17 --status=alive
$ mogadm device mark foo.local 17 down
$ mogadm device delete foo.local 17
Domain manipulation:
$ mogadm domain list
$ mogadm domain add first.domain
$ mogadm domain delete first.domain
Class manipulation
$ mogadm class list
$ mogadm class add first.domain my.class
$ mogadm class add first.domain my.class --mindevcount=3
$ mogadm class modify first.domain my.class --mindevcount=2
$ mogadm class delete first.domain my.class
Check the status of your entire MogileFS system:
$ mogadm check
Check MogileFS system statistics:
$ mogadm stats
See all the things mogadm can do:
$ mogadm
Get help on a sub-command:
$ mogadm device
CONFIGURATION
It is recommended that you create a configuration file such as /etc/mogilefs/mogilefs.conf
(or at ~/.mogilefs.conf
) to be used for configuration information. Basically all you need is something like:
trackers = 10.0.0.23:7001, 10.0.0.15:7001
# if MogileFS::Admin files aren't installed in standard places:
lib = /home/mogilefs/cgi-bin
Note that these can also be specified on the command line, as per above.
AUTHOR
Brad Fitzpatrick <brad@danga.com>
Mark Smith <junior@danga.com>
Leon Brocard <acme@astray.com>, open sourced permissions from Foxtons Ltd.
BUGS
Please report any on the MogileFS mailing list: http://lists.danga.com/mogilefs/.
LICENSE
Licensed for use and redistribution under the same terms as Perl itself.