summaryrefslogtreecommitdiff
path: root/tools/command-lines.in
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-10-29 16:08:43 -0500
committerDavid Teigland <teigland@redhat.com>2019-11-27 11:13:47 -0600
commit3145a855836c4cf50d4b6064b3e6f1ce4a366aad (patch)
treea5409755ba31e9d334921874979effba42ec34b6 /tools/command-lines.in
parent2e0f2730081554460328b3ac7e28080bd902535c (diff)
downloadlvm2-3145a855836c4cf50d4b6064b3e6f1ce4a366aad.tar.gz
pvck: repair headers and metadata
To write a new/repaired pv_header and label_header: pvck --repairtype pv_header --file <file> <device> This uses the metadata input file to find the PV UUID, device size, and data offset. To write new/repaired metadata text and mda_header: pvck --repairtype metadata --file <file> <device> This requires a good pv_header which points to one or two metadata areas. Any metadata areas referenced by the pv_header are updated with the specified metadata and a new mda_header. "--settings mda_num=1|2" can be used to select one mda to repair. To combine all header and metadata repairs: pvck --repair --file <file> <device> It's best to use a raw metadata file as input, that was extracted from another PV in the same VG (or from another metadata area on the same PV.) pvck will also accept a metadata backup file, but that will produce metadata that is not identical to other metadata copies on other PVs and other areas. So, when using a backup file, consider using it to update metadata on all PVs/areas. To get a raw metadata file to use for the repair, see pvck --dump metadata|metadata_search. List all instances of metadata from the metadata area: pvck --dump metadata_search <device> Save one instance of metadata at the given offset to the specified file (this file can be used for repair): pvck --dump metadata_search --file <file> --settings "metadata_offset=<off>" <device>
Diffstat (limited to 'tools/command-lines.in')
-rw-r--r--tools/command-lines.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/command-lines.in b/tools/command-lines.in
index cbd64a862..10165ea8f 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -1437,9 +1437,20 @@ ID: pvck_general
DESC: Check for metadata on a device
pvck --dump String PV
-OO: --settings String, --file String, --pvmetadatacopies MetadataCopiesPV, --labelsector Number
+OO: --settings String, --file String,
+--pvmetadatacopies MetadataCopiesPV, --labelsector Number
ID: pvck_dump
-DESC: Print metadata from a device
+DESC: Check and print LVM headers and metadata on a device
+
+pvck --repairtype RepairType PV
+OO: --settings String, --file String, --labelsector Number
+ID: pvck_repair_type
+DESC: Repair LVM headers or metadata on a device
+
+pvck --repair --file String PV
+OO: --settings String, --labelsector Number
+ID: pvck_repair
+DESC: Repair LVM headers and metadata on a device
---