Package: fai-client
Version: 3.2.18
Severity: minor
Tags: patch
When using setup-storage to create a raid1 on a single drive the
reported partition size after creating the raid1 is always 0.
Thus the installation aborts should anything be created inside
the raid1 like a vlm
While this is a special case, I believe the wrong calculation
happens in Sizes.pm
Since Raid1 is a mirrored raid, I believe it is enough to use
the size of the smallest partition to determine the actual size.
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-vserver-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages fai-client depends on:
ii file 4.26-1 Determines file type using "magic"
ii libapt-pkg-perl 0.1.22+b1 Perl interface to libapt-pkg
ii liblinux-lvm-perl 0.14-1 module to access LVM status
inform
ii libparse-recdescent-perl 1.95.1+dfsg-3 generates recursive-descent
parser
ii net-tools 1.60-22 The NET-3 networking toolkit
ii perl 5.10.0-19 Larry Wall's Practical Extraction
Versions of packages fai-client recommends:
ii cfengine2 2.2.8-1 Tool for configuring and maintaini
ii debconf-utils 1.5.24 debconf utilities
Versions of packages fai-client suggests:
pn cryptsetup <none> (no description available)
ii dmsetup 2:1.02.27-4 The Linux Kernel Device Mapper
use
pn ntfsprogs <none> (no description available)
-- no debconf information
--- /usr/share/fai/setup-storage/Sizes.pm 2009-04-22 14:59:20.000000000 +0200
+++ /usr/share/fai/setup-storage/Sizes.pm_new 2009-04-22 14:56:18.000000000 +0200
@@ -158,8 +158,13 @@ sub estimate_size {
$min_size = $s if ($s < $min_size);
}
- return $min_size * POSIX::floor($dev_count / 2)
- if ($level eq "raid1");
+ #return $min_size * POSIX::floor($dev_count / 2)
+ # if ($level eq "raid1");
+ # Since raid1 is a mirrored the maximum size
+ # is always the size of the smallest partition
+ # so just min_size should be correct.
+ # Not 100% sure
+ return $min_size if ($level eq "raid1");
return $min_size * $dev_count if ($level eq "raid0");
return $min_size * ($dev_count - 1) if ($level eq "raid5");
} else {