Skip to contentSkip to conversation

master - pvck: dump metadata search

PATCH David Teigland 1 participant 1 message Oct 18, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5714c8c9cc12d9442ad9ee85fb73a8ae49d6b548
Commit:        5714c8c9cc12d9442ad9ee85fb73a8ae49d6b548
Parent:        4f860f79ff7c5bb35520776f5906ae51442d5920
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Oct 17 17:24:22 2019 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Fri Oct 18 12:26:29 2019 -0500

pvck: dump metadata search

Improve the implementation of extracting all text metadata copies from the metadata area. Use this for the existing metadata_all dump option.

Add a new metadata_search dump option which does not use lvm headers to find metadata, but looks in standard locations. This is useful if headers are damaged and can't be used to locate metadata.

Adding '-v' to metadata_all or metadata_search will add the description and creation_time to the printed list of metadata instances that are found.

---
 test/shell/pvck-dump.sh |    8 +-
 tools/pvck.c            |  845 +++++++++++++++++++++++++++++------------------
 2 files changed, 534 insertions(+), 319 deletions(-)
test/shell/pvck-dump.sh +4 -4
index 542fb49..17faa17 100644
@@ -105,10 +105,10 @@ pvck --dump metadata_all --pvmetadatacopies 2 -f all3b "$dev3" > out3b
 diff out1 out2
 diff out1 out3
 
-grep "seqno 1 with" out1
-grep "seqno 1 with" out3b
-grep "seqno 2 with" out1
-grep "seqno 2 with" out3b
+grep "seqno 1" out1
+grep "seqno 1" out3b
+grep "seqno 2" out1
+grep "seqno 2" out3b
 
 diff all1 all2
 diff all1 all3
tools/pvck.c +530 -315

912 lines not on this page · raw message