Call sync before taking an LVM snapshot
This commit is contained in:
parent
ef0c33ae97
commit
c7273ea5c3
|
@ -341,6 +341,7 @@ sub prepare_backup{
|
||||||
}
|
}
|
||||||
close MOUNT;
|
close MOUNT;
|
||||||
}
|
}
|
||||||
|
die "Couldn't call sync before taking the snapshot: $!\n" unless (system ("/bin/sync") == 0);
|
||||||
if (!$is_mounted && create_snapshot($lvm,$time)){
|
if (!$is_mounted && create_snapshot($lvm,$time)){
|
||||||
print "$lvm seems to be a valid logical volume (LVM), a snapshot has been taken as " .
|
print "$lvm seems to be a valid logical volume (LVM), a snapshot has been taken as " .
|
||||||
$lvm . $time ."\n" if ($opts{debug});
|
$lvm . $time ."\n" if ($opts{debug});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user