thin_dump8
Dump thin provisioning metadata from device or file to standard output.
Usage
thin_dump [options]
{device | file}
Overview
thin_dump dumps binary thin provisioning metadata (optionally from alternate block; see option --metadata-snap) created by the device-mapper thin provisioning target on a device or file to standard output for analysis or postprocessing in either XML or human readable format. XML formatted metadata can be fed into thin_restore (see thin_restore(8)) in order to put it back onto a metadata device (to process by the device-mapper target) or file.
This tool cannot be run on live metadata unless the --metadata-snap option is used.
Options
-
-h, --help -
Print help and exit.
-
-V, --version -
Print version information and exit.
-
-f, --format {xml|human_readable} -
Choose output format.
-
-r, --repair -
Repair the metadata whilst dumping it.
- -m, --metadata-snap[=<block nr>]
-
Dump metadata snapshot.
If block is not provided, access the default metadata snapshot created by
the thin provisioning device-mapper target, else try the one at block nr.
See the thin provisioning target documentation on how to create or release
a metadata snapshot and retrieve the block number from the kernel.
-
--dev-id {natural} -
Dump the specified device.
This option may be specified multiple times to select more than one thin
device.
-
--transaction-id {natural} -
Override the transaction id given in the input xml.
-
--data-block-size {sectors} -
Override the data block size given in the input xml.
-
--nr-data-blocks {natural} -
Override the nr data blocks given in the input xml.
-
--skip-mappings -
Do not dump the mappings.
- -o {xml file}
-
Specify a file for the output rather than writing to stdout.
Examples
Dumps the thin provisioning metadata on logical volume /dev/vg/metadata to standard output in human readable format:
$ thin_dump -f human_readable /dev/vg/metadata
Dumps the thin provisioning metadata on logical volume /dev/vg/metadata to standard output in XML format:
$ thin_dump /dev/vg/metadata
Dumps the thin provisioning metadata snapshot on logical volume /dev/vg/metadata to standard output in human readable format (not processable by thin_restore(8)):
$ thin_dump --format human_readable --metadata-snap /dev/vg/metadata
Diagnostics
thin_dump returns an exit code of 0 for success or 1 for error.
Releases
7 releases since Debian 8 (Jessie); the text changed 4 times.
--data-block-size since Debian 11 (Bullseye);
--dev-id since Debian 10 (Buster);
--nr-data-blocks since Debian 11 (Bullseye);
--skip-mappings since Debian 10 (Buster);
--transaction-id since Debian 11 (Bullseye).
--metadata-snap until Debian 9 (Stretch);
--metadata_snap until Debian 8 (Jessie);
-m until Debian 9 (Stretch).