Multiplay Labs

tech hits and tips from Multiplay

Archive for May, 2016

Resizing a FreeBSD ZFS pool

without comments

When swaping disk or expanding the backing volume of VM e.g. on GCE there are few easy steps to allow the OS to take advantage of the new space.

  1. Resize the disk in GCE
  2. gpart recover <device> – Ensures the partition information is at the end of the disk (it will be showing as CORRUPT)
  3. gpart resize -i <index> <device> – Expands the partition to take up the newly available space
  4. zpool online -e <pool> <device> – Expands the pool on the given device

For example:

gpart recover da0
gpart resize -i 3 da0p3
zpool online -e tank da0p3

Note: New capacity only shows after a reboot. Head includes a new reprobe command to camcontrol which allows this to be done live

Written by Dilbert

May 27th, 2016 at 9:49 am

Posted in FreeBSD,ZFS