Score:0

disable swap partitions completely

cu flag

How to disable all swap partitions completely. I have applied the following tasks on the server.

  1. sudo swapoff -a
  2. deleted line (/swap.img none swap sw 0 0) from /etc/fstab.

I still can see.

Server2-2@server2-2:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                               13G  2.7M   13G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   15G   79G  16% /
tmpfs                               63G     0   63G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  254M  1.6G  14% /boot
/dev/sda1                          1.1G  6.1M  1.1G   1% /boot/efi
/dev/sdb1                           13T  227M   12T   1% /hdd/storage1
/dev/sde1                           13T   28K   12T   1% /hdd/storage4
/dev/sdd1                           13T   28K   12T   1% /hdd/storage3
/dev/sdc1                           13T   28K   12T   1% /hdd/storage2
tmpfs                               13G  4.0K   13G   1% /run/user/1000
Server2-2@server2-2:~$

can anyone help me.

terdon avatar
cn flag
You still can see what? I don't see any swap there, what is the problem?
uz flag
Jos
You turned off all swapping, then removed a swap file (not a partition). Then you show us a list of all partitions (swap or otherwise) mounted on your system. You can't draw any conclusions from that list. Do `cat /proc/swaps` to see all active swaps.
mchid avatar
bo flag
May I ask why you want to disable swap? Also, are you trying to disable swappiness or are you trying to simply only use a swapfile instead of a swap partition?
Nexgn Technologies avatar
cu flag
swap partiotion is turned off with the following command "sudo swapoff -a" and swap file also deleted. then verfied with "free -mtl | grep -i swap"
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.