Why is total/used/free swap showing zero when "free" command is executed?

Solution Verified - Updated -

Issue

  • Swap space appears to be zero
[root@test1]# free -m
             total       used       free     shared    buffers     cached
Mem:          2010       1918         91          0        217       1180
-/+ buffers/cache:        520       1489
Swap:            0          0          0
  • Entry of swap in /etc/fstab
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
  • swapon -a throws the following error
[root@test1]# swapon -a
swapon: cannot find the device for LABEL=SWAP-sda2

Environment

  • Red Hat Enterprise Linux (ALL)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.