Reply
Occasional Advisor
nuess0r
Posts: 10
Registered: ‎01-17-2010
0
Accepted Solution

Problem with WD Advanced Format drive in LINUX (WD15EARS)

[ Edited ]

I got a new harddrive with a bit more capacity for my stuff. It's a brand new WD15EARS from Western Digital. This drive uses, as one of the first, the newer 4096 byte big sector size instead of the common 512 byte. This is indicated on a label on the package and also on the Harddrive including instructions what you have to do when you are using Windows XP to get the drive working properly. Read this Article for more information about 4k sector size HD's 

The last sentence on the label is a lie:
All other OS configurations - drive is ready for use as is


Problem
I installed it yesterday, created a fresh partition table and EXT3 filesystem with gparted and startet to copy my data from the old disk to the new WD15EARS.

Write speed was horrible slow. As a patience person I gave the process a lot of time to finish but after 24 hours only 100 Gbyte was copied…
Very slow transfer rate of less then 1 Mbyte/s!!


Solution
Searching the Internet including the WD forum didn't gave me an answer. So I tried to follow the instructions for using the HD with the old Windows XP: set jumpers 7-8 prior to installation or use WD Align SW

but no luck!


Where's the Error?
For me it seems that the problem is that only the consumer but not his operating system knows about Advanced format:
hdparm -i /dev/sda

/dev/sda:

Model=WDC, FwRev=80.00A80, SerialNo=WD-WMAVU1361115
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=1
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=2930277168
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
AdvancedPM=no WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7

The drive does NOT report his sector size so hdparm and all other tools suggest that it is 512 byte (You see this with hdparm -I /dev/sda), what will cause miss aligned filesystem blocks like described in the article above what happens with Windows XP.
More testing

Then I started playing arround with different partion tables (MS DOS and GPT) and different filesystems (EXT3, reiserfs, XFS). All the time it gave me the same result, exept XFS. Anytime you recognise that something is wrong during filesystem initialising because it is way slower than usual.

 

If you ask, yes it is a quite fresh Linux installation:

Linux zipf 2.6.31-5.slh.3-sidux-amd64 #1 SMP PREEMPT

nforce 430i chipset

hdparm v9.15
mke2fs 1.41.9 (22-Aug-2009) Using EXT2FS Library version 1.41.9
mkfs.xfs version 3.0.4

mkfs.reiserfs 3.6.21

Occasional Visitor
aadamowski
Posts: 2
Registered: ‎01-24-2010
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

Hi!

 

I have the same problem, you might want to have a look at this thread at util-linux-ng mailing list:

 

http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2926

 

 

Occasional Visitor
aadamowski
Posts: 2
Registered: ‎01-24-2010
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

[ Edited ]

BTW, could you try manually aligning the GPT partition?

 

See below how to do this in parted:

 

 

 

# parted /dev/sdX
# Set units to sectors (in this case 512B):
(parted) unit s

(parted) rm
Partition number? 1

(parted) print
Model: ATA WDC WD15EARS-00Z (scsi)
Disk /dev/sdb: 2930277168s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart
Partition name?  []?
File system type?  [ext2]?
Start? 64
End? -1
Warning: You requested a partition from 64s to 2930277167s.
The closest location we can manage is 64s to 2930277134s.
Is this still acceptable to you?
Yes/No? Yes

(parted) print
Model: ATA WDC WD15EARS-00Z (scsi)
Disk /dev/sdb: 2930277168s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End          Size         File system  Name  Flags
 1      64s    2930277134s  2930277071s

(parted) quit
Information: You may need to update /etc/fstab.

 

This should align the partition's start from the 32nd kilobyte (or should I say kibibyte?)

Occasional Advisor
nuess0r
Posts: 10
Registered: ‎01-17-2010

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

In the meantime I made some similar test like aadamowski and got the same conclusion:

 

You have to make shure YOURSELF that your partitions are aligned correctly to 4KiB boundries.

 

A detailed discussion about this topic on the linux kernel mailing list.

 

 

Here is a short manual how to create a correctly aligned partition with parted (thanks to aadamowski):

(WARNING: the instructions below will likely destroy any data that's
on the given drive, only do this with drives you're intending to
erase):

# parted /dev/YOUR_DEVICE_NAME

(parted) mklabel gpt
# Here ^ I've chosen the GPT partition table format, but others may be
OK too - untested by me.

(parted) unit s
# Here ^ we're choosing sectors as units of measurement

(parted) mkpart primary ext2 40 -1
# Here ^ we're creating a partition that starts at sector 40, which is
divisible by 8.
# You can also try 48, 56, 64 and others - these should offer the same
high performance,
# but some space will go to waste - it's only some tiny kilobytes, though.

# Parted will likely complain about the end location of the ending sector:
Warning: You requested a partition from 40s to 2930277167s.
The closest location we can manage is 40s to 2930277134s.
Is this still acceptable to you?
Yes/No?
# Of course, we answer Yes.

(parted) quit

# After that, create a filesystem as usual, e.g:
# mkfs.ext4 -T largefile4 /dev/YOUR_DEVICE_NAME

This should get the optimum performance from your 4 kB physical sector
drives even when they report 512 B sectors only to the OS.

 

 

If you prefer to use fdisk follow these steps (they come from ted):

 

 fdisk -H 224 -S 56 /dev/sdb

 running fdisk with these parameters ensures that every partition you create is aligned to 4KiB boundries.

 

Wenn du eine Anleitung auf  Deutsch benötigst, schau doch hier.

Occasional Advisor
nuess0r
Posts: 10
Registered: ‎01-17-2010
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

 

Hopefully, WD will decide that it is necessery that a HDD reports it's correct sector size to the OS. Else all the good efforts of the OS and HDD tool developers, like what they currently discuss at the Linux Kernel Mailinglist, is useless and an unknowing user will still get frustrated.

 

 

This should be fixed in an firmware update:

hdparm -i /dev/sda


/dev/sda:

Model=WDC, FwRev=80.00A80, SerialNo=WD-WMAVU1361115
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=1
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=2930277168
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
AdvancedPM=no WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode 

Visitor
Daniel
Posts: 3
Registered: ‎02-02-2010
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

Hello,

I also bought a WD15EARS drive. I'm totally frustrated. If you think to buy a WD drive and you will use Linux and Windows on those disk: LOOOK FOR AN OTHER DEVICE MANUFACTURE! Maybe you are a harddisk expert and you are motivated to invest many hours, than you can do it. I spend more then 20 hours for partition disk in a correct way with(!) a good performance. And I think every poster on this site too.

I tried the performance script from aadamowski and I can conform the performance problem with Linux. Setting the partitions to the correct borders, like suggested, you can't use the disk with windows XP! The Windows System can not generate a NTFS on the disk.

I found out with the benchmark script from aadamowski, that the 10 time boost just work if your harddisk is configured with "R/W multiple sector transfer" of 16. By default on my Debian/unstable 64bit system (Kernel 2.6.32.7 with util-linux 2.17 it has the value 1. If I set it to 16 with:
hdparm --yes-i-know-what-i-am-doing -m 16 /dev/sdb
I'm getting the boost (and I don't know what I am doing there ;-)).

I will give the device a last try, otherwise I will send it back. It's just a harddisk (I thougt) :-(

Regards

    Daniel


Visitor
Daniel
Posts: 3
Registered: ‎02-02-2010
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

BTW: Why is this thread marked as solved? There is a workaround but no solution. And for Linux and Windows I'm having no workaround.

Valued Contributor
WendyM
Posts: 140
Registered: ‎11-30-2009
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

Hi Daniel,


The person who started the thread is the one who can mark a post as the solution if it answered their question or solved the issue for them. 


-WendyM

Click the Kudos star as a way to say thank you for helpful posts.
Be sure to come back and click the 'Accept as Solution' button on the post that solved your issue - it may help someone else.

Occasional Advisor
nuess0r
Posts: 10
Registered: ‎01-17-2010
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

Can you post your partition table here, so others could try to repeat your described problems with the ntfs partition?

 

I don't use this drive for dual boot, so I don't tested this kind of things. But it could be still a important problem to solve in regards to the pending patches for the linux fdisk and parted tools.

Visitor
Daniel
Posts: 3
Registered: ‎02-02-2010
0

Re: Problem with WD Advanced Format drive in LINUX (WD15EARS)

After investing some more hours in partitioning a harddisk I have a working setup.

Using the fdisk with -H 224 -S 56 /dev/sdb build a wrong harddisk with problems under windows XP. testdisk shows errors.

Make sure to delete the partitiontable with

dd if=/dev/zero of=/dev/sdb count=1 bs=1k

and create a new one with parted (see other postings). Then make sure to have them at a divide by 8 boundary.

 

I have to format them under Windows without(!) the quick/fast mode.

 

I'm still demotivated about the disk.....

Forums | Ideas | News and Announcements | Register | Sign in | Help | Forum Guidelines
Copyright © 2001 - 2013 Western Digital Corporation, All rights reserved. | Trademarks | Privacy | Terms of Service | Terms of Use | Copyright | Contact WD