I recently bought the currently biggest Western Digital Caviar Green hard drive, the WD20EARS (on WD) (2 TB, 64MiB cache, Serial ATA 3 Gbps). Since I’m using Linux and Windows XP I knew I’d have some trouble partitioning it, since this drive features WD’s quite recent Advanced Format Technology (AFT). Yet I didn’t think it would be so time consuming to figure out a working and proper method.
What’s the Advanced Format Technology (AFT)?
To make a long story short, hard drives are organized into sectors. Each sector starts with a Sync/DAM block, then come the “real” data, then finally an Error Correction Code (ECC) block… and then a gap before the next sector (or rather, the next Sync/DAM block). For the last three decades, sectors have been 512 bytes big. This made sense when drive sizes were around some megabytes (since you can’t place 2 files inside 1 sector, the sector size determines the minimum space a file can use), but with today’s terabyte drives, this just doesn’t seem as appropriate (plus anyway modern file systems regroup sectors in indivisible 4KiB clusters). AFT simply changes the sector size to 4096 B (512 B x 8).
With this larger sector come the following advantages:
- for a 512 byte sector you needed 40 bytes of ECC, but for a 4096 bytes sector you can use only 100 bytes of ECC, a 220 bytes saving from what it takes for eight 512 bytes sectors (8×40-100=220).
- for a 4096 B sector you only need one Sync/DAM block, down from 8 blocks if you have 8 512 B blocks (although I couldn’t find anywhere if an AFT Sync/DAM block is bigger than a normal Sync/DAM block)
- each 4096 B sector, you get a sector gap, while on non-AFT hard drives you get a sector gap after each 512 B sector. So on AFT you have 8 times fewer sector gaps.
So globally, the main point of this is to stick more data into the same physical space (about 7-11% more according the sources I found – see at the end of this chapter – so the picture above is quite a bit exaggerated ;)). The use of one bigger ECC block instead of several smaller ones also improves burst error correction by 50% according to WD’s white paper on AFT. Finally AFT allows better performances (not a lot faster, but still faster): I didn’t find precisely why, but I guess this has to do with 8 times fewer sectors to read (since an AFT sector has 8 times more data) and smaller areas to read (since the AFT equivalent of 8 legacy 512 sectors is smaller).
I won’t go deeper into details, if you want further reading there you go:
- Western digital – Advanced Format Technology – White Paper (PDF)
- HotHardware – Exploring WD’s Advanced Format HD Technology
- AnandTech – Western Digital’s Advanced Format: The 4K Sector Transition Begins
What’s the problem with Advanced Format Technology?
As above-mentioned, 512 bytes sectors have been around for like an eternity. Thus any other sector size isn’t supported by, for instance Windows XP or even recent versions of Linux. To make the disk work anyway in all cases, Western Digital made it emulate 512 bytes sectors (see at the end of the white paper). So AFT disks will work in old OSes. But they won’t work in an optimal way: the OS will believe the sectors are 512 B, and thus will misalign clusters with physical sectors, which can be pretty much harmful for performance (although not at all physically damaging for the disk).
Ok, now what’s the solution?
If you’re on Windows or Mac OS 10.4+ using the GUID Partitioning Table scheme (GPT), check WD’s AFT page. If your Windows version is Vista or Seven, or if it’s XP and you’re sure you won’t need to edit any partition after using WD Align, that will be all.
Otherwise:
- if you’re on Windows XP and willing to edit your partitions after using WD Align, you’ll need either a third-party partitioning software, or Linux (I used Ubuntu 10.04 on this). This is because once you have aligned partitions using WD Align you shouldn’t EVER use Windows’s built-in partitioner (I tried that, it destroyed all my partitions in a fraction of a second) (note that you can still use Windows disk manager, just don’t try to modify the partitions with it on the whole AFT drive).
- if you’re on Linux: if you’re on kernel 2.6.34 you should be fine. Otherwise, if you have parted in its version >= 2.1 you can use it with the
-a optimal
parameter and it should create properly aligned partitions. The source of this information is WD’s Knowledge Base. They claim that Ubuntu 10.04 and Fedora 13 should align AFT drives properly (implicit: because they’re on kernel 2.6.34?). Well, Fedora 13 doesn’t, and has kernel 2.6.33 if I remember well, and neither does Ubuntu 10.04 (kernel 2.6.32). But Ubuntu 10.04 does have parted version 2.2.
OK, so, solved your problem yet? If not, I guess you’re either:
- On Mac OS using Apple Partition Manager (APM): you’re screwed, really. Yet, it works, after all… just not as fast as it could…
- On Windows XP, willing to edit the partitions later and not willing to buy a specific piece partitioning software: get Linux (you can just use some LiveUSB Linux: no installation required, can install/update packages if you configure persistent storage properly on your USB key)
- On Windows XP, willing to edit the partitions later and not willing to buy a specific piece partitioning software nor to get Linux. Well, you’ll have to make a choice: either don’t edit the partitions or get what it takes to edit them.
Or finally, you might be on Linux, without kernel 2.6.34 and not willing to use parted (or not having a recent enough parted), or just curious about aligning the partitions manually. Well, lucky you: I came up with a solution using GNU fdisk!
Update (17 August): here it is, finally, the fdisk + gparted guide: Dealing with WD Advanced Format hard drives on Linux (part 2).
Thank you so much for writing this David! I’m very glad to have come across your very informative site.