• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

LVM error “WARNING: Inconsistent metadata found” – How to resolve in CentOS / RHEL

by admin

What is inconsistent metadata error

When LVM performs pretty much any action, it first scans all available physical volumes and refreshes its view of the volume group layout. Because multiple physical volumes can exist in the same volume group, it is possible to end up in a situation where these PVs in the same VG reflect different information. In most cases, this results in the warning message “Inconsistent metadata found” error while executing any command like vgscan, pvscan. For example :

# vgscan
  Reading all physical volumes.  This may take a while...
  Volume group "vg_test" inconsistent
  WARNING: Inconsistent metadata found for VG vg_test - updating to use version 3
  Removing PV /dev/mapper/x (1nxHIW-2Thk-9mS4-2TzO-zHlB-Hsy2-CZsjE7) that no longer belongs to VG vg_test
  Found volume group "vg_test" using metadata type lvm2
Segmentation fault

There could be multiple causes for the inconsistent metadata error. And thus there is no exact resolution for this error. In most situations, restoring older versions of VG metadata with vgcfgrestore works.

Restoring VG metadata using vgcfgrestore

1. The volume group metadata may be restored with the following command:

# vgcfgrestore --file  /etc/lvm/backup/[volume group name] [volume group name]

2. Continuing the earlier error shown in ths post, the exact command would be:

# vgcfgrestore --file /etc/lvm/backup/vg_test vg_test
 Restored volume group vg_test

The name of the metadata backup file would be different that the one shown in above command. But it will include the name of the VG. You can check for the timestamp of the file and the content inside to be sure before executing the vgcfgrestore command.

3. To check that the new physical volume is intact and the volume group is functioning correctly execute vgdisplay -v.

# vgdisplay -v

Filed Under: Linux

Some more articles you might also be interested in …

  1. aplay Command Examples in Linux
  2. jupyter Command Examples
  3. treetime: command not found
  4. expose: An open source tunnel application for sharing websites
  5. Unmounting a Windows Share Fails in Linux
  6. cmake: Cross-platform build automation system, that generates recipes for native build systems
  7. atool: command not found
  8. How to uninstall python3-gi software package in Ubuntu
  9. helix Command Examples
  10. CMAKE_CXX_COMPILER could be found in Ubuntu

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright