My Linode has no swap?

Linode Staff

I configured my server and set up 2048MB for swap space, but when I run free -mt it shows zero swap.

              total        used        free      shared  buff/cache   available
Mem:           1978         330        1308          42         340        1432
Swap:             0           0           0
Total:         1978         330        1308

Here is my Configuration Profile:

/dev/sda    Ubuntu 16.04 LTS Disk
/dev/sdb    Home
/dev/sdc    2048MB Swap Image

Is this normal? How do I configure my server to use swap?

2 Replies

By default, when you deploy a Linode, it is configured to use /dev/sdb as the swap disk. It does this by creating a line in /etc/fstab to mount the swap disk on boot:

 /dev/sdb         none            swap    sw 0    0

Your configuration profile shows that your swap is on /dev/sdc, but your fstab likely still trying to mount it via /dev/sdb

I'd suggest taking a look at your /etc/fstab and Configuration Profile at the same time and making them match: it doesn't matter where the swap volume ends up, but the configuration profile and fstab should agree.

Once its setup correctly, reboot, and run swapon --show to confirm that everything is working properly.

Yes that was right,
I had fstab point at the same partition as home /dev/sdb
$ free -mt

               total        used        free      shared  buff/cache   available
Mem:           1978         361        1271          39         345        1402
Swap:          2047           0        2047
Total:         4026         361        3319


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct