1thin_check(8) System Manager's Manual thin_check(8)
2
3
4
6 thin_check - validates thin provisioning metadata on a device or file
7
9 thin_check [options] {device|file}
10
11
13 thin_check checks thin provisioning metadata created by the device-map‐
14 per thin provisioning target on a device or file.
15
16 The tool cannot be run on live metadata unless the --metadata-snapshot
17 option is used.
18
20 -q, --quiet
21 Suppress output messages, return only exit code.
22
23 -h, --help
24 Print help and exit.
25
26 -V, --version
27 Output version information and exit.
28
29 --super-block-only
30 Only check the superblock.
31
32 --skip-mappings
33 Skip checking of the block mappings which make up the bulk of
34 the metadata.
35
36 --ignore-non-fatal-errors
37 Will only return a non-zero exit code if it finds a fatal error.
38
39 An example of a nonfatal error is an incorrect data block reference count
40 causing a block to be considered allocated when it in fact isn't. Ignoring
41 errors for a long time is not advised, you really should be using
42 thin_repair to fix them.
43
44
45 --clear-needs-check-flag
46 Clears the 'needs_check' flag in the superblock.
47
48 The kernel may set a flag to force the pool to be checked before it's next
49 activated. Set this switch to clear the flag if the check is successful.
50 If the metadata check failed, the flag is not cleared and a thin_repair run
51 is needed to fix any issues. After thin_repair succeeded, you may run
52 thin_check again.
53
54
55 --metadata-snapshot, -m
56 Check the metadata snapshot.
57
58 This will check the devices tree and mappings in a metadata snapshot.
59 The snap does not contain space maps, so these will not be checked. This
60 may be used on live metadata.
61
62
63 --auto-repair
64 Automatically repair any trivial issues found with the metadata.
65
66 Currently only fixes metadata leaks.
67
68
69 --override-mapping-root <block>
70 Specify a mapping root to use.
71
72 Don't use this. This overrides what's specified in the superblock. Only
73 use this if you really understand the metadata format and are trying to
74 recover damaged metadata.
75
76
78 Analyses thin provisioning metadata on logical volume /dev/vg/metadata:
79
80 $ thin_check /dev/vg/metadata
81
82 The device must not be actively used by the target when running.
83
85 thin_check returns an exit code of 0 for success or 1 for error.
86
88 thin_dump(8), thin_repair(8), thin_restore(8), thin_rmap(8), thin_meta‐
89 data_size(8)
90
92 Joe Thornber <ejt@redhat.com>, Heinz Mauelshagen <heinzm@redhat.com>
93
94
95
96System Manager's Manual Device Mapper Tools thin_check(8)