pvck
TLDR
Print LVM on-disk headers and structures
$ sudo pvck /dev/sdX1 --dump headers
Print the current VG metadata text$ sudo pvck /dev/sdX1 --dump metadata
List all metadata versions found in the metadata area$ sudo pvck /dev/sdX1 --dump metadata_all
Search for metadata when headers may be damaged$ sudo pvck /dev/sdX1 --dump metadata_search -f path/to/metadata.txt
Select the second metadata area when printing$ sudo pvck /dev/sdX1 --dump metadata --settings "mda_num=2"
Repair headers and metadata using a metadata file$ sudo pvck /dev/sdX1 --repair -f path/to/metadata_file
Repair only PV header and label$ sudo pvck /dev/sdX1 --repairtype pv_header
SYNOPSIS
pvck [options] PhysicalVolume
DESCRIPTION
pvck checks and repairs LVM metadata on physical volumes. It can dump headers, examine metadata areas, search for metadata in damaged volumes, and perform repairs using backup metadata files.
This tool is essential for LVM disaster recovery when physical volume metadata becomes corrupted.
PARAMETERS
--dump type
Dump specified type (headers, metadata, metadataall, metadatasearch)--repair
Repair LVM metadata on the physical volume--repairtype type
Specify repair type (pv_header, etc.)-f, --file file
Input/output file for metadata operations--settings settings
Additional settings (e.g., mda_num=2)
CAVEATS
Repair operations can be destructive. Always backup metadata before attempting repairs. Use with extreme caution on production systems.
HISTORY
Part of LVM2 (Logical Volume Manager 2), the standard volume management system for Linux.
SEE ALSO
pvcreate(8), pvdisplay(8), vgcfgrestore(8), lvm(8)


