MogileFS: HTTP Setup and Configuration crumbs=>> MogileFS body<=

While more difficult initially, HTTP based setups are less prone to encountering errors relating to NFS and other system issues. In our experience, HTTP is the way to go for file distribution.

There are two main components you have to configure and run. The first is called mogstored and is the HTTP storage daemon that handles all GET, HEAD, PUT, and DELETE requests to modify the files on disk.

Note: mogstored is currently hardcoded to use /var/mogdata as the root of the file tree and to use port 7500 as the data port. You can change this in the daemon file yourself.

Once you've configured mogstored like you want by editing the file, you can simply start it up like this:

$ mogstored --daemon

At that point it should start up and run into the background. You can verify it's working by telnetting to the port you set for it, 7500 by default. The connection should be accepted. (If you know HTTP you can try asking for something and verify that you get a response.)

The second step is to setup your actual MogileFS daemon. This is fairly easy since you're using HTTP. Basically, create a configuration file that looks like this:

db_dsn          DBI:mysql:mogile
db_user         mogile
db_pass         mogile
conf_port       6001
listener_jobs   5

Now you can start your MogileFS daemon:

$ mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon

You need the --daemon option if you don't want MogileFS to run in the foreground. If you do want to run it in the foreground, you may also be interested in adding debug 3 to your configuration file which will tell you a lot about what's going on within the daemon.

<=body page?>