Forum Spotlight: How to Safely Align a Misaligned Partition on an Advanced Format Drive

by Alex Kuretz on February 13, 2011 · 3 comments

in Forum Spotlight, Guides

The following is a guest article by forum member “msawyer91″ aka Matt Sawyer, who is passionate about Windows Home Server and also the developer of the popular Home Server SMART Add-In.

There has been a fair amount of activity in the forums here, and on other Windows Home Server sites, that talk about Advanced Format hard drives (AFDs). Some of our members like TechVet and ymboc have written up some nice articles on using Western Digital AFDs, particularly their EARS series of drives, which have a jumper that easily allows them to be used with legacy operating systems without fuss or trouble.

Windows Home Server “v1” is based on the Windows Server 2003, which is regarded as a legacy OS in terms of AFDs. Microsoft warns people not to use AFDs with WHS v1 due to the risk of data corruption. This poses a number of problems. First, all major hard drive manufacturers agreed to manufacture only AFDs after January 1, 2011. That means the available pool of new non-AFDs will only get smaller. Second, Microsoft’s choice to nix Drive Extender from WHS 2011 (aka “v2”) has riled almost the entire loyal WHS v1 user base, and many have made it clear they don’t intend to upgrade from WHS v1.

So what is the big deal here? Well, it goes back to the “good old days” of hard drives, when you had to configure a computer to use them based on C/H/S – cylinders, heads and sectors. Sectors have been 512 bytes in size for more than 30 years. AFDs use 4096 byte sectors. Microsoft’s legacy OSes (every OS prior to Windows Vista SP-1) offset the first partition on any disk by 63 x 512 byte sectors, which does not evenly line up with 4096 byte sectors. Microsoft did this to properly align its partitions with “cylinder boundaries,” maintaining full backwards compatibility with the ancient notion of C/H/S. Had they offset by one more sector, 64, this discussion would be entirely academic.

The result is that the boundaries Microsoft’s NTFS allocation units, which are 4096 bytes in size in WHS v1, do not evenly line up with the physical AFD’s 4096 byte sectors (they’re always 512 bytes off). The result is that for every 4096 byte NTFS unit written, two physical sectors must be updated, and since each sector contains error correcting code, a single NTFS unit write requires two ECC calculations. This can result in extra disk latency (remember the old days of having to adjust disk interleaves?), and thus the performance of an AFD is typically degraded by a minimum of 50%, sometimes more. Under heavy I/O loads, this partition misalignment can lead to data corruption.

Fortunately, there is a way around this. As I pointed out above, TechVet wrote a nice article on how to safely use the Western Digital EARS drives, which contain a special jumper (pins 7 and 8). This jumper is to only be used with legacy OSes. This instructs the drive to translate the OS’ request by adding 1 x 512 byte sector. So when WHS v1 creates a partition starting at a 63 (x 512) sector offset, the drive dynamically adds 1 and thus the partition is started at a 64 (x 512) sector offset and tragedy is avoided.

But what about folks who aren’t using Western Digital AFDs? Or what if you’ve been unknowingly using an AFD in your WHS? Or perhaps you knew the disk was an AFD and you decided to take a chance on it? In my case, I bought a Seagate external 2 TB USB drive, which in no way was marked on the case or the packaging that the disk was an AFD. I found out after using the drive for about two weeks that it was an AFD, and by then it had a ton of data on it. What could I do? I did not want to take a chance on corrupting data, but I wanted to keep this very nice, high capacity drive.

And thus I wrote up a process, available on this site, on how to properly align a misaligned partition. When you import a disk into the disk pool by WHS, it doesn’t matter if the disk is partitioned. WHS graciously blows away the entire partition structure, and lays down a new partition with a 63 x 512 byte offset, guaranteeing you a misaligned partition. Only the Western Digital drive owners, who have installed the special jumper on pins 7 and 8, are immune.

The process I wrote is not for the faint of heart, as it involves a fair amount of risk. If you’re not careful, you could certainly lose a lot of data. It involves using a special tool, called Paragon Alignment Tool ($30 USD), to realign the partition on the disk. Use of WMI commands to get the “before” and “after” disk characteristics plus plenty of tweaking of the Registry is mandatory, and if you miss a step or don’t do things right, you’re going to lose data.

A couple of weeks later, I decided this process needs help. The PAT tool took 21 hours to process a 2 TB USB drive, and I thought “there must be a faster way!” And there is, and it doesn’t require you to purchase any tools. This alternate, accelerated process is best suited for installation of new AFDs, as they will contain very little, if any, data. The original process is likely the safer way to go if you have an AFD in your pool that’s got a lot of data on it, but I’ll leave it up to you to decide. You can also remove an AFD from the pool, re-add it to the pool and then follow the accelerated procedure if you want to save yourself $30 by not having to buy the Paragon Alignment Tool!

Whichever path you choose, what you’re basically doing is changing the partition so that it starts at a 4096 byte sector boundary, eliminating the misalignment condition, and then reconnecting it to WHS. WHS stores, in the Registry, the partition byte offset and the partition size, which you need to update. This essentially “fools” WHS into using the newly aligned partition. The result is you get to use your AFDs with properly aligned partitions, eliminating the performance degradation and the risk of data corruption. Now you can safely buy an AFD and know you can use it with WHS v1.

If you’re like me, you aren’t looking to upgrade to WHS v2 without Drive Extender, and thus you’ll be sticking it out with WHS v1, and with AFDs taking over the marketplace, we need a way for WHS v1 to properly use them.

Here are the links to the instructions on how to align a misaligned AFD:
Original Procedure – Best for AFDs that have been in your storage pool

Alternate/Accelerated Procedure – Best for New AFDs that haven’t been installed into the pool yet





Article by

I'm Alex Kuretz, and I'm the founder of MediaSmartServer.net. I was the Lead Test and Integration Engineer at HP for the MediaSmart Server until April 2008 when I moved on to other opportunities outside HP. I've kept active in the Windows Home Server community, creating several add-ins and helping users make the most of their Home Servers.


{ 3 comments }

Techvet February 13, 2011 at 5:41 pm

This is an absolute awesome write-up that is mandatory reading for anyone using non-Western Digital ADFs in their WHS v1 system. Seagate, Samsung, Hitachi and others don’t have jumper provisions of the WD drives, so msawyer91′s instructions are absolutely essential if using those brands of ADF drives. Thanks Matt for putting it together!

LoneWolf15 April 1, 2011 at 11:06 am

So does this mean I can use a 3TB drive in an eSATA enclosure for WHS v1 backup now?

My 2TB drive isn’t cutting it any more.

LoneWolf15 April 1, 2011 at 11:07 am

Note also that as Hitachi’s 3TB drive is $50 cheaper than WD’s EARS drive, I’d sure like to save the cash.

Comments are closed, visit the forums to continue the discussion.

Previous post:

Next post: