Create a small distributed file system using 2 servers one acting as a mater/chunkserver and other only as a chunkserver.

Install the required packages:

pkg install moosefs3-cgi moosefs3-cgiserv moosefs3-chunkserver moosefs3-client

For the master just add:

pkg install moosefs3-master

In all the servers add to your /etc/hosts and entry for the mfsmaster:

X.X.X.X     mfsmaster

Before starting the master, crate the file /var/mfs/metadata.mfs with:


Create a pool to share:

zfs create tank/mfs -o mountpoint=/mfs tank/mfs
chown mfs:mfs /mfs
chmod 770 /mfs

Add to /usr/local/etc/mfs/mfshdd.cfg:


And to /etc/fstab:

mfsmount_magic  /mnt/mfs moosefs  rw,mfsmaster=mfsmaster,mfscachemode=DIRECT,mountprog=/usr/local/bin/mfsmount,failok  0  0

notice the failok it will allow to boot in case master is down

As an alternative to /etc/fstab, edit /usr/local/etc/mfs/mfsmount.cfg with something like:


Then just by typing mfsmount will mount it.

Create the mount point:

mkdir /mnt/mfs

Add to /etc/rc.conf:


And for the mater:


Then load fuse:

kldload fuse

Or by adding it to /boot/loader.conf:


reboot and try to access: http://x.x.x.x:9425/mfs.cgi you should see the moosefs admin page, also try to check your mount points, change to /mnt/mfs and give a try:

dd if=/dev/zero of=/mnt/mfs/testfile bs=1G count=1

In both server you may have the same file, to check the directory info:

mfsdirinfo -l *