setup-storage and partitions greater than 2Tb

George Barnett gbarnett at atlassian.com
Mon May 21 09:04:43 CEST 2012


I realise I left off some data:

Setup Storage config:

disk_config sda disklabel:gpt-bios align-at:1
primary / 10G ext3 rw createopts="-m 0" tuneopts="-c 0 -i 0"
primary swap 6G swap sw
primary /e 0- ext4 rw,errors=remount-ro,nosuid,noatime,nobarrier createopts="-m 0 -b 4096 -J size=1024 -E stride=16,stripe-width=176" tuneopts="-c 0 -i 0"



Parted:
Model: LSI MR9260CV-4i (scsi)
Disk /dev/sda: 3293837262848B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags



Broken setup-storage output:
Partitioning local harddisks using setup-storage
Starting setup-storage 1.3
Using config file: /mnt//disk_config/UNICORN-STORAGE
Executing: parted -s /dev/sda unit TiB print
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/sda mklabel gpt
Executing: parted -s /dev/sda unit TiB print
Executing: parted -s /dev/sda unit B print free
Executing: parted -s /dev/sda unit chs print free
Finding all volume groups
No volume groups found
Executing: mdadm --examine --scan --verbose -c partitions
Executing: parted -s /dev/sda mklabel gpt
Executing: parted -s /dev/sda mkpart primary "ext3" 2097152B 10739515391B
Executing: parted -s /dev/sda mkpart primary "linux-swap" 10739515392B 17181966335B
Executing: parted -s /dev/sda mkpart primary "ext3" 17181966336B 2194324586495B
Executing: parted -s /dev/sda mkpart primary "" 17408B 1065983B
Executing: parted -s /dev/sda set 4 bios_grub on
Executing: mkfs.ext3 -m 0 /dev/sda1
Executing: tune2fs -c 0 -i 0 /dev/sda1
Executing: mkswap /dev/sda2
Executing: mkfs.ext4 -m 0 -E stride=16,stripe-width=11 /dev/sda3
Executing: tune2fs -c 0 -i 0 /dev/sda3
Executing: fai-vol_id -u /dev/sda1
Executing: fai-vol_id -l /dev/sda1
/dev/sda1 UUID=8544a13b-f04d-4fbc-9839-a06210038bc2
Executing: fai-vol_id -u /dev/sda3
Executing: fai-vol_id -l /dev/sda3
/dev/sda3 UUID=80d98196-60c0-4fc6-a90c-4b7b2fa93bf2
Executing: fai-vol_id -u /dev/sda2
Executing: fai-vol_id -l /dev/sda2
/dev/sda2 UUID=8e0722c5-7f7c-46db-8d4e-8e8c007efdfe
Calling task_mountdisks
Enable swap device /dev/sda2
Mounting /dev/sda1 to /target/
Mounting /dev/sda3 to /target/e



On Monday, 21 May 2012 at 4:57 PM, George Barnett wrote:

> 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 (http://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