Post

4 Bay Nas Lenovo M920Q

4 Bay Nas Lenovo M920Q

4 Bay NAS Lenovo M920Q: Enterprise-Grade Storage in a Compact Homelab Package

Introduction

In the era of data explosion and remote work, DevOps engineers and homelab enthusiasts face a critical challenge: how to build enterprise-grade network-attached storage (NAS) solutions that balance performance, capacity, and physical footprint. The Lenovo ThinkCentre M920Q Tiny - a device smaller than most consumer routers - emerges as an unlikely hero in this space when transformed into a 4-bay NAS running TrueNAS Scale.

This comprehensive guide explores how to leverage Lenovo’s compact powerhouse for serious storage workloads. We’ll dissect a real-world implementation documented on MakerWorld that transforms the M920Q into a fully-fledged ZFS-based NAS capable of handling everything from media streaming to VM storage. For DevOps professionals managing self-hosted infrastructure, this solution offers an ideal balance between enterprise storage capabilities and homelab practicality.

You’ll learn:

  • Hardware modifications required for 4-drive support
  • TrueNAS Scale configuration optimized for small-form-factor hardware
  • ZFS pool design considerations for compact enclosures
  • Performance tuning for resource-constrained environments
  • Enterprise-grade data protection strategies in a homelab package

This implementation demonstrates how modern compact PCs can rival traditional rack-mounted NAS solutions when properly configured, offering DevOps engineers a power-efficient alternative for edge computing scenarios, backup targets, or secondary storage nodes.

Understanding the Technology Stack

The Lenovo M920Q Hardware Platform

The ThinkCentre M920Q Tiny (and its M720Q sibling) represents Lenovo’s ultra-compact workstation line featuring:

  • Intel 8th/9th Gen Core processors (up to i7-8700T)
  • Dual DDR4 SO-DIMM slots (64GB max)
  • PCIe 3.0 x4 via riser card
  • 2.5GbE LAN (Intel I219-LM) with optional 10GbE via PCIe
  • USB 3.1 Gen 2 (10Gbps) Type-C ports

Why it works for NAS duty:

  • 35W TDP CPUs provide sufficient horsepower for ZFS operations
  • PCIe expansion enables high-speed networking
  • Robust power supply (65W/90W) handles multiple drives
  • Industrial-grade build quality ensures 24/7 reliability

TrueNAS Scale Architecture

TrueNAS SCALE (22.12.3 “Bluefin” LTS) brings Linux-based scale-out storage features to the platform:

  1. ZFS Integration:
    • Adaptive Replacement Cache (ARC)
    • Copy-on-Write (CoW) transactions
    • Snapshots and replication
    • Built-in compression (LZ4, ZSTD)
  2. Kubernetes Orchestration:
    • Helm chart support
    • PVC storage provisioning
    • Containerized applications via Launch Docker
  3. WebUI Management:
    • Pool creation wizard
    • SMB/NFS/iSCSI sharing
    • Real-time monitoring

4-Bay Expansion Mechanics

The MakerWorld implementation uses a custom 3D-printed chassis extension that adds four 2.5”/3.5” drive bays connected via:

  1. Native SATA (2 ports)
  2. PCIe to SATA expansion (2 ports)
  3. Optional USB 3.1 for additional expansion

Electrical considerations:

  • Total power draw < 45W (4x HDDs)
  • SATA power via motherboard header + Molex splitter
  • Thermal management with 40mm exhaust fans

Comparison Matrix: M920Q NAS vs Alternatives

FeatureM920Q NASSynology DS923+DIY Mini-ITX
Form Factor1.4L8.6L15L+
Max Drives4 (internal)4 (+5 via expansion)6-8
CPUIntel i5-8500TAMD Ryzen R1600Custom
ECC SupportNoNoOptional
10GbE OptionPCIe add-onPCIe add-onBuilt-in
Power Consumption18W idle, 45W load28W idle, 65W load35W idle, 80W load
ZFS SupportNative (TrueNAS)Limited (Synology)Full

Prerequisites

Hardware Requirements

  1. Base Unit:
    • Lenovo M920Q/M720Q (i5-8500T or better)
    • 16GB DDR4 RAM (minimum, 32GB recommended)
    • 128GB NVMe boot drive
  2. Storage Expansion:
    • 4x SATA drives (2.5” or 3.5”)
    • StarTech PEXSAT32 PCIe SATA controller
    • SATA power splitter cable
    • 3D-printed drive cage (MakerWorld template)
  3. Networking:
    • 2.5GbE built-in (Intel I219-LM)
    • Optional: Mellanox ConnectX-3 10GbE NIC

Software Requirements

  • TrueNAS SCALE 22.12.3+ (Download)
  • Ventoy 1.0.88+ for USB creation (GitHub)
  • IPMI tools for headless management (optional)

Pre-Installation Checklist

  1. Hardware Validation:
    1
    2
    3
    
    dmidecode -t system  # Verify model
    lspci -nn | grep -i sata  # Confirm controller detection
    smartctl -a /dev/sda  # Check drive health
    
  2. BIOS Configuration:
    • Secure Boot: Disabled
    • SATA Mode: AHCI
    • Power: Always On
    • Boot Order: USB First
  3. Network Preparation:
    • Static IP reservation in DHCP server
    • VLAN assignment (if segmenting storage traffic)
    • Switch port configured for Jumbo Frames (9000 MTU)

Installation & Configuration

Step 1: Drive Cage Assembly

Follow the MakerWorld guide for:

  1. Printing PETG components
  2. Installing cooling fans (+5V to USB header)
  3. Mounting drives with vibration dampeners
  4. Routing SATA/power cables through chassis

Step 2: TrueNAS SCALE Installation

  1. Create boot media:
    1
    2
    
    ventoy -i /dev/sdX  # Format USB
    cp TrueNAS-SCALE-22.12.3.1.iso /mnt/ventoy/
    
  2. Boot installer and select:
    • Install/Upgrade
    • Boot pool on NVMe (mirror optional)
    • Manual partitioning (whole disk)
  3. Post-install setup:
    1
    2
    3
    4
    5
    
    # Verify ZFS boot pool
    zpool status boot-pool
    
    # Set root password
    passwd
    

Step 3: Storage Pool Creation

Optimal ZFS Configuration for 4 Drives:

ParameterRecommendationRationale
Pool TypeRAIDZ1Balance capacity/performance
Ashift12 (4K sectors)Modern drive alignment
Compressionlz4Low CPU overhead
Recordsize1MMedia/file storage
AtimeoffReduce metadata writes
DedupoffAvoid RAM exhaustion

Creating the Pool via CLI:

1
2
3
4
5
6
7
8
9
zpool create -o ashift=12 tank raidz1 \
  /dev/disk/by-id/ata-HGST_HUS724040ALA640_PN2334P6K3V5BM \
  /dev/disk/by-id/ata-HGST_HUS724040ALA640_PN2334P6K3V5BN \
  /dev/disk/by-id/ata-HGST_HUS724040ALA640_PN2334P6K3V5BO \
  /dev/disk/by-id/ata-HGST_HUS724040ALA640_PN2334P6K3V5BP

zfs set compression=lz4 tank
zfs set atime=off tank
zfs set recordsize=1M tank

Step 4: Network Configuration

10GbE Tuning (if equipped):

1
2
3
4
5
6
7
8
# Set MTU
ip link set enp3s0 mtu 9000

# Optimize ring buffers
ethtool -G enp3s0 rx 4096 tx 4096

# Enable flow control
ethtool -A enp3s0 rx on tx on

TrueNAS WebUI Setup:

  1. Interfaces > Add Interface (bond optional)
  2. Static IP assignment
  3. Services > Enable SMB/NFS/iSCSI
  4. Configure dataset permissions

Performance Optimization

ZFS Memory Management

Arc Size Calculation:

1
2
# Target 20% of RAM for ARC (32GB system)
echo 6442450944 > /sys/module/zfs/parameters/zfs_arc_max

Monitoring ARC Efficiency:

1
arcstat -p -f time,hits,miss,read,hit%,mru,mfu 1

SSD Caching Strategies

Given limited PCIe slots, consider:

  1. Metadata-Only VDEV:
    1
    2
    3
    
    zpool add tank special mirror \
      /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S3WYNM0T123456 \
      /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S3WYNM0T123457
    
  2. L2ARC on NVMe (if RAM < 32GB):
    1
    2
    
    zpool add tank cache \
      /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S3WYNM0T123456
    

SMB Tuning for Media Streaming

/etc/smb4.conf Overrides:

1
2
3
4
5
6
7
[global]
    aio read size = 1
    aio write size = 1
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    getwd cache = yes
    write cache size = 262144
    strict sync = no

Security Hardening

Access Controls

  1. Dataset Permissions:
    1
    2
    3
    4
    
    zfs create tank/media
    zfs set acltype=posixacl tank/media
    chmod 2750 /mnt/tank/media
    setfacl -m g:media:rwx /mnt/tank/media
    
  2. SMB Share Restrictions:
    1
    2
    3
    4
    5
    6
    
    [Media]
       path = /mnt/tank/media
       valid users = @media
       hosts deny = ALL
       hosts allow = 192.168.10.0/24
       veto files = /.DS_Store/.Trashes/
    

Network Protections

  1. Firewall Rules (via TrueNAS UI): | Port | Protocol | Source | Action | |——-|———-|—————-|———-| | 22 | TCP | Admin VLAN | Allow | | 139/445| TCP | Media VLAN | Allow | | 111 | TCP/UDP | Backup Server | Allow | | ALL | ANY | ANY | Deny |

  2. SSH Hardening:

    1
    2
    3
    4
    5
    
    # /etc/ssh/sshd_config.d/99-hardening.conf
    PermitRootLogin prohibit-password
    PasswordAuthentication no
    MaxAuthTries 3
    ClientAliveInterval 300
    

Kubernetes Workload Integration

Storage Class Configuration

tank-iscsi.yaml:

1
2
3
4
5
6
7
8
9
10
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: truenas-iscsi
provisioner: csi.truenas.com
parameters:
  fsType: zfs
  pool: tank/k8s
reclaimPolicy: Retain
allowVolumeExpansion: true

Docker Container Deployment

Running Immich Photo Server:

1
2
3
4
5
6
docker run -d --name immich \
  -e TZ=America/New_York \
  -v /mnt/tank/media/photos:/usr/src/app/upload \
  -p 2283:2283 \
  --restart unless-stopped \
  altran1502/immich-server:release

Container Monitoring:

1
docker stats --format "table \t\t\t"

Troubleshooting Guide

Common Issues and Solutions

1. Drive Not Detected

1
2
3
4
5
# Rescan SATA bus
echo "- - -" > /sys/class/scsi_host/host0/scan

# Check dmesg
dmesg | grep -i sata

2. ZFS Corruption Errors

1
2
3
4
5
6
7
8
9
# Scrub pool
zpool scrub tank

# Check errors
zpool status -v

# Export/import
zpool export tank
zpool import -d /dev/disk/by-id tank

3. SMB Performance Issues

1
2
3
4
5
# Check connection status
smbstatus -p

# Test throughput
dd if=/dev/zero of=/mnt/tank/testfile bs=1G count=4 oflag=direct

Performance Diagnostic Toolkit

1
2
3
4
5
6
7
8
9
10
11
# ZFS I/O statistics
zpool iostat -v 1

# Network bottlenecks
iftop -i enp3s0 -P

# CPU/memory profile
htop

# Latency analysis
ioping -c 100 /mnt/tank

Conclusion

The Lenovo M920Q 4-bay NAS project demonstrates how enterprise-grade storage solutions can be implemented in compact form factors without sacrificing ZFS reliability or TrueNAS functionality. By leveraging proper hardware modifications, thoughtful ZFS configuration, and performance tuning, DevOps engineers can deploy powerful storage nodes that fit in network closets or edge locations.

Key takeaways from this implementation:

  1. Density Matters: With 40TB+ raw capacity in 1.4L chassis, these micro-NAS units achieve unprecedented storage density
  2. ZFS Optimizations: Proper recordsize, ashift, and compression settings overcome hardware limitations
  3. Thermal Realities: Active cooling is mandatory for 3.5” drives in confined spaces
  4. Network Constraints: 2.5GbE/10GbE is essential to fully utilize ZFS performance

For those looking to expand this setup:

  • Implement TrueNAS replication to secondary nodes
  • Experiment with Kubernetes storage provisioning
  • Add UPS control via NUT (Network UPS Tools)
  • Integrate with monitoring stacks (Prometheus/Grafana)

Further Resources:

This post is licensed under CC BY 4.0 by the author.