Expand ZFS To Use Larger Disks / Free Space
One of the great features of ZFS is to be able to expand it using new, larger disks — even while it is online.
To do this you’ll replace each disk, one by one with a larger disk. After each replacement you’ll rebuild the zpool, and then move on to the next disk.
Once all the disks are replaced and have partitions (if you’re using partitions) expanded to the end of the larger disk you’ll run this command on each zdev member of the pool:
zpool online -e zroot /dev/da0p2
Where /dev/da0p2 is your zpool member device (we use partitions, so this example is partition #2).
Once you perform this on the last disk of the zpool ZFS will almost-instantly show the newly available size!
Need help with Linux or FreeBSD infrastructure?
A-Team Systems provides engineer-led support for production Linux and FreeBSD environments, including troubleshooting, operational oversight, and ongoing infrastructure management.
Contact A-Team Systems