{
    "mode": "man",
    "parameter": "thin_repair",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/thin_repair/8/json",
    "generated": "2026-06-16T15:53:55Z",
    "synopsis": "thinrepair [options] -i {device|file} -o {device|file}",
    "sections": {
        "NAME": {
            "content": "thinrepair - repair thin provisioning binary metadata.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "thinrepair [options] -i {device|file} -o {device|file}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "thinrepair  reads  binary thin provisioning metadata created by the respective device-mapper\ntarget from one device or file, repairs it and writes it to  different  device  or  file.  If\nwritten to a metadata device, the metadata can be processed by the device-mapper target.\n\nThis tool cannot be run on live metadata.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-h, --help",
                    "content": "Print help and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-V, --version",
                    "content": "Print version information and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-i, --input {device|file}",
                    "content": "Input file or device with binary data.\n",
                    "flag": "-i",
                    "long": "--input"
                },
                {
                    "name": "-o, --output {device|file}",
                    "content": "Output file or device for binary data.\n\nIf a file is used for output, then it must be preallocated, and large\nenough to hold the metadata.\n\n",
                    "flag": "-o",
                    "long": "--output"
                },
                {
                    "name": "--transaction-id {natural}",
                    "content": "Override the transaction id given in the input xml.\n",
                    "long": "--transaction-id"
                },
                {
                    "name": "--data-block-size {natural}",
                    "content": "Override the data block size given in the input xml.\n",
                    "long": "--data-block-size"
                },
                {
                    "name": "--nr-data-blocks {natural}",
                    "content": "Override the nr data blocks given in the input xml.\n",
                    "long": "--nr-data-blocks"
                }
            ]
        },
        "EXAMPLE": {
            "content": "Reads  the  binary thin provisioning metadata from file metadata, repairs it and writes it to\nlogical volume /dev/vg/metadata for further processing by the respective  device-mapper  tar‐\nget:\n\n$ thinrepair -i metadata -o /dev/vg/metadata\n\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "thinrepair returns an exit code of 0 for success or 1 for error.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "thindump(8), thincheck(8), thinrestore(8), thinrmap(8), thinmetadatasize(8)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Joe Thornber <ejt@redhat.com>, Heinz Mauelshagen <HeinzM@RedHat.com>\n\n\n\nSystem Manager's Manual                  Device Mapper Tools                          thinrepair(8)",
            "subsections": []
        }
    },
    "summary": "thinrepair - repair thin provisioning binary metadata.",
    "flags": [
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print help and exit."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Print version information and exit."
        },
        {
            "flag": "-i",
            "long": "--input",
            "arg": null,
            "description": "Input file or device with binary data."
        },
        {
            "flag": "-o",
            "long": "--output",
            "arg": null,
            "description": "Output file or device for binary data. If a file is used for output, then it must be preallocated, and large enough to hold the metadata."
        },
        {
            "flag": "",
            "long": "--transaction-id",
            "arg": null,
            "description": "Override the transaction id given in the input xml."
        },
        {
            "flag": "",
            "long": "--data-block-size",
            "arg": null,
            "description": "Override the data block size given in the input xml."
        },
        {
            "flag": "",
            "long": "--nr-data-blocks",
            "arg": null,
            "description": "Override the nr data blocks given in the input xml."
        }
    ],
    "examples": [
        "Reads  the  binary thin provisioning metadata from file metadata, repairs it and writes it to",
        "logical volume /dev/vg/metadata for further processing by the respective  device-mapper  tar‐",
        "get:",
        "$ thinrepair -i metadata -o /dev/vg/metadata"
    ],
    "see_also": [
        {
            "name": "thindump",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thindump/8/json"
        },
        {
            "name": "thincheck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thincheck/8/json"
        },
        {
            "name": "thinrestore",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thinrestore/8/json"
        },
        {
            "name": "thinrmap",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thinrmap/8/json"
        },
        {
            "name": "thinmetadatasize",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/thinmetadatasize/8/json"
        }
    ]
}