Getting "read swap header failed: Invalid argument" error while enabling swap partition

Solution Verified - Updated -

Issue

  • Why am I getting the below error when I try to re-enable the swap on the server?
# swapon -a
swapon: /dev/mapper/system_vg-lv_swap: read swap header failed: Invalid argument

Environment

  • Red Hat Enterprise Linux(RHEL) 6 and above

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