projects
/
invirt/scripts/pv-fixup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pv-fixup: tweaks
[invirt/scripts/pv-fixup.git]
/
pv-fixup
diff --git
a/pv-fixup
b/pv-fixup
index
0609971
..
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)")
# - 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
dmsetup create $TMPDM --table "0 $dmlen linear $DISK $dmstart"
#done
@@
-27,17
+27,12
@@
pvcreate $TMPDEV
vgextend $VG $TMPDEV
# - pvmove all the LVs to the temporary PV
vgextend $VG $TMPDEV
# - pvmove all the LVs to the temporary PV
-# (something like
-# for lv in $(LVs for running VMs on this host); do
-# #some lvchange -a commands
-# pvmove -n $lv <oldpv> <newpv>
-# #possibly more lvchange -a to restore old state
-# done)
movelv () {
echo pvmoving $1...
lvchange -an $1
pvmove -i 10 -n $1 $2
movelv () {
echo pvmoving $1...
lvchange -an $1
pvmove -i 10 -n $1 $2
+ lvchange -ay $1
}
#FOREACH host:
}
#FOREACH host: