Can swap be on a different disk?

Yes.

You can choose to do this at the time of installation, or you can make a swap partition with a tool such as gparted and then activate the swap with swapon. Add it to your fstab to make it available on boot.

For help with making the swap partition: How do I restore a swap partition I accidentally deleted?

For help with turning swap on: You literally just type sudo swapon into a terminal

For help with adding to your fstab: How do I add a swap partition after system installation?


Since you have 16GB of RAM, there is no need for a 'swap' partition. Also, the 'swap should be 1-2 times the RAM' rule is only valid for systems having less RAM, ie < 2GB.

You can create a swap partition on a separate drive by using mkswap and swapon.

Eg - To to migrate swap from /dev/sdc3 to /dev/sdb1 -

swapoff /dev/sdc3

mkswap /dev/sdb1

swapon /dev/sdb1

and edit swap entry in /etc/fstab.

Tags:

Swap