projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c17cc1
)
New pvmove syntax in LVM 2
author
Jamie Cameron
<jcameron@webmin.com>
Sun, 3 Feb 2008 01:58:24 +0000
(
01:58
+0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Sun, 3 Feb 2008 01:58:24 +0000
(
01:58
+0000)
lvm/lvm-lib.pl
patch
|
blob
|
history
diff --git
a/lvm/lvm-lib.pl
b/lvm/lvm-lib.pl
index
e51aa38
..
57b074a
100644
(file)
--- a/
lvm/lvm-lib.pl
+++ b/
lvm/lvm-lib.pl
@@
-124,7
+124,13
@@
return $? ? $out : undef;
sub delete_physical_volume
{
if ($_[0]->{'pe_alloc'}) {
- local $cmd = "pvmove -f '$_[0]->{'device'}'";
+ local $cmd;
+ if (&get_lvm_version() >= 2) {
+ $cmd = "yes | pvmove '$_[0]->{'device'}'";
+ }
+ else {
+ $cmd = "pvmove -f '$_[0]->{'device'}'";
+ }
local $out = &backquote_logged("$cmd 2>&1");
return $out if ($? && $out !~ /\-\-\s+f/);
}