Skip to content

Instantly share code, notes, and snippets.

@amontalban
Created February 25, 2015 19:00
Show Gist options
  • Save amontalban/a3c50ec095fe875c0865 to your computer and use it in GitHub Desktop.
Save amontalban/a3c50ec095fe875c0865 to your computer and use it in GitHub Desktop.
Resize root partition FreeBSD under VirtualBox with ZFS as root
VBoxManage clonehd in.vmdk out.vdi (Convert current VMDK to VDI)
VBoxManage modifyhd box.vdi --resize 15360 (Resize disk to needed size in Kb)
--- Change VMDK disk to the VDI disk using VirtualBox interface ---
gpart recover ada0 (Where ada0 is the harddrive you want to expand)
gpart resize -i 2 ada0 (Where 2 is the partition number you want to expand, you can see this with "gpart show")
zpool set autoexpand=on zroot (Where zroot is the pool you want to expand)
zpool online -e zroot gpt/disk0 gpt/disk0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment