Creating a swap space on an LVM volume:
We start by creating our logical volume - Log-Vol-swap - inside our volume group - VolGroup-swap - ( Size : 1G ) :
We do a soft reload of our systemd daemon - systemctl daemon-reload -, so that the changes take effect.
Then, we turn on our swap space, using the below command:
If we decide that there is no use for our swap space anymore, we could delete it using the below steps:
Finally, we reload our services, so that the changes take effect: