Is WD Advanced Format Drives still a problem? [SOLVED]

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

Is WD Advanced Format Drives still a problem? [SOLVED]

Postby giantjoebot on Fri Oct 19, 2012 8:02 pm

I know it was never really a problem, and they just had to be formatted differently, but what I want to know is if you still have to do that, or does it auto detect that its an Advanced Format Drive?

On WD's website it said that if the Linux kernel is 2.6.31 or newer that it shouldn't be a problem, but I thought I would check here just to be sure
http://wdc.custhelp.com/app/answers/detail/a_id/5655/~/how-to-install-a-wd-advanced-format-drive-on-a-non-windows-operating-system
Last edited by giantjoebot on Fri Oct 26, 2012 3:50 pm, edited 1 time in total.
giantjoebot
Level 1
Level 1
 
Posts: 17
Joined: Sun Sep 30, 2012 3:26 pm

Linux Mint is funded by ads and donations.
 

Re: Is WD Advanced Format Drives still a problem?

Postby srs5694 on Sat Oct 20, 2012 6:35 pm

The kernel has almost nothing to do with it! The problem is in the drive and the fact that writing part of a 4KiB physical sector requires reading that sector, modifying its contents, and writing it back out again. Between the read and the write, the sector will have spun out from under the read-write head, so the disk will have to rotate at least once before the write can occur. This process will inevitably take longer than writing a whole physical sector, which requires no read operation. Partition alignment matters because most filesystems include data structures that are 4KiB in size, or multiples of that amount, aligned on multiples of 4KiB relative to the start of the filesystem, which in turn is normally the start of the partition. Thus, if the partition is aligned properly, most disk reads and writes will be of 4KiB or larger amounts on physical-sector boundaries. If not, many disk reads and writes will span physical sector boundaries, resulting in the need for that extra read and delay when writing data.

The only thing the kernel has to do with it is that the kernel includes calls to return the logical and physical sector size. Unfortunately, with every Advanced Format drive I've used (admittedly only about four or five of them), either the drives lie about this detail or the kernel doesn't report it accurately. Furthermore, the partitioning software must use the data, making it at least as important as the kernel.

That said, as a practical matter, most Linux partitioning software today uses 1MiB (2048-sector) alignment by default. (I hear that cfdisk is a fossil on this score and still uses cylinder alignment, but I've not checked it myself.) Thus, if you use modern partitioning software, you should be OK; however, it's a good idea to double-check the matter yourself by obtaining a sector-precise listing of your partitions' start points and checking that all the numbers are divisible by 8. (The extended partition, if you have one, is an exception; its alignment is irrelevant.)

BTW, I'm the author of the GPT fdisk partitioning software, so I've studied this issue pretty closely.
srs5694
Level 5
Level 5
 
Posts: 938
Joined: Mon Feb 27, 2012 1:42 pm

Re: Is WD Advanced Format Drives still a problem?

Postby jazz.h on Sat Oct 20, 2012 6:48 pm

So if Disk Utility says that my extended partition is misaligned (and the performance is degraded) but the primary are OK, than it's irrelevant (as I assumed)?
jazz.h
Level 4
Level 4
 
Posts: 235
Joined: Sat Jun 18, 2011 7:13 am

Re: Is WD Advanced Format Drives still a problem?

Postby srs5694 on Sat Oct 20, 2012 10:20 pm

jazz.h wrote:So if Disk Utility says that my extended partition is misaligned (and the performance is degraded) but the primary are OK, than it's irrelevant (as I assumed)?


Based on that message alone, yes. I recommend checking the numbers yourself, though; Disk Utility isn't entirely reliable about figuring out what's properly aligned. (It often raises false alarms, though, rather than missing problems -- except of course in versions that are old enough that they don't check for proper alignment.)
srs5694
Level 5
Level 5
 
Posts: 938
Joined: Mon Feb 27, 2012 1:42 pm

Re: Is WD Advanced Format Drives still a problem?

Postby jazz.h on Sun Oct 21, 2012 1:10 pm

Thanks.
jazz.h
Level 4
Level 4
 
Posts: 235
Joined: Sat Jun 18, 2011 7:13 am

Re: Is WD Advanced Format Drives still a problem?

Postby giantjoebot on Thu Oct 25, 2012 4:26 pm

That was a very detailed explanation. I understood most of it, except towards the end. This is where you lost me
double-check the matter yourself by obtaining a sector-precise listing of your partitions' start points and checking that all the numbers are divisible by 8. (The extended partition, if you have one, is an exception; its alignment is irrelevant.)

I have no idea how to do that. But you did answer my question, thank you very much. I do appreciate it.
giantjoebot
Level 1
Level 1
 
Posts: 17
Joined: Sun Sep 30, 2012 3:26 pm

Re: Is WD Advanced Format Drives still a problem?

Postby srs5694 on Thu Oct 25, 2012 6:13 pm

giantjoebot wrote:That was a very detailed explanation. I understood most of it, except towards the end. This is where you lost me
double-check the matter yourself by obtaining a sector-precise listing of your partitions' start points and checking that all the numbers are divisible by 8. (The extended partition, if you have one, is an exception; its alignment is irrelevant.)

I have no idea how to do that. But you did answer my question, thank you very much. I do appreciate it.


Most partitioning tools have an option to provide sector-precise partition start and end points. For instance:

Code: Select all
sudo fdisk -lu /dev/sda
sudo parted /dev/sda unit s print
sudo gdisk -l /dev/sda


All of these will display partition start and end points in sectors; however, you should use fdisk only on MBR disks. (It will show the protective MBR's 0xEE partition for GPT disks, and that's irrelevant.) As noted, the alignment of extended partitions on MBR disks is irrelevant, since extended partitions are just placeholders for logical partitions. It's the alignment of the filesystem-holding partitions (primary and logical) that's important on MBR disks. (GPT doesn't make the distinction between these partition types; with it, the alignment of any partition that holds a filesystem is important.)

GUI tools can also be used, but you may need to select a special option. In GParted, for instance, you should select a partition and then click Partition->Information to get an information dialog box that includes the first and last sector information.
srs5694
Level 5
Level 5
 
Posts: 938
Joined: Mon Feb 27, 2012 1:42 pm

Re: Is WD Advanced Format Drives still a problem?

Postby giantjoebot on Fri Oct 26, 2012 3:54 am

that doesn't sound too hard. Dude you are amazing and have gone above and beyond to answer my question thank you so much
giantjoebot
Level 1
Level 1
 
Posts: 17
Joined: Sun Sep 30, 2012 3:26 pm

Linux Mint is funded by ads and donations.
 

Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 9 guests