From eac05c1b5d8d698ef9945c018eb9cb89ee236c29 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Fri, 4 Mar 2016 18:18:29 +0300 Subject: [PATCH] document how to extract thin pool metadata --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index d23dae5..ce83bd7 100644 --- a/README.md +++ b/README.md @@ -130,3 +130,35 @@ Once you've done this you can run the tests with a simple: Or specific tests with: cucumber features/thin_restore -n 'print help' + + +Dump Metadata +============= + +To dump the metadata of a live thin pool, you must first create a snapshot of +the metadata: + + $ dmsetup message vg001-mythinpool-tpool 0 reserve_metadata_snap + +Then, extract the held root from the device mapper's status of the thin pool +(7th field). This value must be passed to ```thin_dump```. + + $ sudo dmsetup status vg001-mythinpool-tpool + 0 8192 thin-pool 2 11/1024 1/64 10 rw discard_passdown + ^ + +Extract the metadata: + + $ sudo bin/thin_dump -m10 /dev/mapper/vg001-mythinpool_tmeta + + + + + + + + + +Finally, release the root: + + $ dmsetup message vg001-mythinpool-tpool 0 release_metadata_snap