MOGADM(1)

πŸ“¦
version 2.30 Β· 2 versions
, in fedora 43

πŸ’– MOGADM(1) β€” the MogileFS admin tool, but make it make sense πŸ’–

okay bestie, sit down, hydrate, and let me tell you about mogadm β€” that's the manual page MOGADM(1) from the User Contributed Perl Documentation section. she's a whole admin tool for MogileFS and she's about to become your new hyperfixation. πŸ¦‹


✨ NAME ✨

mogadm β€” the MogileFS admin tool. that's it. that's the vibe. πŸ‘‘


🌸 SYNOPSIS 🌸

$ mogadm [config options] <argument(s)> [argument options]

$ mogadm
  ....
  (prints contextual help, if missing command/arguments)
  ...

so basically you run her with some config options, then whatever argument(s) you want, then that argument's own options. and if you just run her with nothing?? she's gonna print contextual help for you like the supportive queen she is. πŸ’…


πŸ’œ OPTIONS πŸ’œ

these are the big-picture config options, the ones that go before the command:

  • --lib=/path/to/lib β€” point this at a directory and she'll add it to the module search path. it's giving "hey bestie, my modules live over here." πŸŽ€
  • --trackers=10.0.0.117:7001,10.0.0.118:7001,... β€” the list of MogileFS trackers to go bug for status info. comma-separated, host:port style, as many as you want. 🌈

🫢 ARGUMENTS 🫢

this is the main character energy section β€” all the things you can actually do.

  • check β€” checks that every single MogileFS system component is functioning and that we can contact everybody. lowkey the fastest way to confirm the whole MogileFS system is functional from this machine's point of view. no cap. βœ…
  • 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 are in the format of normal command line options and can include anything from the HOST OPTIONS section below. πŸ–₯️

  • device add <host> <device id>
  • device mark <host> <device id> <status>
  • device modify <host> <device> [device options]
  • device delete <host> <device>
  • device list
  • device next

functions for manipulating devices. for add and modify, device options are in the format of normal command line options and can include anything from the DEVICE OPTIONS section below. πŸ’Ύ

  • 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. so like, empty it out first, bestie.

  • 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. it's strict, but respectfully. 🚫

  • slave ... β€” add/remove slaves replicating from MogileFS master database.

TODO: detail this πŸ™ˆ

run mogadm slave by itself for contextual help.

  • fsck printlog
  • fsck taillog
  • fsck clearlog

display or clear the log of fsck events. πŸ“œ

  • fsck reset [fsck options] β€” reset fsck position back to the beginning. please see the FSCK OPTIONS section for options to use with fsck. βͺ
  • fsck start β€” start (or resume) background fsck from the last checked fid. ⚠️ if you want to check every fid, you must call fsck reset before calling start. no skipping steps, babe.
  • fsck status β€” 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. it's giving full diagnostic report. πŸ“Š
  • fsck stop β€” stop (pause) background fsck. πŸ›‘
  • settings list β€” display all present MogileFS settings. πŸ“‹
  • settings set <key> <value> β€” 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). 🧠


πŸŽ€ 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. like, the bare necessities. 🐻

  • --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. dual-network queen behavior. 🌐

  • --status=<host status> β€” valid host statuses are one of: alive, down, readonly. pick one, bestie. 🎯

πŸ¦‹ DEVICE OPTIONS πŸ¦‹

  • --status=<device status> β€” valid device statuses are one of: alive, dead, down, drain, readonly. five whole options, she's flexible like that. πŸ’«
  • --weight=<device weight<gt> β€” the weight used in calculation of preferred paths. it must be a positive integer. βš–οΈ
  • --mindevcount=<value> β€” number of devices the files in this class should be replicated across. can be set to anything >= 1. πŸ”
  • --replpolicy=<value> β€” stringified replication policy. ie "MultipleHosts(3)" is equivalent to a --mindevcount=3. see documentation or plugins on alternative policies. πŸ€“
  • --hashtype=<value> β€” name of the hash algorithm used for checksumming. "MD5" or "NONE" for no checksumming. πŸ’…

🧚 FSCK OPTIONS 🧚

  • --policy-only β€” check replication policy (assumed locations) only; don't stat storage nodes for actual file presence. she's doing the vibe check, not the deep dive. πŸ‘€

πŸ”₯ 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 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

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 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:

$ 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. options options options. ✨


πŸ‘‘ AUTHOR πŸ‘‘

  • Brad Fitzpatrick <brad@danga.com>
  • Mark Smith <junior@danga.com>
  • Leon Brocard <acme@astray.com>, open sourced permissions from Foxtons Ltd.
  • Robin H. Johnson <robbat2@orbis-terrarum.net>

legends, all of them. 🫑


πŸ’€ BUGS πŸ’€

please report any on the MogileFS mailing list: <http://groups.google.com/group/mogile/>. don't suffer in silence, bestie, tell the group chat. 😭


πŸ“œ LICENSE πŸ“œ

licensed for use and redistribution under the same terms as Perl itself.


and that's the whole page!! this was perl v5.42.0 energy, dated 2025-07-25, and you just read MOGADM(1) cover to cover. obsessed with you fr fr, now go run mogadm check and slay. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from