How to add a 12GiB swap volume on Ubuntu
sudo fallocate -l 12g /mnt/12GiB.swap sudo chmod 600 /mnt/12GiB.swap sudo mkswap /mnt/12GiB.swap sudo swapon /mnt/12GiB.swap echo '/mnt/12GiB.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
Source: https://help.ubuntu.com/community/SwapFaq#How_do_I_add_or_modify_a_swap_partition.3F