Architecture Overview
MooseFS provides enterprise-grade distributed storage with these core components:
Master Server (mfsmaster)
Central metadata server managing file system structure and chunk locations
Chunkserver (mfschunkserver)
Storage nodes that store actual file data in fixed-size chunks
Client (mfsmount)
FUSE-based client providing POSIX filesystem interface
CGI Monitor
Web-based monitoring interface for cluster management
System Requirements & Prerequisites
Before starting, ensure you have the appropriate server specifications:
| Component | Minimum Specs | Recommended |
|---|---|---|
| Master Server | 2 vCPU, 2GB RAM, 20GB SSD | 4 vCPU, 8GB RAM, 100GB NVMe |
| Chunkserver | 2 vCPU, 4GB RAM, 100GB Storage | 4 vCPU, 8GB RAM, 1TB+ Storage |
| Client | 1 vCPU, 1GB RAM, 10GB Storage | 2 vCPU, 4GB RAM, 20GB Storage |
Operating System
- • Ubuntu 20.04/22.04 LTS (Recommended)
- • CentOS/Rocky Linux 8+
- • Root access to all instances
Development Tools
Install on all nodes:
- • Build-essential / Development Tools
- • FUSE3 support
- • pkg-config and zlib
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential pkg-config zlib1g-dev
sudo apt install -y libfuse-dev fuse3sudo yum update -y
sudo yum groupinstall -y 'Development Tools'
sudo yum install -y fuse-devel fuse3-devel zlib-develsudo useradd -r -s /bin/false mfs
sudo mkdir -p /var/lib/mfs
sudo chown mfs:mfs /var/lib/mfsNetwork Configuration
Important: Ensure all MooseFS nodes can communicate on required ports before proceeding with installation.
Required Ports
- • 9419 - Master server communication (TCP)
- • 9420 - Chunkserver communication (TCP)
- • 9425 - CGI monitoring interface (TCP)
sudo ufw allow 9419/tcp
sudo ufw allow 9420/tcp
sudo ufw allow 9425/tcp
sudo ufw reloadInstallation Methods
Using official MooseFS repositories provides the most stable installation with automatic dependency resolution.
Ubuntu/Debian Repository Setup
# Add MooseFS repository key
wget -O - https://ppa.moosefs.com/moosefs.key | sudo apt-key add -
# Add repository
echo 'deb http://ppa.moosefs.com/moosefs-3/apt/ubuntu/focal focal main' | sudo tee /etc/apt/sources.list.d/moosefs.list
sudo apt updateCentOS/Rocky Linux Repository Setup
# Create repository file
sudo tee /etc/yum.repos.d/MooseFS.repo << 'EOF'
[MooseFS]
name=MooseFS
baseurl=http://ppa.moosefs.com/moosefs-3/yum/el$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://ppa.moosefs.com/moosefs.key
EOFMaster Server Installation
The master server is the central metadata coordinator for your MooseFS cluster. Install and configure it first before setting up chunkservers.
sudo apt install -y moosefs-master moosefs-cgi moosefs-cgiserv moosefs-clisudo yum install -y moosefs-master moosefs-cgi moosefs-cgiserv moosefs-cliInitial Configuration
# Copy default configuration files
sudo cp /etc/mfs/mfsmaster.cfg.sample /etc/mfs/mfsmaster.cfg
sudo cp /etc/mfs/mfsexports.cfg.sample /etc/mfs/mfsexports.cfg
# Create initial metadata file
sudo cp /var/lib/mfs/metadata.mfs.empty /var/lib/mfs/metadata.mfs
# Set proper ownership
sudo chown -R mfs:mfs /var/lib/mfs
sudo chown -R mfs:mfs /etc/mfsMaster Server Configuration
# Basic Settings
WORKING_USER = mfs
WORKING_GROUP = mfs
SYSLOG_IDENT = mfsmaster
LOCK_MEMORY = 0
# Network Settings
MATOCL_LISTEN_HOST = *
MATOCL_LISTEN_PORT = 9421
MATOSC_LISTEN_HOST = *
MATOSC_LISTEN_PORT = 9420
# Performance Settings
CHUNKS_LOOP_MAX_CPS = 100000
CHUNKS_LOOP_MIN_TIME = 300
ACCEPTABLE_DIFFERENCE = 0.1Export Configuration
# Allow all operations from any IP
* / rw,alldirs,maproot=0
# Restrict access to specific network
192.168.1.0/24 / rw,alldirs,maproot=0sudo systemctl enable mfsmaster
sudo systemctl start mfsmaster
sudo systemctl status mfsmasterChunkserver Installation
Chunkservers provide the actual storage capacity for your MooseFS cluster. Deploy multiple chunkservers for redundancy and increased storage capacity.
sudo apt install -y moosefs-chunkserver moosefs-clisudo yum install -y moosefs-chunkserver moosefs-cliStorage Preparation
sudo mkdir -p /mnt/mfschunks
sudo chown mfs:mfs /mnt/mfschunksProduction Tip: Mount dedicated storage volumes to /mnt/mfschunks for optimal performance and data isolation.
Chunkserver Configuration
sudo cp /etc/mfs/mfschunkserver.cfg.sample /etc/mfs/mfschunkserver.cfg
sudo cp /etc/mfs/mfshdd.cfg.sample /etc/mfs/mfshdd.cfg# Basic Settings
WORKING_USER = mfs
WORKING_GROUP = mfs
SYSLOG_IDENT = mfschunkserver
# Master server connection
MASTER_HOST = MASTER_SERVER_IP
MASTER_PORT = 9420
# Network Settings
CSSERV_LISTEN_HOST = *
CSSERV_LISTEN_PORT = 9422# Add storage path
/mnt/mfschunkssudo systemctl enable mfschunkserver
sudo systemctl start mfschunkserver
sudo systemctl status mfschunkserverClient Installation & Mounting
sudo apt install -y moosefs-clientsudo yum install -y moosefs-clientMount Configuration
# Create mount point
sudo mkdir /mnt/mfs
# Mount the filesystem
sudo mfsmount /mnt/mfs -H MASTER_SERVER_IP
# Configure automatic mounting (add to /etc/fstab)
# mfsmount /mnt/mfs fuse defaults,mfsmaster=MASTER_SERVER_IP 0 0Monitoring & Management
CGI Web Interface
Enable the web-based monitoring interface on the master server:
sudo systemctl enable moosefs-cgiserv
sudo systemctl start moosefs-cgiserv🌐 Access the web interface at: http://MASTER_SERVER_IP:9425
Command Line Tools
Essential MooseFS CLI commands for management:
# Check cluster status
mfsgetgoal /mnt/mfs
# Set replication goal
mfssetgoal 2 /mnt/mfs/important_data
# Check chunk information
mfsfileinfo /mnt/mfs/file.txt
# Directory statistics
mfsdirinfo /mnt/mfsPerformance Optimization
Network Optimization
- • Use private networking between MooseFS nodes
- • Enable jumbo frames (MTU 9000) for improved throughput
- • Configure network bonding for redundancy
Storage Optimization
- • Use SSD storage for master server metadata
- • Distribute chunkservers across multiple zones
- • Use dedicated storage volumes
Security Configuration
Network Security
- • Restrict access to MooseFS ports using firewall rules
- • Use VPN or private networks for cluster communication
- • Configure SSL/TLS encryption for web interface
Access Control Example
# Secure export configuration
192.168.1.0/24 / rw,maproot=nobody:nogroup
192.168.1.100 /secure ro,maproot=rootTroubleshooting
Common Issues
- • Connection Refused: Check firewall rules and master server status
- • Mount Failed: Verify FUSE modules are loaded and user permissions
- • Chunkserver Disconnected: Check network connectivity and storage availability
Log Analysis
# Master server logs
sudo journalctl -u mfsmaster -f
# Chunkserver logs
sudo journalctl -u mfschunkserver -f
# System logs
tail -f /var/log/syslog | grep mfsReady to Deploy MooseFS?
Get started with RamNode's reliable VPS infrastructure for your distributed storage cluster.
