Difference between revisions of "Add a swap disk"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
== Related == | == Related == | ||
* <code>[[swapoff -a]]</code> | * <code>[[swapoff -a]]</code> | ||
+ | * [[Add a new disk]] | ||
== See also == | == See also == |
Revision as of 14:11, 24 August 2023
- Verify if swap available:
swapon --show
- Add a disk to the server
- Check the new volume with
lsblk
- Create swap: sudo
mkswap -f /dev/nvme####n1
- Add swap in
/etc/fstab
sudo vi /etc/fstab UID none swap defaults 0 0
- Mount swap : sudo
mount -a
- Enable swap:
swapon /dev/nvme####n1
- Check swap
free -h
orswapon --show
UUID=4f724150-4b94-11e9-b2d3-5254001d0c45 none swap defaults 0 0
Related
See also
- Swap,
swapon
,swapoff
,mkswap
,swaplabel
,free
,sar -r
,sar -S
,sar -W
,vmstat
,vm.swappiness
,/proc/swaps
,/etc/fstab
, Add a swap disk,systemd.swap
- memory
Advertising: