5

We're about to hardware upgrade our exisiting Sql 2008 Server. So, I'm checking out some best practices with regards to hardware, like .. RAID levels for the HD and making sure the TempDB is on a different disk than the DB's, etc.

I then stumbled onto these two posts here and here. They chat about making sure our Windows 2008 servers have the correct partition offset size.

I'm a bit confussed after I read those posts. They mention in various places that..

Windows Server 2008 aligns partitions by default.

So, if i wish to have partition sizes of 64K, Do i need to worry about this? Remember, I'll be doing a fresh install of Windows Server 2008 .... and I can't remember seeing any option during the install, when we partition disks, for partition alignments/sizes.

Can anyone shed some light, in layman's terms, please?

**Note: i'm not talking about C:\ == 50Gig size, D:\ == xxxGig, etc. Not that type of partitioning.

3 Answers 3

6

Ok - to make this clear...

If you are creating volumes on Windows Server 2008, you do not need to be concerned about the volume's partition offset because Windows Server 2008 will automatically set is to 1MB, which is a multiple of the common RAID stripe sizes and NTFS allocation unit sizes (both of which you should usually have set to 64K, unless you I/O subsystem won't let you go below 128K for the RAID stripe size - which is fine). In your question, you mention partition size, and what you're actually talking about is the NTFS allocation unit size (default 4K).

If you are installing a new Windows 2008 Server and then attaching volumes to it that were actually created using Windows Server 2003 or before, then unless you have previously used diskpart to change the partition offset from the default of 32.5K (63 x 512byte disk blocks), you must manually change it with diskpart, or recreate the volume.

My preference would be to backup your databases and then restore them on newly created volumes.

Hope this helps!

PS My blog post that you reference talks about having the correct partition offset, not partition size. And the whitepaper link in the first answer is the same one that I reference in the blog post you've already read.

1
  • Ok - gothcha (and appologiess for the mis quoting, etc). I'll fix my original post up with strikethroughs.
    – Pure.Krome
    Jul 1, 2009 at 3:34
2

It's how the partition is aligned on the physical disk (or raid lun). This is important because we want that alignment not to split a RAID stripe in the middle. Windows Server prior to 2008 aligned at a 32K boundary which worked fine on a single disk or a mirror pair but often split a stripe in the middle. To manually set partition alignment you must create the partition using the diskpart command line tool.

Here's some specific info for you:

Disk Partition Alignment Best Practices for SQL Server

1
  • So with that diskpart tool, this has to happen AFTER the OS has been installed .. and on another partition OTHER than the OS?
    – Pure.Krome
    Jun 30, 2009 at 8:40
1

You mean block size, not partition size.

Alignment is only relevlent in that you can create partitions that don't start on an exact multiple of the drive/raid/ssd's native block/stripe size which causes a hefty slowdown.

2
  • So should I be worrying about this, with sql server 2008 + windows server 2008? or is this a redundant issue, now.
    – Pure.Krome
    Jun 30, 2009 at 8:41
  • With Windows 2008 it's effectively redundant - windows 2008 uses a 1024k offset which works well with all versions of SQL - previous versions of windows used a 32k offset which didn't play well with SQL. Jun 30, 2009 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .