thin_check(8)

πŸ“¦
version 1.3.4 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ thin_check(8) β€” System Manager's Manual ✨

πŸ’– NAME

thin_check β€” validates thin provisioning metadata on a device or file πŸŽ€

🌸 SYNOPSIS

thin_check [options] {device|file}

πŸ’… DESCRIPTION

okay so thin_check is the tool that goes through thin provisioning metadata created by the device-mapper thin provisioning target, on a device or a file. it's giving thorough checkup energy 🩺✨

bestie, you cannot run it on live metadata unless you use the --metadata-snapshot option. no cap, don't skip this part πŸ™ˆ

πŸ¦‹ OPTIONS

  • -q, --quiet β€” shh, suppresses the output messages so you only get the exit code 🀫
  • -h, --help β€” prints help and exits πŸ’β€β™€οΈ
  • -V, --version β€” outputs version information and exits 🧚
  • --super-block-only β€” only checks the superblock, lowkey the quick version πŸ“
  • --skip-mappings β€” skips checking the block mappings, which make up the bulk of the metadata 🌈
  • --ignore-non-fatal-errors β€” will only return a non-zero exit code if it finds a fatal error πŸ’œ
okay so a nonfatal error is something like an incorrect data block reference count that makes a block look allocated when it actually isn't. ignoring errors for a long time is NOT advised, bestie. you really should be using thin_repair to fix them πŸ’€
  • --clear-needs-check-flag β€” clears the needs_check flag in the superblock ✨

the kernel may set a flag that forces the pool to be checked before it's next activated. use this switch to clear the flag if the check succeeds. if the metadata check fails, the flag is NOT cleared and you need to run thin_repair to fix any issues. after thin_repair succeeds, you may run thin_check again 🫢

  • --metadata-snapshot, -m β€” checks the metadata snapshot πŸ“Έ

this checks the devices tree and mappings in a metadata snapshot. the snap doesn't contain space maps, so those won't be checked. this one can be used on live metadata, so it's the main character move πŸ‘‘

  • --auto-repair β€” automatically repairs any trivial issues found with the metadata πŸ”§

currently it only fixes metadata leaks 🫧

  • --override-mapping-root <block> β€” specifies a mapping root to use 🧩
bestie, don't use this. it overrides what's specified in the superblock. only use it if you REALLY understand the metadata format and you're trying to recover damaged metadata 😭

πŸŽ€ EXAMPLE

analyses thin provisioning metadata on logical volume /dev/vg/metadata:

$ thin_check /dev/vg/metadata

the device must not be actively used by the target when running πŸ™…β€β™€οΈ

🩺 DIAGNOSTICS

thin_check returns an exit code of 0 for success or 1 for error. that's the whole vibe βœ…

πŸ”— SEE ALSO

thin_dump(8), thin_repair(8), thin_restore(8), thin_rmap(8), thin_metadata_size(8) 🌟

🫢 AUTHOR

Joe Thornber <ejt@redhat.com>, Heinz Mauelshagen <heinzm@redhat.com> πŸ’œ


ttyl bestie, this was thin_check(8) from the Device Mapper Tools section of the System Manager's Manual πŸŒˆπŸ’–

πŸ“¦ where this page comes from