cache_check(8) System Manager's Manual cache_check(8)
cache_check β validates cache metadata on a device or file.
| Use Case | Command | Description |
|---|---|---|
| Validate cache metadata on a device | cache_check /dev/vg/metadata | Checks cache metadata for errors |
| Check only the superblock | cache_check --super-block-only /dev/vg/metadata | Validates only the superblock, skipping other metadata |
| Skip hints check | cache_check --skip-hints /dev/vg/metadata | Bypass checking of policy hint values |
| Clear needs-check flag after successful check | cache_check --clear-needs-check-flag /dev/vg/metadata | Clears the kernelβs βneeds_checkβ flag if check passes |
cache_check [options] {device|file}
cache_check checks cache metadata created by the device-mapper cache target on a device or file.
β οΈ This tool cannot be run on live metadata.
-h, --help
π Print help and exit.
-V, --version
βΉοΈ Output version information and exit.
-q, --quiet
π Suppress output messages, return only exit code.
--super-block-only
π‘οΈ Only check the superblock.
--skip-hints
βοΈ Skip checking of the policy hint values metadata.
--skip-discards
βοΈ Skip checking of the discard bits in the metadata.
--clear-needs-check-flag
β
Clears the 'needs_check' flag in the superblock.
The kernel may set a flag to force the pool to be checked before it's next activated. Set this switch to clear the flag if the check is successful. If the metadata check failed, the flag is not cleared and a cache_repair run is needed to fix any issues. After cache_repair succeeded, you may run cache_check again.
Analyses and repairs cache metadata on logical volume /dev/vg/metadata:
$ cache_check /dev/vg/metadata
The device may not be actively used by the target when running.
cache_check returns an exit code of 0 for success or 1 for error.
| Code | Meaning |
|---|---|
| 0 | β Success β metadata is valid |
| 1 | β Error β metadata corruption or other failure |
cache_dump(8), cache_repair(8), cache_restore(8)
Joe Thornber <ejt AT redhat.com>, Heinz Mauelshagen <HeinzM AT RedHat.com>
Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-28 05:02 @216.73.216.67
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)