lvm commands reporting error such as "Internal error: Volume Group swapvg was not unlocked".

Solution Verified - Updated -

Issue

  • lvm commands not listing any logical volume details and reporting following messages.
# lvs
  Parse error at byte 1741 (line 111): unexpected token
  Error parsing metadata for VG rhel.
  Cannot process volume group rhel
  Internal error: Volume Group rhel was not unlocked
  Device '/dev/sda2' has been left open (0 remaining references).
  Device '/dev/sdb' has been left open (0 remaining references).
  Internal error: 2 device(s) were left open and have been closed.

Environment

  • Red Hat Enterprise Linux 7
    • lvm2

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