You are not logged in.

#1 2010-06-22 22:00:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Western Digital WD20EARS "Advanced Format" - 4k sectors needed

I just purchased a Western Digital WD20EARS which uses "Advanced Format" which to my understanding are 4k sectors rather than 512 byte sectors.  To function properly, the partitions need to align with this 4k sector size - like an SSD?  Anyway, I found the following references, but wanted to ask here too before I attempt partitioning the hdd: what is the proper process and software to ensure that I do this correctly?

* This post talks about using parted from the shell for the partitioning.
* I've also read in various places to simply start the partition with fdisk in sector mode (hitting 'u') and be sure to start at sector 64 rather than on sector 63.  ExampleExample 2 (you have to search for the keyword 'linux')
* I've also read to do the same, except to start at sector 2048.
* This post at the centos forum recommends using 'fdisk -H 224 -S 56 /dev/sdX' to "make sure that all possible partitions will be in alignment with the 4K sectors. Any partition you create that way will align the partition with the 4K sectors."

Thanks in advance for any info.

EDIT:  https://wiki.archlinux.org/index.php/Advanced_Format

Last edited by graysky (2011-08-31 13:12:05)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2010-06-22 22:18:01

rusty99
Member
Registered: 2009-03-18
Posts: 253

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

While this is for FreeBSD it may be useful.

Offline

#3 2010-06-23 00:44:54

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

This link will be of interest to you and may be a bit more educational for your particular needs:

http://www.osnews.com/story/22872/Linux … ard_Drives

Offline

#4 2010-06-24 21:19:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

I just used fdisk (setting both modes 'c' and 'u') and aligned it to sector 2048 - interestingly, in sector mode, the default starting point is not 63 or 64 but 2048 in the current version of fdisk (2.17.2) so it's automatically taking care of the 4k sector size for me.  Everything works fast so I'm assuming that it's correct.

Credit to this post.

Here are some reference numbers on three drives

a = Seagate 7200.12 ST31000528AS (1.0 TB) spinning at 7200 RPM
b = WD Black WD1001FALS (1.0 TB) spinning at 7200 RPM
c = WD Green WD20EARS (2.0 TB) spinning at 5900 RPM

# hdparm -Tt /dev/sd[a-c]

/dev/sda:
 Timing cached reads:   15512 MB in  1.99 seconds = 7780.21 MB/sec
 Timing buffered disk reads:  338 MB in  3.02 seconds = 112.07 MB/sec

/dev/sdb:
 Timing cached reads:   15796 MB in  1.99 seconds = 7922.77 MB/sec
 Timing buffered disk reads:  308 MB in  3.01 seconds = 102.20 MB/sec

/dev/sdc:
 Timing cached reads:   15128 MB in  1.99 seconds = 7586.77 MB/sec
 Timing buffered disk reads:  356 MB in  3.01 seconds = 118.08 MB/sec

Not too bad considering the WD20EARS spins ~18 % slower than the other two.

EDIT: This drive also attempts to part the read heads once every 8 seconds which is just horrible.  Use hdparm in your /etc/rc.local to disable this 'feature' and likely add life to your hdd:

# echo "hdparm -S 242 /dev/sdX" > /etc/rc.local

EDIT2: Here is a trivial script that detects the presence of this drive on my system and automatically send that hdparm command.  Note that I only have a WD20EARS and this script won't work for multiple copies.

#!/bin/bash
test=`fdisk -l | grep 2000.4 | cut -c13-13`
if [ -z "$test" ]; then
 echo retarded drive not found, exiting
 exit 0
else
 echo retarded drive found, fixing lcc
 hdparm -S 242 /dev/sd$test
fi

Last edited by graysky (2010-06-27 06:58:30)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2010-07-05 14:31:31

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Thanks for the script, I'll try it when I install my 2 new WD20EARS smile

Offline

#6 2010-07-05 14:46:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Fackamato wrote:

Thanks for the script, I'll try it when I install my 2 new WD20EARS smile

My script won't work with multiple drives...


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2010-07-05 14:53:04

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

graysky wrote:
Fackamato wrote:

Thanks for the script, I'll try it when I install my 2 new WD20EARS smile

My script won't work with multiple drives...

This does smile

for DISK in `fdisk -l |grep 1000.2 | cut -c13-13`; do echo hdparm -S 242 /dev/sd$DISK; done

(just testing)

fackamato@ion:~$ for DISK in `sudo fdisk -l |grep 1000.2 | cut -c13-13`; do echo hdparm -S 242 /dev/sd$DISK; done
hdparm -S 242 /dev/sdb
hdparm -S 242 /dev/sdc

Last edited by Fackamato (2010-07-05 14:53:28)

Offline

#8 2010-07-05 17:58:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Nice... enjoy.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2010-07-05 20:53:46

Milena
Member
Registered: 2010-04-02
Posts: 67

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

graysky wrote:

EDIT: This drive also attempts to part the read heads once every 8 seconds which is just horrible.  Use hdparm in your /etc/rc.local to disable this 'feature' and likely add life to your hdd:

# echo "hdparm -S 242 /dev/sdX" > /etc/rc.local

What exactly is the problem with this HDD's and is it recommend to use the hdparm tweak you posted ?

I have 2x WD20EARS 2TB as Software RAID0, 512KB stripe block and EXT4 on it with journal disabled. While overall performance seems fine i think there are problems with the access time, its sometimes lagging and movies stutter occasionally or games freeze when loading from the RAID. Using 4KB blocks would improve anything here ?

Here's a benchmark with 2 of these HDD's versus my 64GB SSD:

ssdraid0hdd_bench1.png

Offline

#10 2010-07-13 21:09:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Milena wrote:
graysky wrote:

EDIT: This drive also attempts to part the read heads once every 8 seconds which is just horrible.  Use hdparm in your /etc/rc.local to disable this 'feature' and likely add life to your hdd:

# echo "hdparm -S 242 /dev/sdX" > /etc/rc.local

What exactly is the problem with this HDD's and is it recommend to use the hdparm tweak you posted ?

I have 2x WD20EARS 2TB as Software RAID0, 512KB stripe block and EXT4 on it with journal disabled. While overall performance seems fine i think there are problems with the access time, its sometimes lagging and movies stutter occasionally or games freeze when loading from the RAID. Using 4KB blocks would improve anything here ?

Here's a benchmark with 2 of these HDD's versus my 64GB SSD:

http://i191.photobucket.com/albums/z13/ … bench1.png

Yeah, 4k blocks would improve efficiency - these are after all meant to be formatted as such ("Advanced Format").  The head parking is an entirely different issue.  What does smartmontools say about your llc?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2010-07-14 12:18:39

Milena
Member
Registered: 2010-04-02
Posts: 67

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Hmm what's llc ? I only have the gnome disk utility installed at the moment but can do smartmontools later. So this HDD will go into standby mode after only 8 seconds idle time and  hdparm -S 242 /dev/sdX  will set it to go standby after 60 minutes idling ?

Offline

#12 2010-07-14 20:43:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Basically, yes.  LLC = typeo on my part... it should be LCC which stands for load cycle count.  You can read it from your SMART chip in the HDD.  gnome disk utility will display this I think.  Each number is a count of when the read heads park.  The HDD will park them once every 8 seconds.

9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       428
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       232875

I'm capturing all this info in a wiki page.  http://wiki.archlinux.org/index.php/Advanced_Format


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#13 2010-07-14 22:30:38

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

You have a small spelling error in your wiki entry that should read, I think: "will attept to park the read heads" and not "will attempt to part the read heads."

Sorry to nitpick but it is a small error that may confuse those whose native language is not english.

Last edited by MoonSwan (2010-07-14 22:31:51)

Offline

#14 2010-07-15 11:29:19

Milena
Member
Registered: 2010-04-02
Posts: 67

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Thats for both of my WD20EARS.
lcc.png
That would be about 2150 power on hours here, but much less than your value for LCC.
PC is in normal use, running 8-10 hours a day. I'm planning to get another 2 of these HDD's and go RAID5 with 4 disks.

Regarding the hdparm tweaks, people on a german hardware shop's forum (mindfactory.de) claim the warranty is lost when manipulating these settings, i'm not sure if that's true or if WD can find out if you get in the unfortunate situation to send them in.

Last edited by Milena (2010-07-15 11:35:44)

Offline

#15 2010-07-15 23:52:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

I dunno man, 117,080 is huge if you asked me.  54 times per hour.  Mine is much lower than what I posted.  I pasted that out of a thread from another forum.  Anyway, I would recommend that you use that hdparm tweak.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#16 2010-07-16 03:12:37

canen
Member
From: Jamaica
Registered: 2008-11-28
Posts: 35

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

You can use the development version of the KDE Partition Manager (http://aur.archlinux.org/packages.php?ID=22778) which supports advanced format drives.

Offline

#17 2010-07-16 13:50:37

Milena
Member
Registered: 2010-04-02
Posts: 67

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

graysky wrote:

I dunno man, 117,080 is huge if you asked me.  54 times per hour.  Mine is much lower than what I posted.  I pasted that out of a thread from another forum.  Anyway, I would recommend that you use that hdparm tweak.

Hmm ok thanks i will use that then. I start to believe the permanent head parking is maybe the reason why i get occasional lag/stutter when loading from the raid, for example i play a game and it freezes for 1-2 seconds the moment its loading something during gameplay. I never had that with my old hdds, 2x samsung and raid0 as well.

Edit: I found your thread on anandtech through google search for the wd20ears park issue and further info on kerneltrap, they explicitly recommend to turn it off when using a sw-raid with mdadm. And the 10 more watts power consumption without head parking...who cares, if i want to save power i turn off my pc but while its on i expect things working reliable at maximum performance.

Last edited by Milena (2010-07-16 14:20:05)

Offline

#18 2010-07-17 01:32:53

Milena
Member
Registered: 2010-04-02
Posts: 67

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

After adding

hdparm -S 242 /dev/sdb
hdparm -S 242 /dev/sdc

to /etc/rc.local and using my pc the whole evening, this command does nothing to the load cycle count, its still the same as before. If i hit the Refresh button in the disk utility i can see how the value still happily raises every few seconds ><
The -S 242 command is probably only for spin-down after one hour but does not affect the park timer, at least not here at the moment.

Edit: Its suggested to use hdparm -B 255 to disable the power saving modes but that command just gives error messages:

[root@MilenaPC milena]# hdparm -B 255 /dev/sdb

/dev/sdb:
setting Advanced Power Management level to disabled
HDIO_DRIVE_CMD failed: Input/output error
HDIO_DRIVE_CMD(identify) failed: Input/output error


http://wdc.custhelp.com/cgi-bin/wdc.cfg … faqid=5357

Last edited by Milena (2010-07-17 02:08:49)

Offline

#19 2010-07-17 04:59:41

Milena
Member
Registered: 2010-04-02
Posts: 67

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Well i got it now working for good after googling all night. You need a tool called WDIDLE3.EXE and run it from a dos bootdisk.

http://www.synology.com/support/faq_ima … didle3.zip
http://www.synology.com/support/faq_show.php?q_id=407

It looks like WD does not officially support this tool for WDXXEARS but many people recommend to do this.
I used the /D option instead of /S300 (D is meant for disable but it set it to 62 minutes).
HDD's have to be connected only one at time and in IDE mode, the tool didn't detect anything with disks in AHCI mode.
Was quiet annoying and hopefully worth it, my load cycle count didn't raise anymore within the last ~45 minutes smile

Last edited by Milena (2010-07-17 05:02:33)

Offline

#20 2010-07-17 09:37:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

I emailed WD about this and their response was basically NOT to use the util and that it would void the drive's warranty if I did use it.  That's why I use the hdparm method smile


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#21 2011-08-31 12:39:15

enito
Member
Registered: 2009-02-17
Posts: 50

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Hi,

this tips look fine, and good when today i get one of this drives. If im not bad the procedure of partion is:

fdisk -cu /dev/sdx   and create the partition using n etc..
now for format

mkfs.ext4 -b 4096 /dev/sdX

is correct?

i read this info from:
http://www.johannes-bauer.com/linux/wdc/?menuid=3

Offline

#22 2011-08-31 13:12:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,643
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Oh dude, you necrobumped... I suspect this thread will get closed in a few.  BTW, read I wrote the wiki on this topic (edited my first thread to include a link).


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#23 2011-08-31 13:31:19

enito
Member
Registered: 2009-02-17
Posts: 50

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

Excelent, thx a lot!

Offline

#24 2011-08-31 16:56:43

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

I'm sorry to disappoint you but hdparm will probably report the same values regardless of partitions being aligned or not, the issue with 4K sector drives is writing not reading. However if fdisk suggested 2048 as the beginning of the first partition then I'd say things will be ok.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#25 2011-09-20 15:01:57

1LordAnubis
Member
Registered: 2008-10-10
Posts: 253
Website

Re: Western Digital WD20EARS "Advanced Format" - 4k sectors needed

sorry to revive this, but graysky, is your WD20EARS still working over a year later? (I've seen some really negative reviews...)


Any society that would give up a little liberty to gain a little security will deserve neither and lose both.
-Benjamin Franklin
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
-George Bernard Shaw

Offline

Board footer

Powered by FluxBB