2

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, besides reinstalling the pfSense?

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

Maurício Mota
  • 199
  • 2
  • 9

1 Answers1

2

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

Kondybas
  • 6,864
  • 2
  • 19
  • 24
  • 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