Exported on 28-Sep-2021 12:44:29
Parameters
1 - Create A Swap File
Start by creating a file which will be used for swap, here we are creating a swapfile of 1GB.
Login as user {Linux User} on node {Linux Node}
sudo fallocate -l 1G /swapfile
2 - Set Swap File Permissions
Set the correct permissions so that only the root user should be able to write and read the swap file.
Login as user {Linux User} on node {Linux Node}
sudo chmod 600 /swapfile
3 - Setup Swap Area On The File
Use the mkswap utility to set up a Linux swap area on the file.
Login as user {Linux User} on node {Linux Node}
sudo mkswap /swapfile
4 - Mount The Swap File
Activate the swap file using the following command
Login as user {Linux User} on node {Linux Node}
sudo swapon /swapfile
5 - Configure The Swap File To Mount On Reboot
To make the change permanent add the swapfile entry the /etc/fstab file
Login as user {Linux User} on node {Linux Node}
sudo bash -c 'echo "/swapfile swap swap defaults 0 0" >> /etc/fstab'
6 - Verify Swap Memory
Verify that the swap is active by using the swapon command.
Login as user {Linux User} on node {Linux Node}
sudo swapon --show
Configure SWAP Memory on Ubuntu With AttuneOps
This Blueprint Configures SWAP Memory on Ubuntu With AttuneOps
Swap memory or swap space is the on-disk component of the virtual memory system. Memory swapping is a computer technology that enables an operating system to provide more memory to a running application or process that is available in physical random access memory (RAM). In short, swap memory is the dedicated amount of hard drive that is used whenever RAM runs out of memory.
Pre-Blueprint Attune setup
Steps Involved