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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content