Aligning a partiton with setup-storage

Patrick Cervicek patrick at failist.spamtrap.hs-esslingen.de
Mon Jul 19 16:40:33 CEST 2010


On Sat, 10 Jul 2010, Michael Tautschnig wrote:

>> For performance reasons we would like to install our servers with
>> aligned partitions (Partiton starts at sector number 64 instead of
>> 63).
>> This is the sequence we would use with fdisk.
>>   fdisk /dev/whatever1     x b 1 64
>> How can we do that with Setup-Storage or other other FAI tools?
>>
>> Patrick
>>
>> btw: For Details for "aligned partitons" refer to section "Background" in this PDF:
>> http://www.vmware.com/pdf/esx3_partition_align.pdf
>>
>
> I have only briefly looked at this document, but I couldn't quite figure out
> whether all you need is to enforce that the first partition starts at sector
> number 64 *in any case* and you don't care about other partitions or do you need
> alignment according to disk geometry?

Alignment is only important when an external RAID is used.

I just asked at IRC #vmware for an example:
Our FC-SAN (NetApp) uses 4K blocks. Each sector of a vmware disk uses 512
bytes.
   4096 bytes
   ----               = 8 sectors
    512 bytes/sector

A multiple of 8 sectors form a 4KB FC-Block. I do not know why all
documents are using sector 64 or 128 as startpoint for the 1st partition.
It looks like Ubuntu 10.04 is using 2048 as start sector

$sudo sfdisk  -d /dev/sda
...
/dev/sda1 : start=     2048, size=607033344, Id=83, bootable
...

Older Ubuntu are using sector 63 (unaligned).

> Current setup-storage in mainline FAI
> still does use cylinder-aligned partitions, but this requirement has been
> dropped in the experimental branch. I'd see several options for the future:
>
> - Drop any kind of alignment and let people create a dummy-partition such that
>  the effective data partition only starts as of the 64th sector.
> - Make alignment configurable. But then the kind of alignment must get
>  clarified.
>

The IRC channel told me 2 possible workarounds:
a) Create a dummy partions which ends on sector 63 to force setup-storage 
to start at sector 64
b) or write an own partitions hook and create the partions with sfdisk

Of cource it would be better to have support included in setup-storage. 
e.g a variable "blocksize=4k" which the calculates the alignment itself.

Patrick

btw:
I found also a good document from NetApp to this issue:
http://media.netapp.com/documents/tr-3747.pdf
Section: "3.1 CONCEPTS AND ISSUE"




More information about the linux-fai mailing list