From 139ae9d9935eeffd8289f7d51624a221113b3023 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 23 Jun 2014 11:24:50 +0200 Subject: [PATCH] Revert previous commit where we tried 30 times to take a snapshot If it fails 10 times, it won't work --- virt-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt-backup b/virt-backup index c123ab9..b0f02a9 100644 --- a/virt-backup +++ b/virt-backup @@ -789,7 +789,7 @@ sub create_snapshot{ $lock = $opts{backupdir} . '/' . $lock . '.lock'; my $cmd = "$opts{lvcreate} -s -n " . $blk . $suffix . " -L $opts{snapsize} $blk > /dev/null 2>&1 < /dev/null\n"; - for ($cnt = 0; $cnt < 30; $cnt++ ){ + for ($cnt = 0; $cnt < 10; $cnt++ ){ print "Running: $cmd" if $opts{debug}; if (-e "$lock" . '.lock'){ print "Volume $blk is locked...\n" if $opts{debug}; @@ -805,7 +805,7 @@ sub create_snapshot{ print SNAPLIST $blk.$suffix ."\n"; close SNAPLIST; # break the loop now - $cnt = 30; + $cnt = 10; } else{ print "An error occured, couldn't create the snapshot\n" if $opts{debug};