Skip to contentSkip to conversation

dev-mornfall-activate - vgimportclone: override global_filter in lvm.conf

PATCH Petr Rockai 1 participant 1 message Jun 4, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=05bf4b8cc3e3d15e79c9964e496dbe396beacb3c
Commit:        05bf4b8cc3e3d15e79c9964e496dbe396beacb3c
Parent:        c5f7d401e5e558ea7dffaa326a27dd432241e639
Author:        Petr Rockai <[email protected]>
AuthorDate:    Sun Apr 28 22:38:22 2013 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sun Jun 2 00:47:17 2013 +0200

vgimportclone: override global_filter in lvm.conf

The global filter in system's lvm.conf may conflict with the custom filter we set up in vgimportclone (they can easily fail to intersect). Since we explicitly avoid talking to lvmetad in vgimportclone, it is safe and reasonable to do so.

---
 WHATS_NEW                |    1 +
 scripts/vgimportclone.sh |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
index 7589f12..56868b7 100644
@@ -1,5 +1,6 @@
 Version 2.02.99 - 
 ===================================
+  Override system's global_filter settings for vgimportclone.
   Detect maximum usable size for snapshot for lvresize.
   Creation of snapshot takes at most 100% origin coverage.
   Add cow_max_extents() to calc extents for 100% origin coverage.
scripts/vgimportclone.sh +1 -0
index 520ca02..d6ad75d 100755
@@ -250,6 +250,7 @@ LVMCONF=${TMP_LVM_SYSTEM_DIR}/lvm.conf
      /^[ \t]*scan[ \t]*=/{print "scan = [ \"" DEV "\" ]";next} \
      /^[ \t]*cache[ \t]*=/{print "cache = \"" CACHE "\"";next} \
      /^[ \t]*use_lvmetad[ \t]*=/{print "use_lvmetad = 0";next} \
+     /^[ \t]*global_filter[ \t]*=/{print "global_filter = [ \"a|.*|\" ]";next} \
      /^[ \t]*cache_dir[ \t]*=/{print "cache_dir = \"" CACHE_DIR "\"";next} \
      {print $0}' > ${LVMCONF}