|
|
@ -781,7 +781,7 @@ sub create_snapshot{ |
|
|
|
$lock = $opts{backupdir} . '/' . $lock . '.lock'; |
|
|
|
$lock = $opts{backupdir} . '/' . $lock . '.lock'; |
|
|
|
my $cmd = "$opts{lvcreate} -s -n " . $blk . $suffix . |
|
|
|
my $cmd = "$opts{lvcreate} -s -n " . $blk . $suffix . |
|
|
|
" -L $opts{snapsize} $blk > /dev/null 2>&1 < /dev/null\n"; |
|
|
|
" -L $opts{snapsize} $blk > /dev/null 2>&1 < /dev/null\n"; |
|
|
|
for ($cnt = 0; $cnt < 10; $cnt++ ){ |
|
|
|
for ($cnt = 0; $cnt < 30; $cnt++ ){ |
|
|
|
print "Running: $cmd" if $opts{debug}; |
|
|
|
print "Running: $cmd" if $opts{debug}; |
|
|
|
if (-e "$lock" . '.lock'){ |
|
|
|
if (-e "$lock" . '.lock'){ |
|
|
|
print "Volume $blk is locked...\n" if $opts{debug}; |
|
|
|
print "Volume $blk is locked...\n" if $opts{debug}; |
|
|
@ -800,7 +800,7 @@ sub create_snapshot{ |
|
|
|
$cnt = 10; |
|
|
|
$cnt = 10; |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
print "An error occured, couldn't create the snapshot" if $opts{debug}; |
|
|
|
print "An error occured, couldn't create the snapshot\n" if $opts{debug}; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
sleep(1); |
|
|
|
sleep(1); |
|
|
|