Keep working even if pvmove doesn't support -f
authorJamie Cameron <jcameron@webmin.com>
Tue, 27 Nov 2007 17:50:21 +0000 (17:50 +0000)
committerJamie Cameron <jcameron@webmin.com>
Tue, 27 Nov 2007 17:50:21 +0000 (17:50 +0000)
lvm/lvm-lib.pl

index bc05039..819b560 100644 (file)
@@ -125,7 +125,7 @@ sub delete_physical_volume
 if ($_[0]->{'pe_alloc'}) {
        local $cmd = "pvmove -f '$_[0]->{'device'}'";
        local $out = &backquote_logged("$cmd 2>&1");
-       return $out if ($?);
+       return $out if ($? && $out !~ /\-\-\s+f/);
        }
 local $cmd = "vgreduce '$_[0]->{'vg'}' '$_[0]->{'device'}'";
 local $out = &backquote_logged("$cmd 2>&1 </dev/null");