From 55cfdb03bf812d1affb2ce81d0506907e16fdae4 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Thu, 9 May 2024 10:06:19 -0600 Subject: [PATCH] Added steps to resize the root disk on a FreeBSD system --- scripts/initial-setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/initial-setup.sh b/scripts/initial-setup.sh index eddb914..dc4ca9f 100644 --- a/scripts/initial-setup.sh +++ b/scripts/initial-setup.sh @@ -20,6 +20,12 @@ if [ "$OS" = 'freebsd' ]; then # Configure system hostname sysrc hostname="$HOSTNAME.$DOMAIN" + # Expand file system to match disk's bounds + gpart recover da0 # run this first in case the disk is corrupted + camcontrol reprobe da0 # force re-probing of the disk info + gpart resize -i 3 da0 # re-size the root partition automatically + zpool online -e zroot da0p3 # make ZFS resize the volume to match + # Install Puppet echo -e "[agent]\nserver = $PUPPET_MASTER" > /usr/local/etc/puppet/puppet.conf sysrc puppet_enable="YES"