FreeBSD+ZFS Without Drives

This weekend I decided to set up a single-drive FreeBSD+ZFS system, and prove that you CAN remove (and replace) the only drive in a root ZFS pool without service interruption.

Recap of the video

  • Prequisite: A standard FreeBSD 12.0 install with root on ZFS, where the root pool is smaller than the amount of system memory. (in my case: 8GB system memory, 4GB root pool)
  • Replace existing drive with a memory-backed block device
  • Physically remove the existing drive
  • Verify the system still works
  • Physically attach new drive to system
  • Replace memory-backed block device with new drive
  • Bonus: Reboot system, verify it boots from new drive.

Scripts used in the demonstration are provided as a GitHub Gist.

3 thoughts on “FreeBSD+ZFS Without Drives

Leave a comment