Call sync before taking an LVM snapshot

This commit is contained in:
Daniel Berteaud 2013-07-28 18:33:01 +02:00
parent ef0c33ae97
commit c7273ea5c3

View File

@ -341,6 +341,7 @@ sub prepare_backup{
}
close MOUNT;
}
die "Couldn't call sync before taking the snapshot: $!\n" unless (system ("/bin/sync") == 0);
if (!$is_mounted && create_snapshot($lvm,$time)){
print "$lvm seems to be a valid logical volume (LVM), a snapshot has been taken as " .
$lvm . $time ."\n" if ($opts{debug});