I tried to use this link to solve my problem but to no avail; Expanding the disk size on pfsense under VMWare ESXi.

I'm using pfSense and I wish to increase the disk drive from 11 GB to 200 GB.

Steps followed:

  1. View the initial partition sizes:

    # gpart show
    =>       63  419430337  da0  MBR  (200G)
             63          1       - free -  (512B)
             64  419430336    1  freebsd  [active]  (200G)
    =>        0  419430336  da0s1  BSD  (200G)
              0   23068672      1  freebsd-ufs  (11G)
       23068672    1257472      2  freebsd-ufs  (614M)
       24326144  395104192         - free -  (188G)
  2. Resize da0:

    # gpart resize -i 1 da0
    da0s1 resized
  3. View the new partition sizes:

    # gpart show da0
    =>       63  419430337  da0  MBR  (200G)
             63          1       - free -  (512B)
             64  419430336    1  freebsd  [active]  (200G)
  4. Tried to edit the value onto the size of c: line and got error message below:

    # bsdlabel -e /dev/da0s1
    bsdlabel: cannot open provider /dev/da0s1 for writing label: Operation not permitted
    bsdlabel: Try to use gpart(8).
    re-edit the label? [y]:

Please advise.

I also want to increase the swap to 20 GB.

  • Maybe you forget to do gpart commit? – arrowd Nov 30 '19 at 6:24

The easy way is to create a new VM with a bigger disk, install clean pfSense, backup the old, and restore the config to the new VM.

From your gpart show, the disk, the partition and the slice s1 have been resized.

As you have two partitions in your slice, you can only grow the the last partition.

Your last partition is labeled as "freebsd-ufs" not as "freebsd-swap". If this partition is really the swap, you can delete it with

swapoff -a
gpart delete -i 2 da0s1

Then you can resize the ufs partition.

Do the math: old + free - swap => 11 + 188 - 20 == 179

gpart resize -i 1 -s 179G da0s1

Create the swap partition and activate it.

gpart add -t freebsd-swap -l swap da0s1
swapon -a

Finally, extend the UFS space:

growfs /

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.