Ramblings of an aging IT geek
← Ramblings of an aging IT geek
homelab

replacing every disk in a pool, one at a time

How I grew a TrueNAS mirror from 4TB to 8TB disks without downtime by swapping and resilvering one drive at a time, and why patience matters more than cleverness.

A server rack with a row of hard drives

The NAS was full, or full enough that every Sunday I was deleting something to make room for something else, which is no way to run a homelab. I had a mirror of two 4TB disks under TrueNAS, and a pair of new 8TB disks sat on the desk looking smug.

The neat trick with a ZFS mirror is that you don't have to copy anything anywhere. You replace one disk, let the pool resilver onto it, replace the other, let it resilver again, and then the pool quietly notices it has more room. No new dataset, no rsync, no overnight transfer that fails at 94%.

So I pulled the first 4TB, dropped in an 8TB, and ran zpool replace tank <old> <new>. Then I waited. Resilvering a half-full mirror takes hours, and the only correct thing to do during a resilver is nothing. I have learned, painfully, that the urge to "just also do this other maintenance while I'm in here" is how single-disk redundancy becomes zero-disk redundancy at exactly the wrong moment.

Second disk the same way the next morning. Once both were done I set autoexpand=on, the pool grew to its new size, and I had my space back with the data never once offline. The whole thing was boring, which on a storage box is the highest compliment I can pay it.