Bug in setup-storage and pre-existing vg with no free space
ivan at trovit.com
ivan at trovit.com
Thu Jan 22 17:37:38 CET 2009
Hello,
I found a problem reinstalling a host using an existing volume group
name. The regexp used to find out the total space of the vg fails when
the vg exists and has no free space:
"system" 69280.00 MB [69280.00 MB used / 0 MB free]
This patch changes the regexp to permit a non-float free size (just like
it permits non-float used size):
--- setup-storage.orig/Volumes.pm 2009-01-12 13:13:18.000000000 +0100
+++ setup-storage/Volumes.pm 2009-01-22 17:05:59.517535959 +0100
@@ -310,7 +310,7 @@ sub get_current_lvm {
# example output with an empty vg:
# "my_pv" 267476.00 MB [0 MB used / 267476.00 MB free]
$line =~
-/^\s*"(\S+)"\s+\d+\.\d+ MB\s+\[\d+\.*\d* MB\s+used \/ \d+\.\d+
MB\s+free\]$/
+/^\s*"(\S+)"\s+\d+\.\d+ MB\s+\[\d+\.*\d* MB\s+used \/ \d+\.*\d*
MB\s+free\]$/
) or die "Unexpected vgdisplay output $line";
# the name of the volume group
Hope it helps, regards
ivan
More information about the linux-fai-devel
mailing list