Sql-server – What’s the proper Disk alignment for Virtual server that will have SQL Server on it

sql servervmware-server

I've brought up a Windows Server 2008 box that has VMware Virtual Server on it. I have a 500 GB volume allocated from the SAN for the Datastore that will house the VM for a Windows Server 2008/SQL Server 2008 server. If it wasn't virtual, I would normally align this like:
create partition primary align=64
assign letter=E
format fs=ntfs unit=64K label="" nowait

This will be a test/dev box and I just want to see what the most common alignment would be.

Thanks

Best Answer

The alignment offset should be whatever is appropriate for the underlying storage and the requirements of the partitioning standard you are using. This applies no matter how many layers of abstraction are involved, you must ensure that each partition is aligned at it's own level (so the host NTFS volumes need to be aligned, and the Guest OS NTFS volumes need to be aligned even if they are physically presented from VMDK's sitting on an already aligned NTFS volume).

So for VMware Server running under W2K8 with a VMDK sitting on an NTFS partition. You should align the host partition and then align the volumes within the guest as well. If the volume you are concerned about is a RAW disk being presented to the Guest OS then you should just align that. The only thing you need to make sure of is that your offset is a multiple of the stripe size used on the underlying physical storage. If you use an unaligned volume within the guest then you will see IO's spanning stripe boundaries even if the underlying NTFS volume is aligned.

I'm pretty sure that Windows 2008 (and Windows 7) now automatically align volumes on a 1Meg boundary just to be sure that they are going to be safely aligned under almost all scenarios so I don't think you need to do anything specific for your case to ensure that it's all OK.

Related Topic