I currently have a pfSense 2.3.2-RELEASE which was installed with too little RAM and now I realized that the swap partition is too small (8GB) and I want to expand it. The problem is there's no free space to do that, so I need to shrink the UFS root partition so I can create a bigger swap.

Is there a safe way to do that, beside reinstalling the pfSense?

For FreeBSD servers, i usually use gpart + growfs, but obviously it's not entirely the case.


You can easily add the swap using plain file on the FS without resizing of existing FS. The whole procedure is explained in the chapter 11.12 of the FreeBSD handbook https://www.freebsd.org/doc/handbook/adding-swap-space.html

  • It's a good alternative, but i'm a bit concerned since my server is an appliance, and i'm afraid any "non default" fstab may break the system on an update or so, but thank your for that tip, very useful. I may use that. – Maurício Mota Aug 12 '16 at 17:12
  • 1
    FreeBSD updates are very cautious and you'll be asked for changes to the each config file involved. Additional items in the fstab can't crash your system until they are reasonable. – Kondybas Aug 12 '16 at 18:43

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.