Resizing a #FreeBSD filesystem is a bit tricky, especially if it's /usr or /var which you can't unmount cleanly during multiuser mode. First, resize your (virtual) harddisk and reboot as FreeBSD might not notice that the underlying block device has changed in size. During reboot, ignore the warning about gptboot: invalid backup GPT header. Boot into singleuser mode and start /bin/sh. Run gpart show. It will show you that da0 (or whatever your disk is) is corrupt (think of gptboot: invalid backup GPT header). To fix this, run gpart recover da0. If you launch gpart show again, that error will be gone. From the output, spot the partition you want to resize and remember its index (third column). To resize the third partition, run gpart resize -i 3 da0. Now resize the filesystem: growfs da0p3. growfs will ask if you've made a backup. You have to enter Yes (case-sensitive!). Maybe you should run fsck da0p3 to check the resized filesystem. Finally, enter exit to boot into multiuser mode.
no plus ones
Shared publicly•View activity