Files
HomeAudit/dev_documentation/infrastructure/SMB_VS_NFS_DECISION.md
admin 705a2757c1 Major infrastructure migration and Vaultwarden PostgreSQL troubleshooting
COMPREHENSIVE CHANGES:

INFRASTRUCTURE MIGRATION:
- Migrated services to Docker Swarm on OMV800 (192.168.50.229)
- Deployed PostgreSQL database for Vaultwarden migration
- Updated all stack configurations for Docker Swarm compatibility
- Added comprehensive monitoring stack (Prometheus, Grafana, Blackbox)
- Implemented proper secret management for all services

VAULTWARDEN POSTGRESQL MIGRATION:
- Attempted migration from SQLite to PostgreSQL for NFS compatibility
- Created PostgreSQL stack with proper user/password configuration
- Built custom Vaultwarden image with PostgreSQL support
- Troubleshot persistent SQLite fallback issue despite PostgreSQL config
- Identified known issue where Vaultwarden silently falls back to SQLite
- Added ENABLE_DB_WAL=false to prevent filesystem compatibility issues
- Current status: Old Vaultwarden on lenovo410 still working, new one has config issues

PAPERLESS SERVICES:
- Successfully deployed Paperless-NGX and Paperless-AI on OMV800
- Both services running on ports 8000 and 3000 respectively
- Caddy configuration updated for external access
- Services accessible via paperless.pressmess.duckdns.org and paperless-ai.pressmess.duckdns.org

CADDY CONFIGURATION:
- Updated Caddyfile on Surface (192.168.50.254) for new service locations
- Fixed Vaultwarden reverse proxy to point to new Docker Swarm service
- Removed old notification hub reference that was causing conflicts
- All services properly configured for external access via DuckDNS

BACKUP AND DISCOVERY:
- Created comprehensive backup system for all hosts
- Generated detailed discovery reports for infrastructure analysis
- Implemented automated backup validation scripts
- Created migration progress tracking and verification reports

MONITORING STACK:
- Deployed Prometheus, Grafana, and Blackbox monitoring
- Created infrastructure and system overview dashboards
- Added proper service discovery and alerting configuration
- Implemented performance monitoring for all critical services

DOCUMENTATION:
- Reorganized documentation into logical structure
- Created comprehensive migration playbook and troubleshooting guides
- Added hardware specifications and optimization recommendations
- Documented all configuration changes and service dependencies

CURRENT STATUS:
- Paperless services:  Working and accessible externally
- Vaultwarden:  PostgreSQL configuration issues, old instance still working
- Monitoring:  Deployed and operational
- Caddy:  Updated and working for external access
- PostgreSQL:  Database running, connection issues with Vaultwarden

NEXT STEPS:
- Continue troubleshooting Vaultwarden PostgreSQL configuration
- Consider alternative approaches for Vaultwarden migration
- Validate all external service access
- Complete final migration validation

TECHNICAL NOTES:
- Used Docker Swarm for orchestration on OMV800
- Implemented proper secret management for sensitive data
- Added comprehensive logging and monitoring
- Created automated backup and validation scripts
2025-08-30 20:18:44 -04:00

6.9 KiB

SMB vs NFS DECISION GUIDE - HOMELAB MIGRATION

Storage Strategy Analysis for Your Infrastructure
Generated: 2025-08-29
Status: DECISION NEEDED - RECOMMENDATION PROVIDED


🎯 EXECUTIVE SUMMARY

Current State: 15 SMB shares working well, 19 NFS export directories created
Recommendation: Use SMB for most services, NFS only where required
Rationale: Simpler, more reliable, already working for your 1-3 user homelab


📊 CURRENT STORAGE ANALYSIS

SMB Shares (15 Active)

# DataPool Shares (Media & User Data)
[Movies]: /srv/mergerfs/DataPool/Movies/
[immich]: /srv/mergerfs/DataPool/immich/
[pdfs]: /srv/mergerfs/DataPool/pdfs/
[pictures]: /srv/mergerfs/DataPool/pictures/
[tv_shows]: /srv/mergerfs/DataPool/tv_shows/
[vault]: /srv/mergerfs/DataPool/vault/
[trilium_data]: /srv/mergerfs/DataPool/trilium_data/
[appflowy]: /srv/mergerfs/DataPool/appflowy/
[loqseq_data]: /srv/mergerfs/DataPool/loqseq_data/

# PressCloud Shares (System & Docker)
[backups]: /srv/mergerfs/presscloud/backups/
[docker]: /srv/mergerfs/presscloud/docker/
[volumes]: /srv/mergerfs/presscloud/docker/volumes/
[docker-memory]: /srv/mergerfs/presscloud/docker-memory/

NFS Exports (19 Directories)

# Service Configuration Directories
adguard/          # DNS filtering config
caddy/            # Reverse proxy config
gitea/            # Git repositories
homeassistant/    # Home automation config
jellyfin/         # Media server config
ollama/           # AI models
paperless/        # Document management
vaultwarden/      # Password manager

# Data Directories (Bind Mounted to Mergerfs)
appflowy/         # AppFlowy data
immich/           # Photo data
media/            # General media
nextcloud/        # Cloud storage data
pdfs/             # PDF storage
pictures/         # Photo storage
trilium_data/     # Notes data
tv_shows/         # TV show storage

🔄 SMB vs NFS COMPARISON

SMB Advantages (For Your Homelab)

Already Working: 15 shares active, 2 devices connected
Simpler Setup: No complex export configuration needed
Better Reliability: Less prone to network issues
Guest Access: Easy file sharing for personal use
Windows Compatible: Works with all your devices
Performance: Direct mergerfs access (good speed)
Less Maintenance: Fewer moving parts to break

NFS Advantages (For Docker)

Docker Native: Better integration with containers
Unix Permissions: Preserves file ownership/perms
Network Efficiency: Lower overhead for many small files
Locking: Better file locking for databases
Scalability: Better for many concurrent users

SMB Disadvantages

Docker Integration: Requires extra configuration
File Locking: Less reliable for databases
Performance: Higher overhead for many small files
Permissions: Windows-style permissions

NFS Disadvantages

Complexity: More configuration required
Reliability: More prone to network issues
Troubleshooting: Harder to debug problems
Setup Time: Requires OMV web interface configuration


For Your 1-3 User Homelab:

Use SMB For:

  • User Data Access: Photos, documents, media files
  • Backup Storage: System backups and snapshots
  • File Sharing: Direct access from Windows/Linux/Mac
  • Media Libraries: Movies, TV shows, music
  • Personal Files: Documents, pictures, vault data

Use NFS For:

  • Docker Services: Only services that specifically require NFS
  • Database Storage: PostgreSQL, MariaDB data directories
  • Configuration Files: Service configs that need Unix permissions
  • High-Performance Apps: Services with many small file operations

Specific Service Recommendations:

Service Recommended Storage Reason
Jellyfin SMB Media files, simple access
Immich SMB Photo storage, user access
Nextcloud SMB File sharing, user access
Home Assistant NFS Configuration, database
Paperless-NGX NFS Document database
Gitea NFS Git repositories, permissions
Vaultwarden NFS Database, security
AdGuard NFS Configuration files
Caddy NFS SSL certificates, config

🚀 IMPLEMENTATION PLAN

# 1. Keep all existing SMB shares
# 2. Use SMB for user data and media
# 3. Only configure NFS for services that require it
# 4. Simplify migration by reducing complexity

Benefits:

  • Faster migration (less configuration)
  • More reliable (fewer moving parts)
  • Easier troubleshooting
  • Better user experience

Option B: NFS-First Approach

# 1. Configure all NFS exports via OMV web interface
# 2. Migrate all services to use NFS
# 3. Keep SMB for user file access only
# 4. More complex but "proper" Docker setup

Benefits:

  • "Proper" Docker architecture
  • Better for future scaling
  • More enterprise-like setup

📋 DECISION MATRIX

For Your Use Case (1-3 users, personal homelab):

Factor SMB NFS Winner
Setup Complexity Low High SMB
Reliability High Medium SMB
Performance Good Better NFS
Troubleshooting Easy Hard SMB
User Experience Great Good SMB
Docker Integration Fair Excellent NFS
Maintenance Low High SMB
Future-Proofing Fair Excellent NFS

Overall Winner: SMB (6-2 score for your use case)


🎯 FINAL RECOMMENDATION

Hybrid Approach (Best of Both Worlds):

  1. Keep SMB as Primary Storage:

    • Use existing 15 SMB shares for user data
    • No additional configuration needed
    • Reliable and simple
  2. Use NFS Only Where Required:

    • Home Assistant configuration
    • Database storage (PostgreSQL, MariaDB)
    • Services with specific NFS requirements
  3. Migration Strategy:

    • Start with SMB for everything
    • Only add NFS exports for services that fail
    • Keep it simple and reliable

Immediate Actions:

# 1. Test Docker services with SMB first
# 2. Only configure NFS for services that require it
# 3. Focus on getting services working, not perfect architecture
# 4. Optimize later if needed

CONCLUSION

For your 1-3 user homelab, SMB is the better choice. It's simpler, more reliable, and already working. You can always add NFS later for specific services that need it.

Recommendation: Start with SMB, add NFS only where required.

Migration Impact: Positive - simpler, faster, more reliable migration.


Document Status: Decision Guide Complete
Next Action: Choose SMB-first approach and proceed with migration
Risk Level: LOW - SMB is proven and reliable