{
    "content": [
        {
            "type": "text",
            "text": "# PVCK (man)\n\n## NAME\n\npvck - Check metadata on physical volumes\n\n## SYNOPSIS\n\npvck optionargs positionargs\n[ optionargs ]\n--commandprofile String\n--config String\n-d|--debug\n--driverloaded y|n\n--dump headers|metadata|metadataall|metadatasearch\n-f|--file String\n-h|--help\n--labelsector Number\n--lockopt String\n--longhelp\n--nolocking\n--profile String\n--[pv]metadatacopies 0|1|2\n-q|--quiet\n--repair\n--repairtype pvheader|metadata|labelheader\n--settings String\n-t|--test\n-v|--verbose\n--version\n-y|--yes\n\n## DESCRIPTION\n\npvck checks and repairs LVM metadata on PVs.\n\n## TLDR\n\n> Check and repair LVM metadata on physical volumes.\n\n- Print LVM on-disk headers and structures (label, PV header, MDA header, metadata area):\n  `sudo pvck {{/dev/sdXN}} --dump headers`\n- Print the current VG metadata text:\n  `sudo pvck {{/dev/sdXN}} --dump metadata`\n- List all metadata versions found in the metadata area:\n  `sudo pvck {{/dev/sdXN}} --dump metadata_all`\n- Search common locations for metadata when headers may be damaged, and save it to a file:\n  `sudo pvck {{/dev/sdXN}} --dump metadata_search {{-f|--file}} {{path/to/metadata.txt}}`\n- Select the second metadata area (mda2) when printing metadata:\n  `sudo pvck {{/dev/sdXN}} --dump metadata --settings \"mda_num=2\"`\n- Repair headers and metadata using a metadata input file (use with care):\n  `sudo pvck {{/dev/sdXN}} --repair {{-f|--file}} {{path/to/metadata_file}}`\n- Repair only the PV header and label header:\n  `sudo pvck {{/dev/sdXN}} --repairtype pv_header`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (7 subsections)\n- **USAGE**\n- **OPTIONS** (11 subsections)\n- **VARIABLES**\n- **ENVIRONMENT VARIABLES**\n- **EXAMPLES** (1 subsections)\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "PVCK",
        "section": "",
        "mode": "man",
        "summary": "pvck - Check metadata on physical volumes",
        "synopsis": "pvck optionargs positionargs\n[ optionargs ]\n--commandprofile String\n--config String\n-d|--debug\n--driverloaded y|n\n--dump headers|metadata|metadataall|metadatasearch\n-f|--file String\n-h|--help\n--labelsector Number\n--lockopt String\n--longhelp\n--nolocking\n--profile String\n--[pv]metadatacopies 0|1|2\n-q|--quiet\n--repair\n--repairtype pvheader|metadata|labelheader\n--settings String\n-t|--test\n-v|--verbose\n--version\n-y|--yes",
        "tldr_summary": "Check and repair LVM metadata on physical volumes.",
        "tldr_examples": [
            {
                "description": "Print LVM on-disk headers and structures (label, PV header, MDA header, metadata area)",
                "command": "sudo pvck {{/dev/sdXN}} --dump headers"
            },
            {
                "description": "Print the current VG metadata text",
                "command": "sudo pvck {{/dev/sdXN}} --dump metadata"
            },
            {
                "description": "List all metadata versions found in the metadata area",
                "command": "sudo pvck {{/dev/sdXN}} --dump metadata_all"
            },
            {
                "description": "Search common locations for metadata when headers may be damaged, and save it to a file",
                "command": "sudo pvck {{/dev/sdXN}} --dump metadata_search {{-f|--file}} {{path/to/metadata.txt}}"
            },
            {
                "description": "Select the second metadata area (mda2) when printing metadata",
                "command": "sudo pvck {{/dev/sdXN}} --dump metadata --settings \"mda_num=2\""
            },
            {
                "description": "Repair headers and metadata using a metadata input file (use with care)",
                "command": "sudo pvck {{/dev/sdXN}} --repair {{-f|--file}} {{path/to/metadata_file}}"
            },
            {
                "description": "Repair only the PV header and label header",
                "command": "sudo pvck {{/dev/sdXN}} --repairtype pv_header"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-d",
                "long": "--debug",
                "arg": null,
                "description": "Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured). --driverloaded y|n If set to no, the command will not attempt to use device-mapper. For testing and de‐ bugging. --dump headers|metadata|metadataall|metadatasearch Dump headers and metadata from a PV for debugging and repair. Option values include: headers to print and check LVM headers, metadata to print or save the current text metadata, metadataall to list or save all versions of metadata, metadatasearch to list or save all versions of metadata, searching standard locations in case of damaged headers, metadataarea to save an entire text metadata area to a file."
            },
            {
                "flag": "-f",
                "long": "--file",
                "arg": null,
                "description": "Metadata file to read or write."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text. --labelsector Number By default the PV is labelled with an LVM2 identifier in its second sector (sector 1). This lets you use a different sector near the start of the disk (between 0 and 3 in‐ clusive - see LABELSCANSECTORS in the source). Use with care. --lockopt String Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more informa‐ tion."
            },
            {
                "flag": "",
                "long": "--longhelp",
                "arg": null,
                "description": "Display long help text."
            },
            {
                "flag": "",
                "long": "--nolocking",
                "arg": null,
                "description": "Disable locking. --profile String An alias for --commandprofile or --metadataprofile, depending on the command. --[pv]metadatacopies 0|1|2 The number of metadata areas to set aside on a PV for storing VG metadata. When 2, one copy of the VG metadata is stored at the front of the PV and a second copy is stored at the end. When 1, one copy of the VG metadata is stored at the front of the PV. When 0, no copies of the VG metadata are stored on the given PV. This may be useful in VGs containing many PVs (this places limitations on the ability to use vgsplit later.)"
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'."
            },
            {
                "flag": "",
                "long": "--repair",
                "arg": null,
                "description": "Repair headers and metadata on a PV. --repairtype pvheader|metadata|labelheader Repair headers and metadata on a PV. See command description. --settings String Specifies command specific settings in \"Key = Value\" form. Combine multiple settings in quotes, or repeat the settings option for each."
            },
            {
                "flag": "-t",
                "long": "--test",
                "arg": null,
                "description": "Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on read‐ ing back metadata it believes has changed but hasn't."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Display version information."
            },
            {
                "flag": "-y",
                "long": "--yes",
                "arg": null,
                "description": "Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)"
            }
        ],
        "examples": [
            "If the partition table is corrupted or lost on /dev/sda, and you suspect  there  was  an  LVM",
            "partition at approximately 100 MiB, then this area of the disk can be scanned using the --la‐‐",
            "belsector parameter with a value of 204800 (100 * 1024 * 1024 / 512 = 204800)."
        ],
        "see_also": [
            {
                "name": "lvm",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvm/8/json"
            },
            {
                "name": "lvm.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/lvm.conf/5/json"
            },
            {
                "name": "lvmconfig",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmconfig/8/json"
            },
            {
                "name": "pvchange",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvchange/8/json"
            },
            {
                "name": "pvck",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvck/8/json"
            },
            {
                "name": "pvcreate",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvcreate/8/json"
            },
            {
                "name": "pvdisplay",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvdisplay/8/json"
            },
            {
                "name": "pvmove",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvmove/8/json"
            },
            {
                "name": "pvremove",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvremove/8/json"
            },
            {
                "name": "pvresize",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvresize/8/json"
            },
            {
                "name": "pvs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvs/8/json"
            },
            {
                "name": "can",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/can/8/json"
            },
            {
                "name": "vgcfgbackup",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgcfgbackup/8/json"
            },
            {
                "name": "vgcfgrestore",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgcfgrestore/8/json"
            },
            {
                "name": "vgchange",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgchange/8/json"
            },
            {
                "name": "vgck",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgck/8/json"
            },
            {
                "name": "vgcreate",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgcreate/8/json"
            },
            {
                "name": "vgconvert",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgconvert/8/json"
            },
            {
                "name": "vgdisplay",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgdisplay/8/json"
            },
            {
                "name": "export",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/export/8/json"
            },
            {
                "name": "vgextend",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgextend/8/json"
            },
            {
                "name": "vgimport",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgimport/8/json"
            },
            {
                "name": "vgimportclone",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgimportclone/8/json"
            },
            {
                "name": "vgmerge",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgmerge/8/json"
            },
            {
                "name": "vgmknodes",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgmknodes/8/json"
            },
            {
                "name": "vgreduce",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgreduce/8/json"
            },
            {
                "name": "move",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/move/8/json"
            },
            {
                "name": "vgrename",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgrename/8/json"
            },
            {
                "name": "vgs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgs/8/json"
            },
            {
                "name": "vgscan",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgscan/8/json"
            },
            {
                "name": "vgsplit",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgsplit/8/json"
            },
            {
                "name": "lvcreate",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvcreate/8/json"
            },
            {
                "name": "lvchange",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvchange/8/json"
            },
            {
                "name": "lvconvert",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvconvert/8/json"
            },
            {
                "name": "lvdisplay",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvdisplay/8/json"
            },
            {
                "name": "lvextend",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvextend/8/json"
            },
            {
                "name": "lvreduce",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvreduce/8/json"
            },
            {
                "name": "lvremove",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvremove/8/json"
            },
            {
                "name": "name",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/name/8/json"
            },
            {
                "name": "lvresize",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvresize/8/json"
            },
            {
                "name": "lvs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvs/8/json"
            },
            {
                "name": "lvscan",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvscan/8/json"
            },
            {
                "name": "lvm-fullreport",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvm-fullreport/8/json"
            },
            {
                "name": "lvm-lvpoll",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvm-lvpoll/8/json"
            },
            {
                "name": "lvm2-activation-generator",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvm2-activation-generator/8/json"
            },
            {
                "name": "blkdeactivate",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/blkdeactivate/8/json"
            },
            {
                "name": "lvmdump",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmdump/8/json"
            },
            {
                "name": "dmeventd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/dmeventd/8/json"
            },
            {
                "name": "lvmpolld",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmpolld/8/json"
            },
            {
                "name": "lvmlockd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmlockd/8/json"
            },
            {
                "name": "lvmlockctl",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmlockctl/8/json"
            },
            {
                "name": "cmirrord",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/cmirrord/8/json"
            },
            {
                "name": "lvmdbusd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmdbusd/8/json"
            },
            {
                "name": "lvmsystemid",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmsystemid/7/json"
            },
            {
                "name": "lvmreport",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmreport/7/json"
            },
            {
                "name": "lvmraid",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmraid/7/json"
            },
            {
                "name": "lvmthin",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmthin/7/json"
            },
            {
                "name": "lvmcache",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmcache/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Dump options",
                        "lines": 1
                    },
                    {
                        "name": "headers",
                        "lines": 8
                    },
                    {
                        "name": "metadata",
                        "lines": 22
                    },
                    {
                        "name": "Repair options",
                        "lines": 1
                    },
                    {
                        "name": "--repair",
                        "lines": 26,
                        "long": "--repair"
                    },
                    {
                        "name": "--repairtype metadata",
                        "lines": 8,
                        "long": "--repairtype"
                    },
                    {
                        "name": "Settings",
                        "lines": 36
                    }
                ]
            },
            {
                "name": "USAGE",
                "lines": 49,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 9,
                "subsections": [
                    {
                        "name": "-d --debug",
                        "lines": 14,
                        "flag": "-d",
                        "long": "--debug"
                    },
                    {
                        "name": "-f --file",
                        "lines": 2,
                        "flag": "-f",
                        "long": "--file"
                    },
                    {
                        "name": "-h --help",
                        "lines": 11,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--longhelp",
                        "lines": 2,
                        "long": "--longhelp"
                    },
                    {
                        "name": "--nolocking",
                        "lines": 13,
                        "long": "--nolocking"
                    },
                    {
                        "name": "-q --quiet",
                        "lines": 3,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "--repair",
                        "lines": 9,
                        "long": "--repair"
                    },
                    {
                        "name": "-t --test",
                        "lines": 5,
                        "flag": "-t",
                        "long": "--test"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 3,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "-y --yes",
                        "lines": 3,
                        "flag": "-y",
                        "long": "--yes"
                    }
                ]
            },
            {
                "name": "VARIABLES",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT VARIABLES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 3,
                "subsections": [
                    {
                        "name": "pvck --labelsector 204800 /dev/sda",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 21,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pvck - Check metadata on physical volumes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pvck optionargs positionargs\n[ optionargs ]\n\n--commandprofile String\n--config String\n-d|--debug\n--driverloaded y|n\n--dump headers|metadata|metadataall|metadatasearch\n-f|--file String\n-h|--help\n--labelsector Number\n--lockopt String\n--longhelp\n--nolocking\n--profile String\n--[pv]metadatacopies 0|1|2\n-q|--quiet\n--repair\n--repairtype pvheader|metadata|labelheader\n--settings String\n-t|--test\n-v|--verbose\n--version\n-y|--yes\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pvck checks and repairs LVM metadata on PVs.\n\n",
                "subsections": [
                    {
                        "name": "Dump options",
                        "content": ""
                    },
                    {
                        "name": "headers",
                        "content": "Print  LVM  on-disk headers and structures: labelheader, pvheader, mdaheader(s), and meta‐\ndata text.  Warnings are printed if any values are incorrect.  The labelheader and pvheader\nboth  exist in a 512 byte sector, usually the second sector of the device.  An mdaheader ex‐\nists in a 512 byte sector at offset 4096 bytes.  A second  mdaheader  can  optionally  exist\nnear  the end of the device.  The metadata text exists in an area (about 1MiB by default) im‐\nmediately following the mdaheader sector.  The metadata text is checked but not printed (see\nother options).\n"
                    },
                    {
                        "name": "metadata",
                        "content": "Print  the current LVM VG metadata text (or save to a file), using headers to locate the lat‐\nest copy of metadata.  If  headers  are  damaged,  metadata  may  not  be  found  (see  meta‐\ndatasearch).   Use  --settings \"mdanum=2\" to look in mda2 (the second mda at the end of the\ndevice, if used).  The metadata text is printed to stdout or saved to a file with --file.\n\nmetadataall\nList all versions of VG metadata found in the metadata area, using headers  to  locate  meta‐\ndata.   Full  copies  of all metadata are saved to a file with the --file option.  If headers\nare damaged, metadata may not be found (see metadatasearch).  Use --settings \"mdanum=2\"  as\nabove.  Use -v to include descriptions and dates when listing metadata versions.\n\nmetadatasearch\nList  all  versions  of VG metadata found in the metadata area, searching common locations so\nmetadata can be found if headers are damaged.  Full copies of all metadata  are  saved  to  a\nfile with the --file option.  To save one specific version of metadata, use --settings \"meta‐\ndataoffset=<offset>\", where the offset is taken from the list of versions found.  Use -v  to\ninclude descriptions and dates when listing metadata versions.\n\nmetadataarea\nSave the entire text metadata area to a file without processing.\n\n"
                    },
                    {
                        "name": "Repair options",
                        "content": ""
                    },
                    {
                        "name": "--repair",
                        "content": "Repair  headers  and metadata on a PV.  This uses a metadata input file that was extracted by\n--dump, or a backup file (from /etc/lvm/backup).  When possible, use metadata saved by --dump\nfrom another PV in the same VG (or from a second metadata area on the PV).\n\nThere  are  cases  where  the PV UUID needs to be specified for the PV being repaired.  It is\nspecified using --settings \"pvuuid=<UUID>\".  In particular, if the device name  for  the  PV\nbeing repaired does not match the previous device name of the PV, then LVM may not be able to\ndetermine the correct PV UUID.  When headers are damaged on more than one PV in a VG,  it  is\nimportant for the user to determine the correct PV UUID and specify it in --settings.  Other‐\nwise, the wrong PV UUID could be used if device names have been swapped  since  the  metadata\nwas last written.\n\nIf  a PV has no metadata areas and the pvheader is damaged, then the repair will not know to\ncreate no metadata areas during repair.  It will by default repair metadata in mda1.  To  re‐\npair with no metadata areas, use --settings \"mdaoffset=0 mdasize=0\".\n\nThere  are  cases  where  repair  should be run on all PVs in the VG (using the same metadata\nfile):  if all PVs in the VG are damaged, if using an old metadata version, or  if  a  backup\nfile is used instead of raw metadata (taken from pvck dump.)\n\nUsing --repair is equivalent to running --repairtype pvheader followed by --repairtype meta‐\ndata.\n\n--repairtype pvheader\nRepairs the header sector, containing the pvheader and labelheader.\n",
                        "long": "--repair"
                    },
                    {
                        "name": "--repairtype metadata",
                        "content": "Repairs the mdaheader and metadata text.  It requires the headers to be correct (having been\nundamaged or already repaired).\n\n--repairtype labelheader\nRepairs  labelheader fields, leaving the pvheader (in the same sector) unchanged.  (repair‐\ntype pvheader should usually be used instead.)\n\n",
                        "long": "--repairtype"
                    },
                    {
                        "name": "Settings",
                        "content": "The --settings option controls or overrides certain dump or repair behaviors.  All offset and\nsize  values in settings are in bytes (units are not recognized.)  These settings are subject\nto change.\n\nmdanum=1|2\nSelect which metadata area should be used.  By default the first metadata area (1)  is  used.\nmda1  is always located at offset 4096.  mda2, at the end of the device, often does not exist\n(it's not created by default.) If mda1 is erased, mda2, if it exists, will often  still  have\nmetadata.\n\nmetadataoffset=bytes\nSelect  metadata text at this offset.  Use with metadatasearch to print/save one instance of\nmetadata text.\n\nmdaoffset=bytes mdasize=bytes\nRefers to a metadata area (mda) location and size.  An mda includes an mdaheader and  circu‐\nlar metadata text buffer.  Setting this forces metadatasearch look for metadata in the given\narea instead of the standard locations.  When set to zero with repair, it indicates no  meta‐\ndata areas should exist.\n\nmda2offset=bytes mda2size=bytes\nWhen  repairing  a  pvheader, this forces a specific offset and size for mda2 that should be\nrecorded in the pvheader.\n\npvuuid=uuid\nSpecify the PV UUID of the device being repaired.  When not specified, repair will attempt to\ndetermine the correct PV UUID by matching a device name in the metadata.\n\ndevicesize=bytes\ndataoffset=bytes\nWhen  repairing  a pvheader, the devicesize, dataoffset, and pvid can all be specified di‐\nrectly, in which case these values are not taken from a metadata  file  (where  they  usually\ncome  from),  and  the metadata file can be omitted.  dataoffset is the starting location of\nthe first physical extent (data), which follows the first metadata area.\n\n"
                    }
                ]
            },
            "USAGE": {
                "content": "Check for metadata on a device\n\npvck PV ...\n[ COMMONOPTIONS ]\n-\n\nCheck and print LVM headers and metadata on a device\n\npvck --dump headers|metadata|metadataall|metadatasearch PV\n[ -f|--file String ]\n[    --settings String ]\n[    --[pv]metadatacopies 0|1|2 ]\n[ COMMONOPTIONS ]\n-\n\nRepair LVM headers or metadata on a device\n\npvck --repairtype pvheader|metadata|labelheader PV\n[ -f|--file String ]\n[    --settings String ]\n[ COMMONOPTIONS ]\n-\n\nRepair LVM headers and metadata on a device\n\npvck --repair -f|--file String PV\n[    --settings String ]\n[ COMMONOPTIONS ]\n-\n\nCommon options for command:\n[    --labelsector Number ]\n\nCommon options for lvm:\n[ -d|--debug ]\n[ -h|--help ]\n[ -q|--quiet ]\n[ -t|--test ]\n[ -v|--verbose ]\n[ -y|--yes ]\n[    --commandprofile String ]\n[    --config String ]\n[    --driverloaded y|n ]\n[    --lockopt String ]\n[    --longhelp ]\n[    --nolocking ]\n[    --profile String ]\n[    --version ]\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "--commandprofile String\nThe command profile to use for command configuration.  See lvm.conf(5) for more infor‐\nmation about profiles.\n\n--config String\nConfig settings for the command. These override lvm.conf settings.  The String arg\nuses the same format as lvm.conf, or may use section/field syntax.  See lvm.conf(5)\nfor more information about config.\n",
                "subsections": [
                    {
                        "name": "-d --debug",
                        "content": "Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to\nthe log file and/or syslog (if configured).\n\n--driverloaded y|n\nIf set to no, the command will not attempt to use device-mapper.  For testing and de‐\nbugging.\n\n--dump headers|metadata|metadataall|metadatasearch\nDump headers and metadata from a PV for debugging and repair.  Option values include:\nheaders to print and check LVM headers, metadata to print or save the current text\nmetadata, metadataall to list or save all versions of metadata, metadatasearch to\nlist or save all versions of metadata, searching standard locations in case of damaged\nheaders, metadataarea to save an entire text metadata area to a file.\n",
                        "flag": "-d",
                        "long": "--debug"
                    },
                    {
                        "name": "-f --file",
                        "content": "Metadata file to read or write.\n",
                        "flag": "-f",
                        "long": "--file"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display help text.\n\n--labelsector Number\nBy default the PV is labelled with an LVM2 identifier in its second sector (sector 1).\nThis lets you use a different sector near the start of the disk (between 0 and 3 in‐\nclusive - see LABELSCANSECTORS in the source). Use with care.\n\n--lockopt String\nUsed to pass options for special cases to lvmlockd.  See lvmlockd(8) for more informa‐\ntion.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--longhelp",
                        "content": "Display long help text.\n",
                        "long": "--longhelp"
                    },
                    {
                        "name": "--nolocking",
                        "content": "Disable locking.\n\n--profile String\nAn alias for --commandprofile or --metadataprofile, depending on the command.\n\n--[pv]metadatacopies 0|1|2\nThe number of metadata areas to set aside on a PV for storing VG metadata.  When 2,\none copy of the VG metadata is stored at the front of the PV and a second copy is\nstored at the end.  When 1, one copy of the VG metadata is stored at the front of the\nPV.  When 0, no copies of the VG metadata are stored on the given PV.  This may be\nuseful in VGs containing many PVs (this places limitations on the ability to use\nvgsplit later.)\n",
                        "long": "--nolocking"
                    },
                    {
                        "name": "-q --quiet",
                        "content": "Suppress output and log messages. Overrides --debug and --verbose.  Repeat once to\nalso suppress any prompts with answer 'no'.\n",
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "--repair",
                        "content": "Repair headers and metadata on a PV.\n\n--repairtype pvheader|metadata|labelheader\nRepair headers and metadata on a PV. See command description.\n\n--settings String\nSpecifies command specific settings in \"Key = Value\" form.  Combine multiple settings\nin quotes, or repeat the settings option for each.\n",
                        "long": "--repair"
                    },
                    {
                        "name": "-t --test",
                        "content": "Run in test mode. Commands will not update metadata.  This is implemented by disabling\nall metadata writing but nevertheless returning success to the calling function. This\nmay lead to unusual error messages in multi-stage operations if a tool relies on read‐\ning back metadata it believes has changed but hasn't.\n",
                        "flag": "-t",
                        "long": "--test"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to\nstdout and stderr.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--version",
                        "content": "Display version information.\n",
                        "long": "--version"
                    },
                    {
                        "name": "-y --yes",
                        "content": "Do not prompt for confirmation interactively but always assume the answer yes. Use\nwith extreme caution.  (For automatic no, see -qq.)\n",
                        "flag": "-y",
                        "long": "--yes"
                    }
                ]
            },
            "VARIABLES": {
                "content": "PV\nPhysical Volume name, a device path under /dev.  For commands  managing  physical  ex‐\ntents,  a PV positional arg generally accepts a suffix indicating a range (or multiple\nranges) of physical extents (PEs). When the first PE is omitted, it  defaults  to  the\nstart  of  the  device, and when the last PE is omitted it defaults to end.  Start and\nend range (inclusive): PV[:PE-PE]...   Start  and  length  range  (counting  from  0):\nPV[:PE+PE]...\n\nString\nSee the option description for information about the string content.\n\nSize[UNIT]\nSize is an input number that accepts an optional unit.  Input units are always treated\nas base two values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024.\nThe  default  input  unit  is specified by letter, followed by |UNIT.  UNIT represents\nother possible input units: bBsSkKmMgGtTpPeE.  b|B is bytes, s|S  is  sectors  of  512\nbytes,  k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This\nshould not be confused with the output control --units,  where  capital  letters  mean\nmultiple of 1000.)\n",
                "subsections": []
            },
            "ENVIRONMENT VARIABLES": {
                "content": "See lvm(8) for information about environment variables used by lvm.  For example, LVMVGNAME\ncan generally be substituted for a required VG parameter.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "If the partition table is corrupted or lost on /dev/sda, and you suspect  there  was  an  LVM\npartition at approximately 100 MiB, then this area of the disk can be scanned using the --la‐‐\nbelsector parameter with a value of 204800 (100 * 1024 * 1024 / 512 = 204800).",
                "subsections": [
                    {
                        "name": "pvck --labelsector 204800 /dev/sda",
                        "content": ""
                    }
                ]
            },
            "SEE ALSO": {
                "content": "lvm(8) lvm.conf(5) lvmconfig(8)\n\npvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)  pvresize(8)  pvs(8)  pvs‐‐\ncan(8)\n\nvgcfgbackup(8)  vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgconvert(8) vgdisplay(8) vg‐‐\nexport(8) vgextend(8) vgimport(8) vgimportclone(8) vgmerge(8) vgmknodes(8) vgreduce(8)  vgre‐‐\nmove(8) vgrename(8) vgs(8) vgscan(8) vgsplit(8)\n\nlvcreate(8)  lvchange(8)  lvconvert(8) lvdisplay(8) lvextend(8) lvreduce(8) lvremove(8) lvre‐‐\nname(8) lvresize(8) lvs(8) lvscan(8)\n\nlvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeactivate(8) lvmdump(8)\n\ndmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmdbusd(8)\n\nlvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)\n\n\n\nRed Hat, Inc.                     LVM TOOLS 2.03.11(2) (2021-01-08)                          PVCK(8)",
                "subsections": []
            }
        }
    }
}