|<B>--lib=/path/to/libB>||Set this option to a path to include this directory in the module search path.|
|<B>--trackers=10.0.0.117:7001,10.0.0.118:7001,...B>||Use these MogileFS trackers for status information.|
<B>checkB> 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 machines point of view. <B>host add <host> [host options]B> <B>host modify <host> [host options]B> <B>host mark <host> <status>B> <B>host delete <host>B> <B>host listB> 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. <B>device add <host> <device id>B> <B>device mark <host> <device id> <status>B> <B>device modify <host> <device> [device options]B> <B>device delete <host> <device>B> <B>device listB> <B>device nextB> Functions for manipulating devices. For add and modify, device options are in the format of normal command line options and can include anything in the DEVICE OPTIONS section. <B>domain add <domain>B> <B>domain delete <domain>B> <B>domain listB> Simple commands for managing MogileFS domains. Note that you cannot delete a domain unless it has no classes and is devoid of files. <B>class add <domain> <class> [class options]B> <B>class modify <domain> <class> [class options]B> <B>class delete <domain> <class>B> <B>class listB> 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. <B>slave ...B> Add/remove slaves replicating from MogileFS master database.
TODO: detail this
<B>fsck printlogB> <B>fsck taillogB> <B>fsck clearlogB> Display or clear the log of fsck events. <B>fsck reset [fsck options]B> Reset fsck position back to the beginning. Please see the FSCK OPTIONS section for options to use with fsck. <B>fsck startB> Start (or resume) background fsck from the last checked fid. If you want to check every fid, you must call <B>fsck resetB> before calling start. <B>fsck statusB> Show the status of the presently active (or last if none active) fsck. This includes what FIDs are being checked, time statistics, check type as well as a summary of problems encountered so far. <B>fsck stopB> Stop (pause) background fsck <B>settings listB> Display all present MogileFS settings. <B>settings set <key> <value>B> Set the server setting for key to value.
The current settings are <enable_rebalance> (set to 1 to start rebalance mode to move files to under-used devices) and <memcache_servers> (enable memcached caching in the tracker).
<B>--ip=<ip of host>B> <B>--port=<port of mogstored on host>B> Contact information for the host. This is the minimum set of information needed to setup a host. <B>--getport=<alternate retrieval part on host>B> If provided, causes the tracker to use this port for retrieving files. Uploads are still processed at the standard port. <B>--altip=<alternate IP>B> <B>--altmask=<mask to activate alternate IP>B> 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. <B>--status=<host status>B> Valid host statuses are one of: alive, down, dead.
<B>--status=<device status>B> Valid device statuses are one of: alive, dead, down, drain, readonly. <B>--weight=<device weight<gtB>> The weight used in calculation of preferred paths. It must be a positive integer.
<B>--mindevcount=<value>B> Number of devices the files in this class should be replicated across. Can be set to anything >= 1. <B>--replpolicy=<value>B> Stringified replication policy. ie MultipleHosts(3) is equivalent to a --mindevcount=3. See documentation or plugins on alternative policies. <B>--hashtype=<value>B> Name of the hash algorithm used for checksumming. MD5 or NONE for no checksumming.
<B>--policy-onlyB> Check replication policy (assumed locations) only; dont stat storage nodes for actual file presence.
$ 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
$ mogadm device list $ mogadm device summary $ mogadm device summary --status=dead,down $ mogadm device next $ mogadm device add foo.local 16 $ mogadm device add foo.local 17 --status=alive $ mogadm device mark foo.local 17 down $ mogadm device modify foo.local 17 --status=alive --weight=10 $ mogadm device delete foo.local 17
$ mogadm domain list $ mogadm domain add first.domain $ mogadm domain delete first.domain
$ mogadm class list $ mogadm class add first.domain my.class $ mogadm class add first.domain my.class --mindevcount=3 $ mogadm class add first.domain my.class --replpolicy="MultipleHosts(3)" $ mogadm class modify first.domain my.class --mindevcount=2 $ mogadm class modify first.domain my.class --replpolicy="MultipleHosts(3)" $ mogadm class delete first.domain my.class
Check the status of your entire MogileFS system:
$ mogadm check
Check every file in the entire MogileFS system:
$ mogadm fsck reset $ mogadm fsck start $ mogadm fsck status $ mogadm fsck printlog
See all the things mogadm can do:
Get help on a sub-command:
$ mogadm device
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:
Note that these can also be specified on the command line, as per above.
Brad Fitzpatrick <firstname.lastname@example.org>
Mark Smith <email@example.com>
Leon Brocard <firstname.lastname@example.org>, open sourced permissions from Foxtons Ltd.
Robin H. Johnson <email@example.com>
Please report any on the MogileFS mailing list: <http://groups.google.com/group/mogile/>.
Licensed for use and redistribution under the same terms as Perl itself.
|perl v5.20.3||MOGADM (1)||2014-12-16|