Why JuiceFS on RamNode VPS?
JuiceFS provides cloud-native distributed storage with unique advantages:
High Performance
Advanced caching and POSIX compliance for seamless application integration
Cost-Effective Scaling
Leverage object storage backends for economical storage growth
Built-in Security
Encryption and compression included out of the box
Multi-Platform
Support for Linux, macOS, and Windows environments
Prerequisites & System Requirements
Before starting, ensure you have:
Hardware Requirements
- • Minimum 1GB RAM (2GB+ recommended)
- • 10GB+ available disk space
- • RamNode VPS with root access
Software Requirements
- • Object storage (S3-compatible or local)
- • Metadata engine (Redis, MySQL, PostgreSQL, or SQLite)
- • Basic Linux administration knowledge
Operating System Support
- • Ubuntu 18.04+ (recommended for RamNode VPS)
- • Debian 9+ (Stretch and newer)
- • CentOS 7+ / RHEL 7+
- • Fedora 28+
Installation Process
Step 1: System Update and Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget gnupg2 software-properties-common
sudo apt install -y fuse uuid-runtime
sudo apt install -y build-essential gitStep 2: Download and Install JuiceFS
# Download JuiceFS binary
wget https://github.com/juicedata/juicefs/releases/latest/download/juicefs-linux-amd64.tar.gz
# Extract and install
tar -xzf juicefs-linux-amd64.tar.gz
sudo mv juicefs /usr/local/bin/
sudo chmod +x /usr/local/bin/juicefs
# Verify installation
juicefs versionStep 3: Configure FUSE
# Add user to fuse group
sudo usermod -a -G fuse $USER
# Configure FUSE settings
echo 'user_allow_other' | sudo tee -a /etc/fuse.conf
# Reload groups (or logout/login)
newgrp fuseMetadata Engine Configuration
JuiceFS supports multiple metadata engines. Choose based on your needs:
Option A: Redis Configuration (Recommended)
# Install Redis
sudo apt install -y redis-server
# Start and enable Redis
sudo systemctl start redis-server
sudo systemctl enable redis-server
# Test Redis connection
redis-cli ping# Add or modify these settings:
maxmemory 512mb
maxmemory-policy allkeys-lru
save 900 1
save 300 10
save 60 10000Option B: SQLite Configuration (Simple Setup)
SQLite requires no additional installation - metadata is stored in a local file:
# Create metadata directory
sudo mkdir -p /var/lib/juicefs
sudo chown $USER:$USER /var/lib/juicefs
# SQLite URL format:
# sqlite3:///var/lib/juicefs/metadata.dbObject Storage Setup
JuiceFS supports various object storage backends:
Option A: Local Storage (Development/Testing)
# Create local storage directory
sudo mkdir -p /var/lib/juicefs/storage
sudo chown $USER:$USER /var/lib/juicefs/storage
# Local storage URL format:
# file:///var/lib/juicefs/storageOption B: AWS S3 or S3-Compatible Storage
# Install AWS CLI
sudo apt install -y awscli
# Configure AWS credentials
aws configure
# Enter: Access Key ID, Secret Access Key, Region, Output format
# For S3-compatible storage:
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_ENDPOINT_URL="https://your-endpoint.com"
# S3 URL format:
# s3://your-bucket-name/path/Option C: MinIO (Self-hosted S3)
# Download and install MinIO
wget https://dl.min.io/server/minio/release/linux-amd64/minio
sudo mv minio /usr/local/bin/
sudo chmod +x /usr/local/bin/minio
# Create MinIO storage directory
sudo mkdir -p /var/lib/minio
sudo chown $USER:$USER /var/lib/minio
# Start MinIO server
export MINIO_ROOT_USER="minioadmin"
export MINIO_ROOT_PASSWORD="your-secure-password"
minio server /var/lib/minio --address ":9000" --console-address ":9001"
# MinIO URL format:
# minio://minioadmin:your-secure-password@localhost:9000/bucket-name/path/File System Creation and Mounting
Step 1: Format JuiceFS Volume
juicefs format \
--storage file \
--bucket /var/lib/juicefs/storage \
redis://localhost:6379/1 \
myvoljuicefs format \
--storage file \
--bucket /var/lib/juicefs/storage \
sqlite3:///var/lib/juicefs/metadata.db \
myvoljuicefs format \
--storage s3 \
--bucket s3://your-bucket-name \
redis://localhost:6379/1 \
myvolStep 2: Create Mount Point
sudo mkdir -p /mnt/juicefs
sudo chown $USER:$USER /mnt/juicefsStep 3: Mount JuiceFS
# Mount with Redis
juicefs mount redis://localhost:6379/1 /mnt/juicefs
# Mount with SQLite
juicefs mount sqlite3:///var/lib/juicefs/metadata.db /mnt/juicefs
# Mount in background (daemon mode)
juicefs mount -d redis://localhost:6379/1 /mnt/juicefsStep 4: Verify Mount
# Check if JuiceFS is mounted
df -h /mnt/juicefs | grep juicefs
# Test write operations
echo "Hello JuiceFS" > /mnt/juicefs/test.txt
cat /mnt/juicefs/test.txt
ls -la /mnt/juicefs/Performance Optimization
Cache Configuration
# Create dedicated cache directory
sudo mkdir -p /var/cache/juicefs
sudo chown $USER:$USER /var/cache/juicefs
# Mount with optimized cache settings
juicefs mount \
--cache-dir /var/cache/juicefs \
--cache-size 2048 \
--free-space-ratio 0.2 \
--cache-partial-only false \
redis://localhost:6379/1 /mnt/juicefsNetwork Optimization
juicefs mount \
--max-uploads 20 \
--max-downloads 20 \
--upload-limit 100 \
--download-limit 100 \
--buffer-size 300 \
redis://localhost:6379/1 /mnt/juicefsRedis Metadata Engine Tuning
maxmemory 1gb
maxmemory-policy allkeys-lru
tcp-keepalive 60
timeout 300sudo systemctl restart redis-serverSecurity Configuration
Encryption at Rest
# Generate encryption key
openssl rand -hex 32 > /etc/juicefs.key
sudo chmod 600 /etc/juicefs.key
# Format volume with encryption
juicefs format \
--storage s3 \
--bucket s3://your-encrypted-bucket \
--encrypt-rsa-key /etc/juicefs.key \
redis://localhost:6379/1 \
encrypted-volAccess Control
# Set proper permissions on mount point
sudo chown root:users /mnt/juicefs
sudo chmod 775 /mnt/juicefs
# Create user-specific directories
sudo mkdir -p /mnt/juicefs/users/$USER
sudo chown $USER:$USER /mnt/juicefs/users/$USER
sudo chmod 700 /mnt/juicefs/users/$USERFirewall Configuration
# Configure UFW firewall
sudo ufw allow 6379/tcp # Redis
sudo ufw allow 9000/tcp # MinIO (if using)
# For production, restrict Redis access to specific IPs
sudo ufw allow from 10.0.0.0/8 to any port 6379
sudo ufw deny 6379Monitoring & Maintenance
System Monitoring
# Check JuiceFS status
juicefs status redis://localhost:6379/1
# Monitor mount points
juicefs info /mnt/juicefs
# Check cache usage
du -sh /var/cache/juicefsLog Management
# Enable JuiceFS logging
mkdir -p /var/log/juicefs
# Mount with logging
juicefs mount \
--log /var/log/juicefs/mount.log \
--verbose \
redis://localhost:6379/1 /mnt/juicefs
# Monitor logs
tail -f /var/log/juicefs/mount.logMaintenance Tasks
# Clean cache periodically
juicefs warmup --cache-size 1024 /mnt/juicefs
# Check file system integrity
juicefs fsck redis://localhost:6379/1
# Update JuiceFS binary
wget https://github.com/juicedata/juicefs/releases/latest/download/juicefs-linux-amd64.tar.gz
tar -xzf juicefs-linux-amd64.tar.gz
sudo mv juicefs /usr/local/bin/Troubleshooting
Common Issues and Solutions
Issue: Mount fails with permission denied
# Check FUSE permissions
ls -la /dev/fuse
groups $USER
# Fix FUSE group membership
sudo usermod -a -G fuse $USER
newgrp fuse
# Verify fuse.conf
cat /etc/fuse.conf | grep user_allow_otherIssue: Metadata engine connection fails
# Test Redis connection
redis-cli -h localhost -p 6379 ping
# Check Redis logs
sudo journalctl -u redis-server -f
# Restart Redis
sudo systemctl restart redis-serverDiagnostic Commands
# Comprehensive system check
juicefs version
juicefs status redis://localhost:6379/1
juicefs info /mnt/juicefs
# Check mount status
mount | grep juicefs
ps aux | grep juicefs
lsof +f -- /mnt/juicefsBackup & Recovery
Metadata Backup
# Backup Redis metadata
redis-cli --rdb /backup/juicefs-metadata-$(date +%Y%m%d).rdb
# Backup SQLite metadata
cp /var/lib/juicefs/metadata.db /backup/metadata-$(date +%Y%m%d).dbAutomated Backup Script
#!/bin/bash
BACKUP_DIR="/backup/juicefs"
mkdir -p $BACKUP_DIR
DATE=$(date +%Y%m%d_%H%M%S)
# Backup metadata
if [[ -f /var/lib/juicefs/metadata.db ]]; then
cp /var/lib/juicefs/metadata.db $BACKUP_DIR/metadata_$DATE.db
else
redis-cli --rdb $BACKUP_DIR/metadata_$DATE.rdb
fi
# Backup configuration
cp /etc/juicefs.key $BACKUP_DIR/juicefs_$DATE.key 2>/dev/null || true
# Cleanup old backups (keep 7 days)
find $BACKUP_DIR -name "*" -mtime +7 -deleteDisaster Recovery
# Document your JuiceFS configuration
echo "# JuiceFS Recovery Information" > /root/juicefs-recovery.txt
echo "Metadata Engine: redis://localhost:6379/1" >> /root/juicefs-recovery.txt
echo "Object Storage: s3://your-bucket-name" >> /root/juicefs-recovery.txt
echo "Volume Name: myvol" >> /root/juicefs-recovery.txt
echo "Encryption Key: /etc/juicefs.key" >> /root/juicefs-recovery.txt
# Recovery steps:
# 1. Install JuiceFS on new server
# 2. Restore metadata engine
# 3. Configure object storage access
# 4. Mount existing volume
juicefs mount redis://localhost:6379/1 /mnt/juicefs-recoveredReady to Deploy JuiceFS?
Get started with RamNode's reliable VPS infrastructure for your cloud-native distributed storage.
