[blfs-support] GUID Partition Tables (GPT)

akhiezer lfs65 at cruziero.com
Thu Mar 21 12:04:46 PDT 2013


> Date: Thu, 21 Mar 2013 10:48:22 -0500
> From: Bruce Dubbs <bruce.dubbs at gmail.com>
> To: BLFS Support List <blfs-support at linuxfromscratch.org>
> Subject: Re: [blfs-support] GUID Partition Tables (GPT)
>
> xinglp wrote:
> > 2013/3/21 Bruce Dubbs <bruce.dubbs at gmail.com>:
	.
	.
> >>
> >> The example table is outdated.  We really don't want the first partition
> >> to start at sector 34.  gpt does the right thing by default and aligns
> >> everything at 1 MiB boundaries.
	.
	.
> >>
> >>      1            2082            4129   1024.0 KiB  EF02  BIOS boot part
> >>      2            4130          208929   100.0 MiB   8300  Linux fs
> >>      3          208930         8392737   3.9 GiB     8300  Linux fs
> >>      4         8392738        11968424   1.7 GiB     8200  Linux swap
> >>      5        11968425        20971486   4.3 GiB     8300  Linux fs
> >
> > if the "BIOS boot part" at 34 - 2047 sector, and then it is just 1007.0 KiB.
> > Number  Start (sector)    End (sector)  Size       Code  Name
> >     1              34            2047   1007.0 KiB  EF02
> >     2            2048         1361886   664.0 MiB   8300  vm1_part1
> > Althrough the first partion is not aligned, but it is just 1007.0 KiB.
>
> That's a good point.  I hadn't thought about that, but I think you're right.
>


The aim of such alignments is, of course, mainly to avoid write amplification on 
4k-sector disks; and to a slightly lesser extent to optimise reads. If a partition 
is written to &/or read from only very rarely - like, a boot partition or grub's 
boot-part area - then from the point of view of write-amplification & read-opt it 
doesn't matter overly much if the partition is aligned or not at start or end 
sectors. (You do of course want your normal read-write partitions to be aligned). 
A possible gotcha is if some (dumb) piece of software assumed unnecessarily that 
the partition had to be aligned (I could imagine grub doing something 'meta' like 
that at some point).

And, of course, such userland alignments may be moot for some drives that are 
suspected (or known) to do their own internal remappings to/from aligned sectors 
anyhow.


akh

 

>From the point of view of write amplification on 4k-sector disks, 

It doesn't matter 
For 4k-sector disks, 




--



More information about the blfs-support mailing list