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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. How to Disable the ‘lvm2-lvmetad.socket/service’ on CentOS/RHEL 7
  2. How to verify the integrity of a file with md5 checksum
  3. CentOS / RHEL 5 : How to Configure kdump
  4. How to Migrate CentOS/RHEL 6 iptables Rules to CentOS/RHEL 7 firewalld
  5. How to Remove/ Disable Bash shell Command History on Linux
  6. CentOS / RHEL 7 : Lock User Account After N Number of Incorrect Login Attempts
  7. CentOS / RHEL 5 : How to rebuild Initial Ramdisk Image
  8. How to make CentOS/RHEL 7 FIPS 140-2 compliant
  9. Unable to start Nagios Service (CentOS/RHEL)
  10. How to configure IPtables to open Ports in CentOS / RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • How Realms Work in Oracle Database Vault
  • How to use Privilege Analysis in Oracle Database
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary