Post

Found An Old Nas In A Box In The Basement

Found An Old Nas In A Box In The Basement

Found An Old NAS In A Box In The Basement

Introduction

You’ve just opened a dusty cardboard box from the basement and uncovered a decade‑old network‑attached storage (NAS) appliance, complete with a handful of 6 TB WD Red drives. The moment you see those platters you probably think, “Gold mine!” – especially when storage prices are still climbing and data growth shows no sign of slowing down.

For anyone running a homelab or managing self‑hosted services, an unused NAS can be a fast‑track to a reliable, high‑capacity storage tier. But a device that has sat unpowered for ten years also carries hidden risks: firmware may be obsolete, drives could have developed bad sectors, and the original configuration is likely unknown.

In this guide we will walk through the entire lifecycle of reviving that forgotten NAS:

  1. Understanding what a NAS is, its evolution, and why it still matters in modern DevOps environments.
  2. Preparing the hardware and software prerequisites, including health checks for the drives.
  3. Installing a fresh, supported operating system (TrueNAS CORE, OpenMediaVault, or a Docker‑based solution) on the hardware.
  4. Configuring storage pools, network interfaces, and security hardening for production‑grade use.
  5. Operating the system day‑to‑day – monitoring, backups, scaling, and routine maintenance.
  6. Troubleshooting the most common failure modes you’ll encounter with legacy hardware.

By the end of this article you will have a fully functional, self‑hosted storage platform ready to serve backups, media libraries, and container volumes for your DevOps pipelines. The content is written for experienced sysadmins and DevOps engineers, so we’ll dive deep into SMART diagnostics, ZFS tuning, and automation with Ansible.


Understanding the Topic

What Is a NAS?

A Network‑Attached Storage (NAS) appliance is a dedicated server that provides file‑level storage over a network using protocols such as SMB/CIFS, NFS, AFP, and WebDAV. Unlike a direct‑attached storage (DAS) device, a NAS presents shared volumes to multiple clients, making it ideal for collaborative environments, backup targets, and media streaming.

Historical Perspective

YearMilestoneImpact
1999First consumer NAS (LinkStation)Brought RAID‑based storage to home users
2005Introduction of Linux‑based NAS firmware (Openfiler)Open‑source flexibility
2010ZFS integration in FreeNAS (now TrueNAS)Enterprise‑grade data integrity for the mass market
2015Docker support in NAS OSesEnables micro‑service workloads on the same hardware
2020‑2023Cloud‑native NAS features (S3 compatibility, replication)Bridges on‑prem and cloud storage

The evolution from proprietary firmware to open‑source platforms has made NAS devices far more extensible. Modern NAS OSes can run containers, host virtual machines, and expose object‑storage APIs, blurring the line between storage and compute.

Key Features and Capabilities

FeatureDescriptionTypical Use‑Case
RAID/ZFSData redundancy, self‑healing, snapshotsProtecting critical backups
SMB/NFSFile‑sharing protocols for Windows, Linux, macOSHome media libraries, CI/CD artifact storage
S3‑compatible APIObject storage interfaceIntegration with Terraform, Ansible, or cloud‑native apps
Docker/VM supportRun isolated services directly on the NASHosting Nextcloud, GitLab Runner, or monitoring agents
Replication & SyncRemote mirroring over SSH or rsyncDisaster recovery across sites
User & Group ManagementLDAP/AD integration, granular ACLsEnterprise access control

Pros and Cons

ProsCons
Centralized storage simplifies backup strategyLimited CPU/GPU compared to dedicated servers
ZFS provides data integrity and easy snapshotsPower consumption can be high for older hardware
Built‑in services reduce the need for separate VMsFirmware updates may be slower for legacy models
Easy web UI for quick configurationOlder hardware may lack ECC memory, affecting ZFS reliability

Ideal Use Cases

  • Home media server – Plex or Jellyfin libraries stored on a large pool of WD Red drives.
  • CI/CD artifact cache – Store Docker layers, Maven/Gradle caches, and build logs.
  • Backup target – Use ZFS snapshots and rsync to protect critical VMs and workstations.
  • Self‑hosted cloud – Deploy Nextcloud or Seafile for personal file sync.

The NAS market is now dominated by devices that support containerization and cloud‑native APIs. Expect tighter integration with Kubernetes (e.g., CSI drivers) and more AI‑accelerated workloads on higher‑end models. For a ten‑year‑old box, the focus should be on stability, data integrity, and automation rather than chasing the newest features.

Comparison with Alternatives

SolutionCostComplexityScalabilityTypical Performance
Legacy NAS (revived)Low (already owned)Medium (requires health checks)Limited by chassis baysAdequate for 6 TB drives
DIY NAS on a PCMedium (new hardware)High (manual ZFS setup)High (add more disks)Depends on CPU/RAM
Cloud Object Storage (S3)High (ongoing)Low (managed)UnlimitedNetwork‑bound latency
Hyper‑converged applianceHigh (enterprise)Low (integrated)Very highOptimized for VM workloads

For a homelab, reviving the old NAS offers the best ROI while still delivering enterprise‑grade data protection when configured correctly.


Prerequisites

Hardware Checklist

ComponentMinimum RequirementRecommended
CPU1 GHz dual‑core (most NAS boxes ship with Intel Celeron)2 GHz dual‑core or better
RAM2 GB (required for basic OS)8 GB ECC (for ZFS)
Drives6 TB WD Red × 4 (or any mix)All drives same capacity, preferably with SMART health
Network1 GbE NIC2 GbE or 10 GbE if heavy traffic
Power SupplyFunctional ATX/PC‑styleReplace if noisy or aged
ChassisClean, dust‑free, proper airflowAdd fans if needed

Tip: Even if the original NAS used a proprietary motherboard, you can repurpose the case and install a standard mini‑ITX board. This often yields better driver support and easier firmware updates.

Software Requirements

SoftwareMinimum VersionPurpose
TrueNAS CORE13.0‑U5 (or latest stable)ZFS‑based NAS OS
OpenMediaVault6.0 (latest)Debian‑based alternative
Docker Engine24.0+ (if using container‑based NAS)Run services like Nextcloud
smartmontools7.2+Drive health diagnostics
Ansible2.14+Automate configuration
SSH clientOpenSSH 8.0+Remote management

All software can be downloaded from the official project sites:

Network & Security Considerations

  • Static IP: Assign a reserved IP address via your DHCP server or configure a static address on the NAS.
  • Firewall: Limit inbound ports to SMB (445), NFS (2049), and SSH (22) from trusted subnets only.
  • TLS/SSL: Enable HTTPS for the web UI; generate a self‑signed certificate or use Let’s Encrypt if the NAS has a public FQDN.
  • User Permissions: Create dedicated service accounts for Docker containers and avoid using the root user for daily operations.

Pre‑Installation Checklist

  1. Power off the NAS, unplug all cables, and open the chassis.
  2. Visually inspect for dust, corrosion, or swollen capacitors. Clean with compressed air.
  3. Remove the drives and label them for later re‑insertion.
  4. Connect a monitor/keyboard to the motherboard (or use a USB‑to‑serial console if available).
  5. Boot a live Linux USB to run SMART tests on each drive (see next section).

Installation & Setup

1. Verify Drive Health with SMART

Before you trust a decade‑old drive, run a full SMART self‑test.

1
2
3
4
5
6
7
8
9
10
11
# Install smartmontools (Debian/Ubuntu example)
sudo apt-get update && sudo apt-get install -y smartmontools

# List all attached disks
lsblk -d -o NAME,SIZE,MODEL

# Run a short test on /dev/sda
sudo smartctl -t short /dev/sda

# Wait ~2 minutes, then view results
sudo smartctl -a /dev/sda | grep -E "SMART overall-health|Reallocated_Sector_Ct|Current_Pending_Sector"

Repeat for each drive (/dev/sdb, /dev/sdc, …).

Interpretation

SMART AttributeAcceptable RangeAction if Exceeded
Reallocated_Sector_Ct0Replace drive immediately
Current_Pending_Sector0Replace drive; data may be at risk
Power_On_Hours< 20 000 h (typical)Consider replacement if very high
Temperature_Celsius30‑45 °C (idle)Verify cooling if higher

If any drive shows non‑zero reallocated sectors or pending sectors, replace it before proceeding.

2. Choose the NAS Operating System

For a ZFS‑centric setup with robust snapshot capabilities, TrueNAS CORE is the most straightforward choice. If you prefer a Debian base and want to run additional services via apt, OpenMediaVault (OMV) is a solid alternative.

Below we cover the TrueNAS installation; the OMV steps are analogous and can be substituted where noted.

3. Create a Bootable Installer

1
2
3
4
5
6
# Download the ISO (example for TrueNAS CORE 13.0-U5)
wget -O /tmp/TrueNAS-Core-13.0-U5.iso https://download.freenas.org/13.0-U5/TrueNAS-13.0-U5.iso

# Write to a USB stick (replace /dev/sdx with your USB device)
sudo dd if=/tmp/TrueNAS-Core-13.0-U5.iso of=/dev/sdx bs=4M status=progress oflag=sync
sync

4. Install TrueNAS CORE

  1. Insert the USB installer and boot the NAS hardware.
  2. Choose “Install/Upgrade” from the boot menu.
  3. Select the boot drive (a small SSD or a dedicated USB stick). Do not install on the 6 TB data drives.
  4. Follow the on‑screen prompts; the installer will automatically partition the boot device.

After installation, the system will reboot and display the IP address assigned to the management interface.

5. Initial Web UI Configuration

Open a browser on a workstation in the same subnet and navigate to https://<NAS_IP>.

  • Login with the default credentials (root / root).
  • Change the root password immediately.
  • Set up a static IP under Network → Interfaces.

Security Note: Disable the root SSH login and create a non‑privileged admin user with sudo rights.

6. Create a ZFS Pool

Assuming all four 6 TB drives are healthy, we’ll build a RAID‑Z2 pool (double parity) for a good balance of capacity and fault tolerance.

1
2
3
4
5
# In the TrueNAS UI: Storage → Pools → Add → Create New Pool
# Name: tank
# Layout: RAID-Z2
# Disks: sda, sdb, sdc, sdd (all 6 TB)
# Enable “Enable Deduplication” only if you have > 64 GB RAM (not recommended for this box)

Resulting Capacity

Total RawParityUsable
24 TB12 TB (2 × 6 TB)~12 TB

7. Create Datasets for Different Services

Datasets allow granular control over compression, quotas, and snapshots.

DatasetPurposeRecommended Settings
tank/mediaPlex/Jellyfin media filescompression=lz4, quota=10TB
tank/backupsVM and workstation backupscompression=off, snapshot schedule=hourly
tank/dockerDocker volumes (if using Docker)compression=off, exec=on

Create them via Storage → Pools → Add Dataset and set the options accordingly.

8. Enable Services

ServiceProtocolPortActivation
SMB (Windows file sharing)SMB/CIFS445EnableSMBService
NFS (Linux/Unix)NFS2049EnableNFS
S3 (Object storage)S3 API443EnableS3
SSHSSH22EnableSSH (disable root login)
Docker (optional)Docker API2375/2376EnableDocker (if using TrueNAS SCALE)

Note: TrueNAS CORE does not ship Docker; for container workloads consider TrueNAS SCALE (Debian‑based) or run Docker on a separate VM.

9. Verify Installation

1
2
3
4
5
6
7
8
9
10
# Verify ZFS pool status
zpool status tank

# List datasets
zfs list

# Test SMB share from a Linux client
sudo apt-get install -y cifs-utils
sudo mount -t cifs //NAS_IP/media /mnt -o username=youruser,password=yourpass,vers=3.0
df -h /mnt

If the mount succeeds and you see the expected capacity, the core installation is functional.

Common Pitfalls and How to Avoid Them

SymptomLikely CauseFix
Boot fails after installing OSBoot device not set as first in BIOSReorder boot priority or reinstall to a known‑good USB/SSD
ZFS pool shows “DEGRADED”One drive failed SMART test or is not recognizedReplace the faulty drive and run zpool replace
SMB shares inaccessible from WindowsSMB1 disabled, or firewall blocks port 445Ensure SMB2/3 is enabled; open port 445 on the NAS firewall
Docker containers cannot write to datasetDataset has readonly flag or missing exec permissionSet exec=on on the dataset (zfs set exec=on tank/docker)

Configuration & Optimization

ZFS Tuning for Legacy Hardware

ParameterRecommended ValueReason
ashift12 (4 KB)Aligns with 4 KB sector drives; improves performance
recordsize128 KB for media, 16 KB for databasesMatches typical I/O patterns
compressionlz4 (fast, low CPU)Saves space without noticeable latency
deduplicationDisabled unless > 64 GB ECC RAMDedup is RAM‑intensive and can cause OOM on small boxes

You can set these at dataset creation or modify later:

1
2
3
4
5
# Example: set recordsize for media dataset
zfs set recordsize=128k tank/media

# Enable LZ4 compression on backups dataset
zfs set compression=lz4 tank/backups

Security Hardening

  1. SSH Hardening – Edit /etc/ssh/sshd_config (via the TrueNAS Shell)
1
2
# Disable root login

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