Post

Turned An M920Q Into A Nas

Turned An M920Q Into A NAS: A Homelab Storage Transformation Guide

1. Introduction

For DevOps engineers and sysadmins running homelabs, the eternal challenge is balancing storage capacity, power efficiency, and physical footprint. When Lenovo’s Tiny series M920q appears on your bench, its compact 1L form factor (183.5 × 178.5 × 34.7 mm) and enterprise-grade hardware (6th/7th Gen Intel Core processors, up to 64GB DDR4) present intriguing possibilities.

The original Reddit user’s approach demonstrates a fundamental DevOps principle: repurpose before replace. By combining the M920q’s compute power with an LSI 9211-8i HBA and reclaimed hard drives, they achieved:

  • 56% reduced power consumption vs. traditional servers (typical idle: 10-15W vs 25-40W)
  • Enterprise-grade connectivity (PCIe 3.0 x8 slot via riser)
  • Hardware-accelerated encryption (Intel AES-NI support)

In this 3,500-word technical deep dive, we’ll explore:

  • SAS HBA integration in space-constrained systems
  • Thermal management strategies for dense storage configurations
  • Unraid deployment optimized for low-power hardware
  • Enterprise-grade storage practices adapted to SFF environments

2. Understanding SFF NAS Implementations

2.1 Hardware Foundations

The M920q’s technical specifications create both opportunities and constraints:

ComponentSpecificationNAS Implications
CPUi5-6500T to i7-6700T (35W TDP)AES-NI for encrypted storage
RAM2×SO-DIMM DDR4 (Non-ECC)Limits ZFS implementations
PCIe3.0 x8 (via proprietary riser)Supports HBAs but not full-height
SATA2×6Gbps (1×M.2 NVMe optional)Insufficient for direct drive attach
NetworkingIntel I219-LM Gigabit Ethernet1GbE bottleneck for multi-drive arrays

2.2 Storage Expansion Challenges

The Redditor’s LSI 9211-8i solution addresses the fundamental SFF constraint: physical drive connectivity. This PCIe 3.0 HBA supports:

  • 8 SAS/SATA ports (SFF-8087 connector)
  • Hardware RAID (IR mode) or IT mode for software control
  • 6Gbps throughput per port

Critical Implementation Notes:

  1. Physical Clearance: The M920q’s 34.7mm height requires low-profile PCIe brackets and careful SAS cable routing
  2. Thermal Constraints: HBAs add 10-15W thermal load in a chassis originally designed for 35W TDP CPUs
  3. Power Delivery: The 65W external brick limits drive count (typical 3.5” HDD: 20W spin-up, 6W operational)

2.3 Software Selection: Unraid vs Alternatives

Unraid was chosen in the original build for good reason:

Unraid Advantages:

  • Flexible drive pooling (no matched drive sizes required)
  • Docker/KVM support on low-core-count CPUs
  • RAM-efficient (no ZFS ARC requirement)

Comparative Analysis:

FeatureUnraidTrueNAS COREOpenMediaVault
File SystemProprietary parityZFSEXT4/BTRFS
Minimum RAM2GB8GB+1GB
ECC RequirementNoStrongly RecommendedNo
Hardware AccelerationLimitedZFS-specificDepends on FS

3. Prerequisites

3.1 Hardware Bill of Materials

Core Components:

  • Lenovo M920q (i5-6500T minimum recommended)
  • LSI 9211-8i HBA (flashed to P20 IT firmware)
  • SAS SFF-8087 to 4x SATA breakout cables (right-angle recommended)
  • 2.5” or 3.5” drives (SAS/SATA, consider helium-filled for thermal efficiency)

Critical Compatibility Checks:

  1. Verify PCIe riser version supports x8 electrical (M920q requires P/N 01AJ940)
  2. Confirm HBA firmware version:
    1
    2
    3
    4
    
    sas2flash -listall  
    # Expected output for IT mode:  
    # Firmware Version: 20.00.07.00  
    # NVDATA Version: 14.01.00.06  
    
  3. Calculate power requirements:
    1
    2
    
    Total Power = CPU TDP (35W) + HBA (10W) + (Drive Count × 6W)  
    Example: 35 + 10 + (4×6) = 69W → Within 65W PSU tolerance during spin-up  
    

3.2 Software Requirements

  • Unraid 6.12+ (USB Creator Tool)
  • M920q BIOS version R0YET66W (1.49) or newer for PCIe stability
  • SAS2Flash v20.00.00.00 for HBA firmware updates

4. Installation & Configuration

4.1 Hardware Modifications

Step 1: HBA Preparation
Flash to IT mode if necessary:

1
2
3
sas2flash -o -e 6        # Erase flash  
sas2flash -o -f 2118it.bin -b mptsas2.rom  # Flash IT firmware  
sas2flash -o -sasadd 500605b-xxxxxxxx      # Restore SAS address  

Step 2: Physical Integration

  1. Remove M920q bottom panel (T8 Torx screwdriver required)
  2. Install PCIe riser if not present
  3. Mount HBA using low-profile bracket
  4. Route SAS cables through front ventilation gaps (alternative to case modification)

Thermal Management:

1
2
3
4
5
6
Monitor temperatures with:  
sensors-detect && sensors  
# Critical thresholds:  
# CPU: >85°C  
# HBA: >70°C  
# HDD: >55°C  

4.2 Unraid Deployment

Boot Media Preparation:

1
2
# Linux method  
dd if=unRAIDServer-6.12.8-x86_64.zip of=/dev/sdX bs=1M status=progress  

Initial Array Configuration:

  1. Assign drives:
    • Parity: Largest drive (optional)
    • Data: Remaining drives
    • Cache: SSD (M.2 slot recommended if available)
  2. Set share parameters:
    • Split Level: Auto (prevents directory fragmentation)
    • Allocation Method: High-water (balances drive usage)
    • Included Disks: Exclude cache for primary storage

Network Configuration:

1
2
3
4
5
6
# /boot/config/network.cfg  
USE_DHCP=no  
IPADDR=192.168.1.50  
NETMASK=255.255.255.0  
GATEWAY=192.168.1.1  
DNS_SERVER1=192.168.1.1  

5. Advanced Configuration

5.1 Performance Optimization

HBA Tuning:

1
2
3
# /boot/config/go (Unraid startup script)  
echo 128 > /sys/block/sdX/queue/nr_requests  
echo deadline > /sys/block/sdX/queue/scheduler  

Unraid Turbo Write:

1
2
3
Settings → Disk Settings →  
  Tunable (md_write_method): reconstruct write  
  Enable turbo write: Yes  

5.2 Security Hardening

SSH Configuration:

1
2
3
4
5
# /boot/config/ssh/sshd_config  
PermitRootLogin no  
PasswordAuthentication no  
AllowUsers nas_admin  
Protocol 2  

SMB Security:

1
2
3
4
5
# /boot/config/smb-extra.conf  
[global]  
server min protocol = SMB3_11  
encrypt passwords = yes  
smb encrypt = required  

6. Operational Management

6.1 Monitoring Stack

Netdata Deployment:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Unraid Community Applications  
docker run -d --name=netdata \  
  --pid=host \  
  --network=host \  
  -v netdataconfig:/etc/netdata \  
  -v netdatalib:/var/lib/netdata \  
  -v netdatacache:/var/cache/netdata \  
  -v /etc/passwd:/host/etc/passwd:ro \  
  -v /etc/group:/host/etc/group:ro \  
  -v /proc:/host/proc:ro \  
  -v /sys:/host/sys:ro \  
  -v /etc/os-release:/host/etc/os-release:ro \  
  --restart unless-stopped \  
  --cap-add SYS_PTRACE \  
  --security-opt apparmor=unconfined \  
  netdata/netdata  

Key Metrics to Alert:

  • Drive SMART 187 (Reported Uncorrect) > 0
  • HBA temperature > 65°C
  • Monthly array parity check duration increase >15%

7. Troubleshooting

7.1 Common Issues

Drive Not Detected:

  1. Verify HBA firmware:
    1
    2
    
    lspci -vvv | grep -i lsi  
    # Should show: Subsystem: LSI Logic / Symbios Logic SAS2008  
    
  2. Check drive spin-up sequencing:
    1
    
    Delay between drive power-on: ≥1.5 seconds  
    

Performance Degradation:

1
2
3
4
5
# Identify I/O bottlenecks  
iostat -xmdz 1  
# Check for:  
# %util >90% → Drive overload  
# await >50ms → Latency issues  

Thermal Throttling:

1
2
3
4
5
watch -n 1 "cat /sys/class/thermal/thermal_zone*/temp"  
# If >85°C:  
# 1. Add 40mm exhaust fan (3D printed mount)  
# 2. Undervolt CPU:  
echo "56" > /sys/devices/system/cpu/intel_pstate/max_perf_pct  

8. Conclusion

This M920q NAS transformation demonstrates how enterprise DevOps principles apply to homelab environments:

  1. Resource Optimization: Maximizing existing hardware ROI
  2. Performance Tuning: Adapting configurations to constrained environments
  3. Monitoring: Implementing production-grade observability

For further exploration:

The compact NAS space continues evolving—with PCIe 4.0 SFF systems and 22TB drives now available, the principles demonstrated here scale to even denser storage deployments.

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