Skip to contentSkip to conversation

master - thin: lvconvert supports swapping metadata device

PATCH Zdenek Kabelac 1 participant 1 message Dec 2, 2012

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=99018b37ee9e916662ebd482ac8fe0f36bbd7ac8
Commit:        99018b37ee9e916662ebd482ac8fe0f36bbd7ac8
Parent:        97f8454eccefe29464336ba1823448f4d1fa009b
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sun Dec 2 16:40:07 2012 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sun Dec 2 18:01:27 2012 +0100

thin: lvconvert supports swapping metadata device

Support swapping of metadata device if the thin pool already exists. This way it's easy to i.e. resize metadata or their repair operation.

User may create some empty LV, replace existing metadata or dump and restore them into bigger LV.

---
 WHATS_NEW          |    1 +
 man/lvconvert.8.in |   11 ++++++++++-
 tools/lvconvert.c  |   50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 60 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
index be2ebea..ceb2295 100644
@@ -1,5 +1,6 @@
 Version 2.02.99 - 
 ===================================
+  Add lvconvert support to swap thin pool metadata volume.
   Implement internal function detach_pool_metadata_lv().
   Fix lvm2app to return all property sizes in bytes.
   Recognize DM_DISABLE_UDEV environment variable for a complete fallback.
man/lvconvert.8.in +10 -1
index 48345a9..4fe9bdd 100644
@@ -231,6 +231,13 @@ Specifies thin pool metadata logical volume.
 The size should be in between 2MiB and 16GiB.
 Thin pool is specified with the option
 \fB\-\-thinpool\fP.
+When the specified thin pool already exists,
+the thin pool's metadata volume will be swapped with the given LV.
+Properties of the thin pool like chunk size, discards or zero
+are preserved by default in this case.
+It can be useful for thin pool metadata repair or its offline resize,
+since the content of metadata becomes accessible for
+thin provisioning tools \fBthin_dump\fP(8) and \fBthin_restore\fP(8).
 .TP
 .BR \-\-poolmetadatasize " " \fIThinPoolMetadataSize [ \fIbBsSkKmMgG ]
 Sets the size of thin pool's metadata logical volume,
@@ -375,4 +382,6 @@ available in the volume group.
 .BR lvextend (8),
 .BR lvreduce (8),
 .BR lvdisplay (8),
-.BR lvscan (8)
+.BR lvscan (8),
+.BR thin_dump(8),
+.BR thin_restore(8)
tools/lvconvert.c +49 -1

78 lines not on this page · raw message