pv-fixup: tweaks
[invirt/scripts/pv-fixup.git] / pv-fixup
index a2180d0..f4d83a7 100644 (file)
--- a/pv-fixup
+++ b/pv-fixup
@@ -15,8 +15,8 @@ pvresize --setphysicalvolumesize=${HALFSIZETiB}t $DISK
 
 #  - dmsetup create a device in the latter half
 dmstart=$(python -c "print int(($HALFSIZETiB + 0.01) * 1024 * 1024 * 1024 * 2)")
-dmlen=$(python -c "print int(($HALFSIZETiB - 0.02) * 1024 * 1024 * 1024 * 2)")
-#FOREACH host:
+dmlen=$(python -c "print int(($HALFSIZETiB - 0.03) * 1024 * 1024 * 1024 * 2)")
+#Foreach host:
 dmsetup create $TMPDM --table "0 $dmlen linear $DISK $dmstart"
 #done
 
@@ -32,6 +32,7 @@ movelv () {
   echo pvmoving $1...
   lvchange -an $1
   pvmove -i 10 -n $1 $2
+  lvchange -ay $1
 }
 
 #FOREACH host: