On 9/15/21 10:30 AM, Theo de Raadt wrote:
The kernel will automatically add swap if it is partition b.
If it is not partition b, it will get added later by fstab
entries.  Almost noone does this.

If you put a filesystem on partition b, I would be surprised
if something causes you problems later, you are fighting against
decades of practice.

You can allocate the 'b' storage near the end of your partition,
rather than in-order with the other filesystems.  I suspect
a series of operations with with 'Resize', 'delete' and allocating new
space will get you storage near the end.  And then yes, you should
be able to re-allocate it in the future, upon a reboot.

But it is also possible that you'll hit bugs in the disklabel editor,
since I've never heard of anyone doing this.

Paul Pace <p...@mostlybsd.com> wrote:

Hello!

I am wondering if there is some requirement to have the swap disklabel
partition always as partition b? I have a VPS where I might prefer to
put swap at the end so when the VPS RAM and storage is increased, I
can increase swap size, as needed, but I can't figure out why this
might be a bad idea.

I have so far only found in the FAQ on Disk Setup:

b: The boot disk's b partition is usually a swap partition.

And this isn't clear to me that: when there is a swap partition it
must be on b, but if there is no swap partition then b is something
else, or if it means that usually the swap partition is put on the b
partition but can be on some other partition.

Thank you,

Paul


Thank you, that is very helpful.

I will choose an appropriate time in the future to experiment with this.

Reply via email to