Difference between revisions of "Add a swap disk"

From wikieduonline
Jump to navigation Jump to search
(Created page with " == See also == * {{swap}} * memory Category:Computing")
 
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
  
 +
* Verify if swap available and number of disks:
 +
** <code>[[swapon --show]]</code>
 +
** <code>[[lsblk]] | grep [[disk]]</code>
 +
** <code>[[ls -la]] [[/dev/nvme]]*</code>
 +
* [[Add a disk]] to the server
 +
* Check the new volume with <code>[[lsblk]]</code>
 +
* Create swap: sudo <code>[[mkswap]] [[/dev/nvme]]####n1</code>
 +
* Add swap in <code>[[/etc/fstab]]</code>
 +
sudo vi [[/etc/fstab]]
 +
UUID=XXXXXXX none swap [[defaults]] 0 0
 +
* Mount swap : sudo <code>[[mount -a]]</code>
 +
* Enable swap: <code>[[swapon]] /dev/nvme####n1</code>
 +
* Check swap <code>[[free -h]]</code> or <code>[[swapon --show]]</code>
  
 +
 +
[[UUID]]=4f724150-4b94-11e9-b2d3-5254001d0c45 none swap defaults 0 0
 +
 +
== Related ==
 +
* <code>[[swapoff -a]]</code>
 +
* [[Add a new disk]]
 +
* [[lsblk]] | grep disk
  
 
== See also ==
 
== See also ==
 
* {{swap}}
 
* {{swap}}
 
* [[memory]]
 
* [[memory]]
 +
* {{disk}}
  
 
[[Category:Computing]]
 
[[Category:Computing]]

Latest revision as of 16:30, 24 August 2023


sudo vi /etc/fstab
UUID=XXXXXXX none swap defaults 0 0


UUID=4f724150-4b94-11e9-b2d3-5254001d0c45 none swap defaults 0 0

Related[edit]

See also[edit]

Advertising: