setup-storage and partitions greater than 2Tb
George Barnett
gbarnett at atlassian.com
Mon May 21 08:57:26 CEST 2012
Hi,
I have a machine with a 3Tb disk array. I have been building servers with fan 3.4.7 and the patch setup-storage_gpt-bios-fix (see below).
I have since upgraded to Fai 3.4.8, but I'm no longer able to create partitions bigger than 2Tb using a gps-bios disk label. Using a GPT label works fine, but this leave the machine in a state where it does not boot.
If I apply the Sizes.pm part of the patch, setup-storage creates partitions that are the correct size, but then there's no partition for parted to set grub_bios on.
I'm not very familiar with the setup-storage code and it's flow, so I'm having trouble debugging. If anybody could help me with a quicker answer, I would be greatly appreciative!
Thanks,
George
setup-storage_gpt-bios-fix:
--- branches/experimental/patches/setup-storage_gpt-bios-fix (rev 0)
+++ branches/experimental/patches/setup-storage_gpt-bios-fix 2010-09-17 17:04:13 UTC (rev 6057)
@@ -0,0 +1,53 @@
+2010-09-17 Michael Tautschnig <mt at debian.org>
+
+ * setup-storage/{Parser.pm,Sizes.pm}: Make extra partition for gpt-bios the
+ first one.
+Index: trunk/lib/setup-storage/Parser.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm
+@@ -605,6 +605,20 @@
+ # supported by parted could be allowed, but others are not implemented
+ # yet
+ $FAI::configs{$FAI::device}{disklabel} = $1;
++
++ # on gpt-bios we'll need an partition at the very beginning to store what
++ # doesn't fit in the MBR
++ if ($1 eq "gpt-bios") {
++ &FAI::init_part_config("primary");
++ $FAI::configs{$FAI::device}{gpt_bios_part} = $FAI::partition_pointer->{number};
++ my $s = &FAI::convert_unit("1MiB");
++ # enter the range into the hash
++ $FAI::partition_pointer->{size}->{range} = "$s-$s";
++ # set proper defaults
++ $FAI::partition_pointer->{encrypt} = 0;
++ $FAI::partition_pointer->{filesystem} = "-";
++ $FAI::partition_pointer->{mountpoint} = "-";
++ }
+ }
+ | /^bootable:(\d+)/
+ {
+Index: trunk/lib/setup-storage/Sizes.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Sizes.pm
++++ trunk/lib/setup-storage/Sizes.pm
+@@ -655,19 +655,6 @@
+
+ # the space required by the GPTs
+ $min_req_total_space += 33 * $current_disk->{sector_size};
+-
+- # on gpt-bios we'll need an additional partition to store what doesn't fit
+- # in the MBR
+- $FAI::device = $config;
+- &FAI::init_part_config("primary");
+- $FAI::configs{$config}{gpt_bios_part} = $FAI::partition_pointer->{number};
+- my $s = &FAI::convert_unit("120KiB");
+- # enter the range into the hash
+- $FAI::partition_pointer->{size}->{range} = "$s-$s";
+- # set proper defaults
+- $FAI::partition_pointer->{encrypt} = 0;
+- $FAI::partition_pointer->{filesystem} = "-";
+- $FAI::partition_pointer->{mountpoint} = "-";
+ }
+
+ # the list of partitions that we need to find start and end bytes for
--
George Barnett
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
More information about the linux-fai
mailing list