Browse files

sync before calling external lock program to minimize the execution t…

…ime of sync(1) while holding the lock
  • Loading branch information...
1 parent 2ac9ab9 commit c20defdc514109dbe3bdc14c35c6fc66b4af8b5c @kazuho committed Jan 5, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 ssh_lvm_dump
View
1 ssh_lvm_dump
@@ -35,6 +35,7 @@ EXIT_CODE=0
# create snapshot
if [ "$EXIT_CODE" -eq 0 ] ; then
echo "creating snapshot..." >&2
+ ssh $SSH_ARGS "sync; sync"
$LVCREATE_PREFIX ssh $SSH_ARGS "sync && lvcreate --snapshot -L \"$SNAPSHOT_SIZE\" -n \"$SS_NAME\" \"$LV_PATH\"" >&2
EXIT_CODE=$?
fi

0 comments on commit c20defd

Please sign in to comment.