Both components could be run anywhere , as long as the MooseFS chunkservers can reach the MooseFS master server.
In our deployment, both MooseFS master and slave run their services inside a virtual machine ; you just need to make sure to allocate enough memory to the MooseFS metadata server, all the metadata being stored in RAM when the service runs.
Hosts entry configuration
In the
/etc/hosts
add the following entry :10.0.10.16 mfsmaster
Required packages
Install the required packages by running the following commands :
$ apt-get install zlib1g-dev python pkg-config
$ yum install make automake gcc gcc-c++ kernel-devel python26 pkg-config
User and group creation
Create the adequate user and group :
$ groupadd mfs && useradd -g mfs mfs
Download the sources
Go to the MooseFS download page and fill the download form in order to obtain your URL for the package.
Extract and configure the sources
Extract the package and compile it :
$ tar -zxvf mfs-1.6.25.tar.gz && cd mfs-1.6.25
For the MooseFS master server installation, we disable from the compilation the mfschunkserver and mfsmount components :
$ ./configure --prefix=/usr --sysconfdir=/etc/moosefs --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs --disable-mfschunkserver --disable-mfsmount
$ make && make install
Create configuration files
We will keep the default settings, for tuning performance, you can read the MooseFS official FAQ
$ cd /etc/moosefs
$ cp mfsmaster.cfg.dist mfsmaster.cfg
$ cp mfsmetalogger.cfg.dist mfsmetalogger.cfg
$ cp mfsexports.cfg.dist mfsexports.cfg
In
/etc/moosefs/mfsexports.cfg
edit the second line in order to restrict the access to our private network :10.0.10.0/24 / rw,alldirs,maproot=0
Create the metadata file :
$ cd /var/lib/mfs && cp metadata.mfs.empty metadata.mfs
Power up the MooseFS mfsmaster service
You can now start the
mfsmaster
andmfscgiserv
deamons on the MooseFS metadataserver (Themfscgiserv
is a webserver which allows you to see via a web interface the MooseFS status realtime) :$ /usr/sbin/mfsmaster start && /usr/sbin/mfscgiserv start
Open the following url in your browser : http://10.0.10.16:9425 to see the MooseFS status page
Power up the MooseFS metalogger service
$ /usr/sbin/mfsmetalogger start