]> sourceware.org Git - lvm2.git/commit
pvck: repair headers and metadata
authorDavid Teigland <teigland@redhat.com>
Tue, 29 Oct 2019 21:08:43 +0000 (16:08 -0500)
committerDavid Teigland <teigland@redhat.com>
Wed, 27 Nov 2019 17:13:47 +0000 (11:13 -0600)
commit3145a855836c4cf50d4b6064b3e6f1ce4a366aad
treea5409755ba31e9d334921874979effba42ec34b6
parent2e0f2730081554460328b3ac7e28080bd902535c
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>
man/pvck.8_des
test/shell/pvck-repair.sh [new file with mode: 0644]
tools/args.h
tools/command-lines.in
tools/command.c
tools/lvmcmdline.c
tools/pvck.c
tools/tools.h
tools/vals.h
This page took 0.041844 seconds and 5 git commands to generate.