Hi David,

[...]
> 
> We've run into a new issue with the latest version of 4.0 experimental that 
> did not exist in previous versions. After updating to 
> 4.0~beta2+experimental54 from build 48 we're seeing an error that our discs 
> are too small.  We did not edit or change the config file during the upgrade, 
> and the hardware is the same as before.
> 

[...]

Julien recently fixed some issues with respect to alignment, and maybe he missed
something along the way. The error seems pretty odd as your disk_config wouldn't
require more than 20G and should therefore nicely fit onto a 60G drive.

As I haven't yet had a chance to review any of those changes I'll just attach a
patch that reverts the changes to Sizes.pm; David, could you please just try to
apply that to usr/share/fai/setup-storage/Sizes.pm?

@Julien: Sorry for suggesting this way of operation, I'll try to get to work on
setup-storage as soon as possible.......

Best,
Michael

--- Sizes.pm    2011-03-08 09:39:37.000000000 +0000
+++ Sizes.pm.new        2011-03-08 09:39:02.000000000 +0000
@@ -546,15 +546,12 @@
 
   # partition starts at where we currently are + requested alignment, or 
remains
   # fixed in case of resized ntfs
-  # Also, don't apply alignment constraint to partition 1 and 5 in an msdos 
disklabel
   if ($FAI::configs{$config}{partitions}{$part_id}{size}{resize} &&
     ($current_disk->{partitions}->{$part_id}->{filesystem} eq "ntfs")) {
     ($next_start <= $current_disk->{partitions}->{$part_id}->{begin_byte}) 
       or die "Cannot preserve start byte of ntfs volume on partition $part_id, 
space before it is too small\n";
     $next_start = $current_disk->{partitions}->{$part_id}->{begin_byte};
-  } elsif ((0 != $next_start % $block_size)
-          && ((($part_id != 5) && ($part_id != 1))
-              || ($FAI::configs{$config}{disklabel} ne "msdos"))) {
+  } elsif (0 != $next_start % $block_size) {
     $next_start += $block_size - ($next_start % $block_size);
   }
   $FAI::configs{$config}{partitions}{$part_id}{start_byte} =
@@ -611,18 +608,10 @@
     # reference to the current disk config
     my $current_disk = $FAI::current_config{$disk};
 
-    # align to sector boundary by default
+    # user-defined alignment or alignment to sector boundaries
     my $block_size = $current_disk->{sector_size};
-    # align to cylinder boundary for msdos disklabels, for backward 
compatibility
-    if ($FAI::configs{$config}{disklabel} eq "msdos") {
-       $block_size = $current_disk->{sector_size} *
-           $current_disk->{bios_sectors_per_track} *
-           $current_disk->{bios_heads};
-    }
-    # but user-specified alignment wins no matter what
     defined ($FAI::configs{$config}{align_at}) and
       $block_size = $FAI::configs{$config}{align_at};
-
     (0 == $block_size % $current_disk->{sector_size}) or
       die "Alignment must be set to a multiple of the underlying disk sector 
size\n";
 
@@ -655,10 +644,6 @@
       $next_start = 63 * $current_disk->{sector_size};
       $min_req_total_space += $next_start;
 
-      # the MBR requires space, too
-      $min_req_total_space += $current_disk->{bios_sectors_per_track} *
-        $current_disk->{sector_size};
-
     } elsif ($FAI::configs{$config}{disklabel} eq "gpt") {
       # on GPT-EFI disk labels the first 34 and last 33 sectors must be left 
alone
       $next_start = 34 * $current_disk->{sector_size};

Attachment: pgpxBVsTkQpt9.pgp
Description: PGP signature

Antwort per Email an