The percentage of a snapshot's blocks used is now shown on the Edit Snapshot page.
---- Changes since 1.440 ----
Filesystem space used is show on the logical volume list, and the field for a new volume's size is more user-friendly.
+When using newer versions of the resize2fs command, EXT filesystems can be shrunk as well as enlarged.
}
elsif (&has_command("resize2fs")) {
# Only new versions can reduce a FS
- local $out = &backquote_command("resize2fs");
- return $out =~ /resize2fs\s+([0-9\.]+)/i && $1 > 1.4 ? 2 : 1;
+ local $out = &backquote_command("resize2fs 2>&1");
+ return $out =~ /resize2fs\s+([0-9\.]+)/i && $1 >= 1.4 ? 2 : 1;
}
else {
return 0;
# Need to shrink filesystem first, then LV
local $cmd = "resize2fs -f '$_[0]->{'device'}' $_[2]k";
local $out = &backquote_logged("$cmd 2>&1");
- return $? ? $out : undef;
+ return $out if ($?);
local $err = &resize_logical_volume($_[0], $_[2]);
- return $err if ($err);
+ return $err;
}
}
}