De Laatste weken zag ik het topic Partition/Disk Alignment verschillende malen langs komen. Ik maakte tot op heden nog geen gebruik van deze optie en wilde er nu wel eens het fijne van weten. VMware heeft een whitepaper gepubliseerd over dit onderwerp. Deze vind je hier:
Partition alignment is a known issue in physical file systems, and its remedy is well-documented. The goal of the testing reported in this paper was to validate the assumption that unaligned partitions also impose a penalty when the partition is a VMware Virtual Machine File System (VMware VMFS) partition.
This paper lists a summary of the results of our testing, recommendations for VMware VMFS partition alignment, and the steps needed to create aligned VMware VMFS partitions.
Nadat je de whitepaper hebt gelezen, wil je natuurlijk zelf ook wel eens kijken hoe dit in zijn werk gaat. Ik kwam een how to tegen, die geschreven is door Harley Stagner en gepost is op: http://searchvmware.techtarget.com/.
Voordat je door kunt gaan, heb je een pc of een VM nodig met daarop de Windows Automated Installation Kit (AIK) geïnstalleerd.
To install Windows AIK, you need to download the image from Microsoft, burn it to a DVD and install it. Once WindowsAIK is installed, go to Start, then Programs, then Windows AIK, then Windows PE Tools command prompt. Note: If you use Windows Vista, you have to right-click on the Windows PE Tools command prompt entry and select RunAs Administrator.
With the command prompt open, you need to run a command that will set up the directory structure needed to create your WinPE 2.0 disk. Run the following at the command prompt:
copype <arch> <destination>
Where <arch> is your processor architecture (x86, amd64, or ia64) and <destination> is a path to a local directory. Below is an example of running this command:
copype x86 c:\winpe-2_0 <enter>
copy c:\winpe\winpe.wim c:\winpe-2_0\iso\sources\boot.wim /y
The final step is the creation of the iso file. This can be done with the following command:
oscdimg -n -h -bc:\winpe-2_0\etfsboot.com c:\winpe-2_0\iso c:\winpe-2_0\winpe_diskpart.iso
Nu de iso klaar is, kunnen we een nieuwe VM opstarten met winpe_diskpart.iso
Run Diskpart:
Diskpart
select disk 0 (of een ander nummer, als je een andere disk wilt alignen)
create partition primary align=64
Via msinfo32 kun je de alignment nakijken.
How to tell if your disks are aligned
How can you tell if a disk is unaligned at the Windows partition level? Remember the MBR statement — that x86 systems use the first 63 sectors. Usually there are 512 bytes per sector. If you do the math, 63 x 512 = 32,256. To verify this, log into a machine (physical or virtual) as an administrator that has not had its system volume aligned. Go to Start, then Run, then type in "msinfo32.exe" and press enter. Navigate down to Components, then Storage, then Disks. Notice that the partition starting offset for Disk #0, Partition #0 (the system volume) is 32,256 bytes. This means that the disk is not aligned.If the partition Starting Offset is 65.536 bytes, the disk is aligned.
![]()
Meer informatie over disk alignment vind je hier: http://blogs.netapp.com/storage_nuts_n_bolts/2009/01/mbrscanmbralign.html
Als je kunt inloggen op now.netapp.com/. Dan kun je hier de tool mbrscan downloaden. Via deze tool kun je vanaf het Service Console de Alignment nakijken. Netapp is ook bezig met een ander script genaamd mbralign. Via dit script kun je de alignment aanpassen zonder dataverlies.
Update: Rudolf Kleijwegt poste de volgende reacite: In Windows 2008 is het niet meer nodig om de Windows Automated Installation Kit te gebruiken. Je kunt namelijk tijdens het installeren de toetsencombinatie SHIFT+F10 gebruiken om een command prompt te openen. Op dat moment heb je de beschikking over diskpart en kun je een uitgelijnde partitie aanmaken. Deze procedure gaat helaas niet op voor Windows 2003. Als je daar SHIFT+F10 gebruikt krijg je een recovery console met een uitgeklede diskpart.
In Windows 2008 is het niet meer nodig om de Windows Automated Installation Kit te gebruiken. Je kunt namelijk tijdens het installeren de toetsencombinatie SHIFT+F10 gebruiken om een command prompt te openen. Op dat moment heb je de beschikking over diskpart en kun je een uitgelijnde partitie aanmaken. Deze procedure gaat helaas niet op voor Windows 2003. Als je daar SHIFT+F10 gebruikt krijg je een recovery console met een uitgeklede diskpart.
Windows 2008 en Vista houden bij het aanmaken van een partitie al een offset van 1MB aan.
Hierover kwam ik het volgende tegen:
http://sqlblog.com/blogs/kevin_kline/archive/2008/10/08/how-to-improve-application-and-database-performance-up-to-40-in-one-easy-step.aspx
Zeker het verhaal van Scott R. in de comments is interessant om te lezen. Een kleine snippet:
Most references to disk volume alignment suggest consulting with the storage hardware vendor to determine the preferred volume alignment offset, with the majority of cases being 32 KB or 64 KB but some higher. All published volume alignment values I have seen to date are binary multiples (32 KB, 64 KB, 128 KB, etc.). The vendor-recommended volume alignment value may be fixed for a given storage hardware model, or may vary depending on other storage configuration values (such as stripe size, etc.). I have observed that the vendor-recommended values are often related to the storage cache architecture and the size of individual cache requests (which are often based on binary multiple sized caches and stripe sizes). Joe touched on this in his reply above.
Prior to Windows Vista and Windows Server 2008, I chose to use a larger binary multiple volume alignment value of 1 MB (1,024 KB or 1,048,576 bytes) to cover all cases, on the basis that an aligned disk volume using a larger binary multiple alignment value is also aligned for all smaller binary multiples. This offered a more vendor- and model-independent volume alignment process to follow (hopefully with fewer errors). Little did I know that Microsoft would choose the same 1 MB disk alignment value as the default for Windows Vista and Windows Server 2008 for creating new disk volumes.
Is er een mogelijkheid om na installatie nog van alignement te veranderen? Met bijvoorbeeld partitietools/imaging of iets dergelijks?