Got an old PC gathering dust? If its CPU can't handle your latest video projects, that doesn't mean it's useless. These machines often make perfect NAS servers. I recently built one that doubles as a Time Machine backup destination for my MacBook, and I'd like to walk you through how I did it.
When you're combining multiple hard drives into a single storage pool, you need something that keeps your data safe when a disk fails. The two main options are traditional RAID and ZFS. While both work well, I went with ZFS because it offers better data integrity checking and is more flexible for expansion.
The basic idea behind both systems is similar: they either mirror your data to a second disk or calculate parity data that can rebuild lost information. With mirroring (RAID-1), you sacrifice half your storage capacity but get the simplest form of redundancy. Your data exists in two places, so if one disk dies, you're covered.
If you want more usable space without buying twice as many disks, parity-based setups like RAID-5 (or raidz1 in ZFS terms) let you use N-1 disks worth of space from N total disks. The remaining space stores parity information that can reconstruct any single failed disk. RAID-6 (raidz2 in ZFS) takes this further, using N-2 disks of space but surviving two simultaneous disk failures.
For anyone serious about data storage and backup solutions, especially when working with multiple drives and redundancy requirements, 👉 explore cloud storage options that integrate seamlessly with on-premise NAS systems for hybrid backup strategies.
Here's where ZFS differs from traditional RAID in an important way. In ZFS, you first create VDEVs (virtual devices) from your physical disks. Each VDEV has its redundancy level locked at creation - you can't add extra disks to an existing VDEV later. The only way to expand is by adding entirely new VDEVs to your pool.
For example, I created one VDEV using two 12TB disks in mirror mode. If I need more space later, I'd add another VDEV with additional disks. The ZFS pool sits on top of all these VDEVs and presents them as unified storage. Plan accordingly, because this constraint matters when budgeting for future expansion.
I wanted 12TB of usable space with mirroring, so I bought two Seagate IronWolf 12TB drives. For software RAID or ZFS, you don't need enterprise-grade drives unless you're building hardware RAID, where cheaper drives might get flagged as failed due to slower response times.
Performance matters? Consider adding SSDs for caching. ZFS supports a Separate Intent Log (SLOG) on a dedicated SSD to speed up writes. For reads, increase your system RAM for the Adaptive Replacement Cache (ARC), and add a second SSD as Level 2 ARC (L2ARC). The commands look like this:
bash
zpool add mypool log nvme0
zpool add mypool cache nvme1
First, install the necessary tools:
bash
sudo apt install zfsutils-linux
Create a mirrored pool with two disks:
bash
sudo zpool create -o ashift=12 mypool mirror
ata-ST3000DM001-9YN166_S1F0KDGY
ata-ST3000DM001-9YN166_S1F0JKRR
The ashift=12 parameter optimizes performance for modern 4K sector drives. Those long ata- identifiers come from /dev/disk/by-id/ and ensure the right disks are used even if you rearrange cables.
Create a dataset for Time Machine backups:
bash
sudo zfs create -o compression=lz4 mypool/feynman_tm
sudo zfs set quota=2T mypool/feynman_tm
sudo chown feynman:caltech /mypool/feynman_tm
Apple has moved away from AFP (Apple Filing Protocol), so Samba is now the recommended way to share files with Macs. Install it:
bash
sudo apt install samba
Edit /etc/samba/smb.conf and add your share configuration:
[myTimeMachine]
comment = Time Machine Backup
path = /mypool/feynman_tm
browseable = yes
guest ok = no
writable = yes
valid users = feynman
vfs objects = fruit streams_xattr
fruit:metadata = stream
fruit:model = MacSamba
fruit:posix_rename = yes
fruit:time machine = yes
The fruit module makes Samba play nicely with macOS. Restart the service:
bash
sudo systemctl restart smbd.service
For organizations managing file sharing across multiple platforms and locations, 👉 discover enterprise file storage solutions that scale beyond single-server setups while maintaining data accessibility.
Open Finder and press Cmd+K. Enter smb://your_server_ip_address and provide your credentials. The shared folder should appear under Network in Finder's sidebar.
In Time Machine preferences, you'll see your NAS as an available backup destination. Select it, and Time Machine will create a sparsebundle file on the NAS containing all your backups in APFS format.
Time Machine creates a .sparsebundle disk image on your NAS. This image contains small "band" files, each 8MB by default. As your backup grows, more bands are added. For very large backups, you might want to increase the band size to avoid having millions of tiny files, which can impact performance on some filesystems.
Without a static public IP, remote access is tricky. Tailscale solves this beautifully. It's a zero-configuration VPN built on WireGuard that creates a secure network between your devices. Install it on both your NAS and MacBook, sign up with a Google account, and you can connect up to 100 devices on their free plan.
The setup takes minutes, and suddenly your NAS is accessible wherever you have internet, without exposing it to the public internet or wrestling with router configurations.
That's the core of it. You now have a redundant, expandable storage system that works seamlessly with Time Machine and is accessible from anywhere. The initial setup takes some work, but once it's running, it just works.