Create a swap space, set the size is 600 MB, and make it be mounted automatically after rebooting the system (permanent mount).
A. See explanation below.
Create a swap space, set the size is 600 MB, and make it be mounted automatically after rebooting the system (permanent mount).
A. See explanation below.
#Assuming first part on /dev/vbd with gpt
parted /dev/vdb1 mkpart swap1 linux-swap 2048s 601MB
mkswap /dev/vdb1
swapon /dev/vdb1
#With lsblk -fs get uuid
#on /etc/fstap
UUID=”***” swap swap defaults 0 0
reboot
to create a swap as file
dd if=/dev/zero of=/swapfile bs=1024 count=600
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
and pasting the following line: in /etc/fstab
/swapfile swap swap defaults 0 0
# cat /proc/partitions –> to know which partition you will use the fdisk on
# fdisk /dev/???
p –> n –> p –> default –> default –> +600M –> t –> 82 –> p –> w
# partx /dev/????
# partprobe
# mkswap /dev/????
# swapon /dev/????
# swapon -a
# blkid –> to get the new swap partition ID
# vim /etc/fstab
UUID=xxxxxx swap swap defaults 0 0
# mount -a
#df -hT