LinuxCommandLibrary

pvck

TLDR

Print LVM on-disk headers and structures

$ sudo pvck /dev/sdX1 --dump headers
copy
Print the current VG metadata text
$ sudo pvck /dev/sdX1 --dump metadata
copy
List all metadata versions found in the metadata area
$ sudo pvck /dev/sdX1 --dump metadata_all
copy
Search for metadata when headers may be damaged
$ sudo pvck /dev/sdX1 --dump metadata_search -f path/to/metadata.txt
copy
Select the second metadata area when printing
$ sudo pvck /dev/sdX1 --dump metadata --settings "mda_num=2"
copy
Repair headers and metadata using a metadata file
$ sudo pvck /dev/sdX1 --repair -f path/to/metadata_file
copy
Repair only PV header and label
$ sudo pvck /dev/sdX1 --repairtype pv_header
copy

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

Copied to clipboard