With VMware, it's possible to increase the disk size, but unfortunately the VMware increase utility does not know about how to increase the actual BSD partition. This tutorial explains how to expand the file system to take care of the increased space. The screenshots in the tutorial are from VMware Fusion so it may look different if you're running a different version, but the functionality is there in all versions of VMware.
Back up your data before you begin
First, remove any snapshots as VMware won't allow us to expand a disk with snapshots. The select the disk and increase to the new size you want.
VMware will then take it's time to increase the size
Next step is to select the Virtual Appliance ISO as a cd, we will need to boot off this ISO as we can't expand the filesystem from within itself.
When the Appliance boots and displays the following screen, hit ESC to interrupt the boot.
Choose to boot from the cdrom drive
When the system has finished booting off the ISO, select s to get to the shell.
Your system disk is either wd0 or sd0 depending if you've chosen to emulate IDE or SCSI drives. For the downloadable VMware Appliances, your system disk is going to be sd0 but the screenshots is from a system that uses IDE and the system disk is therefore wd0, select the one that is applicable to you.
We need to use the growfs utility, but that's not available on the ISO so we need to copy that off the file system
mount /dev/sd0a /mnt cp /mnt/sbin/growfs /tmp umount /mnt
The next step is to increase the partition size. bignum and biggernum is going to vary depending on the size of the disk when you begin, and what you increased it to. Please see the screenshot below.
disklabel -E sd0
> b
Starting sector: [63]
Size ('*' for entire disk): [bignum] *
> c a
Partition a is currently bignum sectors in size, and can have a maximum
size of biggernum sectors.
size [bignum] biggernum
> w
> q
No label changes.
#
The final step is to format the unformatted sectors in the increased partition with the growfs utility.
/tmp/growfs /dev/sd0a
When this as completed, please reboot the system and enjoy your increased disk space
reboot
The example above assumes that you only have a root partition. If you have partitioned the system in another way, like in the following example:
root@fileserver # disklabel wd0
# Inside MBR partition 3: type A6 start 63 size 312576642
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: ST3160815AS
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 19457
total sectors: 312581808
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 20980890 4209030 4.2BSD 2048 16384 1
b: 4208967 63 swap
c: 312581808 0 unused
e: 104872320 25189920 4.2BSD 2048 16384 16
f: 20980890 130062240 4.2BSD 2048 16384 16
running the 'disklabel' command on the disk will show the disk layout. Typically your disk is going to be wd0 or sd0, but could be wd1, wd2, … if you have more disks.
In this example, there's 5 partitions on the first disk. The 'b' partition is reserved for swap and the 'c' partition is reserved for mapping the entire disk. This leaves three partitions, wd0a, wd0e and wd0f, that are actually used on the system, mounted as / (root), /var, and /home.
You can only grow the last partition. If you look at the offset in the example above, the 'f' partition is the last partition. That means that if you intend to grow the filesystem using this guide, you would have to replace every instance referring to the 'a' partition (sd0a for instance) with 'f' (like sd0f).
If you don't want to grow the 'f' partition in this example, the only other way would be to create a new system and copy everything across using the Move Server guide.
An example based on increasing the 'f' partition would run the following commands:
mount /dev/sd0a /mnt cp /mnt/sbin/growfs /tmp umount /mnt
disklabel -E wd0
> b
Starting sector: [63]
Size ('*' for entire disk): [bignum] *
> c f
Partition a is currently bignum sectors in size, and can have a maximum
size of biggernum sectors.
size [bignum] biggernum
> w
> q
No label changes.
#
/tmp/growfs /dev/wd0f