mirror of https://github.com/schoebel/mars
marsadm: fix warning in check_sizes
This commit is contained in:
parent
3c4c1c3c91
commit
299ec5c6bf
|
@ -3251,6 +3251,8 @@ sub check_sizes {
|
|||
my ($res, $peer) = @_;
|
||||
my $physical_size = get_link("$mars/resource-$res/actsize-$peer", 2) || return;
|
||||
my $logical_size = get_link("$mars/resource-$res/size", 1);
|
||||
$physical_size = 0 if $physical_size eq "";
|
||||
$logical_size = 0 if $logical_size eq "";
|
||||
if (defined($physical_size) && $physical_size < $logical_size) {
|
||||
lwarn "Physical device on host '$peer' has size $physical_size, which is smaller than the logical resource size $logical_size\n";
|
||||
ldie "This is too dangerous. It cannot work. Fix it!\n" unless $force;
|
||||
|
|
Loading…
Reference in New Issue