Gpart Resize Partition ((better)) May 2026
Second, the administrator must inspect the current partition layout. The command gpart show ada0 (assuming ada0 is the target disk) displays partitions, their indices, start sectors, sizes, and, crucially, any free space. For a successful grow operation, there must be unallocated sectors immediately after the target partition. For a shrink operation, the partition must have enough internal free space within its file system to allow the truncation without data loss.
Another pitfall is sector alignment. Modern disks use 4K sectors, and gpart aligns partitions to 1 MB boundaries by default. When resizing manually with -s , specifying a size that does not respect alignment can degrade performance. Always use gpart show to view the current alignment and ensure new sizes are multiples of the alignment value. gpart resize partition
Finally, administrators sometimes forget to update bootcode after moving or resizing a boot partition. While resizing does not typically affect bootcode location, moving a partition’s start sector (which gpart resize never does—it only changes the end sector) would require re-installing the bootloader. The gpart resize command is an indispensable tool in the FreeBSD administrator’s arsenal, offering precise, low-level control over disk partitions. While it does not possess the abstraction and flexibility of a logical volume manager, its directness and reliability make it the standard for managing GPT and MBR layouts. Successful resizing demands a clear understanding of the distinction between partition table manipulation and file system resizing, rigorous preparation including backup and unmounting, and careful execution of a sequence tailored to either growth or shrinkage. By respecting these principles and using gpart in conjunction with growfs or ZFS equivalents, administrators can safely and effectively reallocate disk space, extending the life of legacy systems and optimizing storage utilization without costly downtime or data loss. The power of gpart lies not in flashy features, but in its disciplined, deterministic approach to one of system administration’s most critical tasks. Second, the administrator must inspect the current partition