{
    "mode": "man",
    "parameter": "cache_repair",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/cache_repair/8/json",
    "generated": "2026-06-15T18:51:57Z",
    "synopsis": "cacherepair [options] -i {device|file} -o {device|file}",
    "sections": {
        "NAME": {
            "content": "cacherepair - repair cache binary metadata from device/file to device/file.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "cacherepair [options] -i {device|file} -o {device|file}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "cacherepair  reads binary cache metadata created by the respective device-mapper target from\none device or file, repairs it and writes it to another device or file. If written to a meta‐\ndata 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 containing binary metadata.\n",
                    "flag": "-i",
                    "long": "--input"
                },
                {
                    "name": "-o, --output {device|file}",
                    "content": "Output file or device for repaired binary metadata.\n\nIf a file is then it must be preallocated, and large enough to hold the\nmetadata.\n\n",
                    "flag": "-o",
                    "long": "--output"
                }
            ]
        },
        "EXAMPLE": {
            "content": "Reads  the binary cache metadata from file metadata, repairs it and writes it to logical vol‐\nume /dev/vg/metadata for further processing by the respective device-mapper target:\n\n$ cacherepair -i metadata -o /dev/vg/metadata\n\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "cacherepair returns an exit code of 0 for success or 1 for error.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "cachedump(8), cachecheck(8), cacherestore(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                         cacherepair(8)",
            "subsections": []
        }
    },
    "summary": "cacherepair - repair cache binary metadata from device/file to device/file.",
    "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 containing binary metadata."
        },
        {
            "flag": "-o",
            "long": "--output",
            "arg": null,
            "description": "Output file or device for repaired binary metadata. If a file is then it must be preallocated, and large enough to hold the metadata."
        }
    ],
    "examples": [
        "Reads  the binary cache metadata from file metadata, repairs it and writes it to logical vol‐",
        "ume /dev/vg/metadata for further processing by the respective device-mapper target:",
        "$ cacherepair -i metadata -o /dev/vg/metadata"
    ],
    "see_also": [
        {
            "name": "cachedump",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cachedump/8/json"
        },
        {
            "name": "cachecheck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cachecheck/8/json"
        },
        {
            "name": "cacherestore",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cacherestore/8/json"
        }
    ]
}