pvck
Check and repair LVM physical volume metadata
TLDR
SYNOPSIS
pvck [options] PhysicalVolume
DESCRIPTION
pvck checks and repairs LVM metadata on physical volumes. It can dump on-disk headers and structures (labelheader, pvheader, mda_header), examine metadata areas, search for metadata in damaged volumes, and perform repairs using backup metadata files.The --dump option reads and displays metadata without modifying anything. The --repair option writes corrected headers and metadata using a provided backup file. A PV may have up to two metadata areas (front and back), selectable with `--settings "mda_num=2"`.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: pvheader, metadata, labelheader.-f, --file file
Input/output file for metadata operations.--settings settings
Additional settings (e.g., mda_num=2).--labelsector sector
Sector number to read the PV label from (0-3, default: 1).-d, --debug
Enable debug output.-v, --verbose
Enable verbose output.-y, --yes
Answer yes to all prompts automatically.-t, --test
Run in test mode without making changes.
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)
