MooseFS

MooseFS is a great distributed filesystem that supports erasure coding for maximum efficiency. It’s also free to use, but there’s one catch. No redundancy. You’re only allowed to run one master node for free. The license is cheaper than enterprise solutions, but far from free.

But if you don’t mind doing a full shutdown when rebooting the master node, it’s a great system.

# Make sure all hosts can find the mfs master

sudo -i
echo "10.96.146.1     mfsmaster" >> /etc/hosts

# Install the repo (for Deb 13)

apt install -y gpg curl
mkdir -p /etc/apt/keyrings
curl https://repository.moosefs.com/moosefs.key | gpg -o /etc/apt/keyrings/moosefs.gpg --dearmor 
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/moosefs.gpg] http://repository.moosefs.com/moosefs-4/apt/debian/trixie trixie main" > /etc/apt/sources.list.d/moosefs.list
apt update

# Install the Master Server on the first instance
apt install moosefs-master moosefs-cgi moosefs-cgiserv moosefs-cli

# Install the chunk master on it as well as secondary servers

## Prepare the disks


umount /data/rustfs*
mkfs.xfs  -i size=512 -n ftype=1 -L RUSTFS0 /dev/sda -f
mkfs.xfs  -i size=512 -n ftype=1 -L RUSTFS1 /dev/sdc -f

# if needed
sudo mkdir -p /data/rustfs{0..1} 
echo "LABEL=RUSTFS0 /data/rustfs0   xfs   defaults,noatime,nodiratime   0   0" >> /etc/fstab
echo "LABEL=RUSTFS1 /data/rustfs1   xfs   defaults,noatime,nodiratime   0   0" >> /etc/fstab

mount -a

apt install moosefs-chunkserver

# Configure the chunkserver

cd /etc/mfs
cp mfschunkserver.cfg.sample mfschunkserver.cfg
cp mfshdd.cfg.sample mfshdd.cfg


# Note - If there is an error above because these files are missing, you may not have the correct Repo. 
#        make sure to run `apt update` and that the moosefs repos are listed.
#        Of course, they are only full of comments by default, so worst case you can just create them yourself.
touch mfschunkserver.cfg
touch mfshdd.cfg

echo /data/rustfs0/ >> /etc/mfs/mfshdd.cfg
echo /data/rustfs1/ >> /etc/mfs/mfshdd.cfg

chown -R mfs:mfs /data/*
chmod -R 770 /data/*

mfschunkserver start

# Assuming it started, enable it at boot.
systemctl enable moosefs-chunkserver.service

# Install the client and mount
apt install moosefs-client

mkdir /mnt/mfs
mount -t moosefs mfsmaster: /mnt/mfs

sudo chown -R rustfs-user:rustfs-user /data/*
sudo systemctl restart rustfs.service

Last modified March 27, 2026: FS updates (8b3d802)