setup-storage+gpt: alignment aware?

Thomas Neumann blacky+fai at fluffbunny.de
Mon Mar 19 23:32:51 CET 2012


Hello list
(or should I address Michael personally since he's probably the only one 
who can answer this?)

Does the setup-storage tool try to create properly aligned GPT 
partitions? Reason for asking is a somewhat discouraging information on 
wikipedia:

Hard disk manufacturers are transitioning to 4096-byte sectors. As of 
2010, the first
such drives continue to present 512-byte physical sectors to the OS, so 
degraded
performance can result when the drive's (hidden) internal 4 KiB sector 
boundaries do
not coincide with the 4 KiB logical blocks, clusters and virtual memory 
pages common
in many operating systems and file systems. This is a particular problem 
on writes
when the drive is forced to perform two read-modify-write operations to 
satisfy a
single misaligned 4 KiB write operation.
Such a misalignment occurs by default if the first partition is placed 
immediately
after the GUID partition table, as the next block is LBA 34. The next 4 
KiB boundary
begins with LBA 40.
<http://en.wikipedia.org/wiki/GUID_Partition_Table#Features>

http://www.ocztechnologyforum.com/forum/showthread.php?54379-Linux-Tips-tweaks-and-alignment&p=472998&viewfull=1#post472998 
has a detailed explanation how to create a properly aligned partition table.


my current disk_config prototype
================================

disk_config disk1 disklabel:gpt-bios
primary    swap     8G  swap  sw
primary    -        4G- -     -

disk_config lvm
vg vg_system disk1.2
vg_system-root      /         4G-12G    xfs  rw

resulting partition table
=========================

Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start      End        Size       File system     Name      Flags
  1      63s        16777278s  16777216s linux-swap(v1)  primary
  2 16777279s  41942766s  25165488s                  primary   lvm
  3 41942767s  41943006s  240s                       primary   bios_grub


Additional question 1)
  What is the difference between disklabel:gpt and disklabel:gpt-bios?
  Refering to http://wiki.fai-project.org/wiki/Setup-storage 'gpt-bios'
  should not be a valid keyword: disklabel:(msdos|gpt)

Additional question 2)
   Is there a way to make setup-storage create the gpt bios partition as 
partition 1
   instead of 3? Rationale: Nothing technical. Just a cosmetical issue: 
It looks better
   to me.

bye
thomas


More information about the linux-fai mailing list