How to set up a MooseFS chunkserver on Ubuntu

* Add the IP to the current mfsmaster in /etc/hosts:

sudo bash -c "echo  mfsmaster >> /etc/hosts"

* Download and extract the latest version of MooseFS:

mkdir -p ~/download ~/utpakk
cd ~/download
cd ../utpakk
tar zxvf ../download/mfs-1.6.25.tar.gz
cd mfs-1.6.25

* Install development packages and build MooseFS

sudo aptitude install libfuse-dev
fakeroot dpkg-buildpackage

* Install MooseFS

cd ..
sudo dpkg -i mfs*.deb

* Clean up

rm mfs*.*.*.*
rm -r mfs-1.6.25

* Configure MooseFS

sudo cp /etc/mfschunkserver.cfg.dist /etc/mfschunkserver.cfg
sudo bash -c "echo /media/disk0 > /etc/mfshdd.cfg"

* Set up a 100GB disk file (or a different size, check that there is space first with df / -h)

sudo mkdir -p /data
sudo dd if=/dev/zero of=/data/disk0 bs=1024 count=1 seek=$((100*1024*1024-1))
sudo mkfs.ext4 /data/disk0

* Answer “y”

* Add two lines to /etc/fstab

sudo bash -c "echo \# MooseFS chunkserver >> /etc/fstab"
sudo bash -c "echo /data/disk0 /media/disk0 ext4 defaults,noatime,owner 0 0 >> /etc/fstab"

* Mount /media/disk0

sudo mkdir -p /media/disk0
sudo mount /media/disk0

* Change ownership to the mfs user

sudo chown mfs:mfs /media/disk0

* Make the chunkserver start at boot

sudo sed -i 's:=false:=true:' /etc/default/mfs-chunkserver

* Start the chunkserver

sudo /etc/init.d/mfs-chunkserver start

* Check that it is up and running by visiting the mfscgi website at the mfsmaster:

That’s it! :)

moosefs.txt · Last modified: 2012/05/30 19:51 by xyproto
Wiki Syntax