You are not logged in.
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. Example. Example 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 packages • Zsh and other configs
Offline
While this is for FreeBSD it may be useful.
Offline
This link will be of interest to you and may be a bit more educational for your particular needs:
Offline
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 packages • Zsh and other configs
Offline
Thanks for the script, I'll try it when I install my 2 new WD20EARS
Offline
Thanks for the script, I'll try it when I install my 2 new WD20EARS
My script won't work with multiple drives...
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Fackamato wrote:Thanks for the script, I'll try it when I install my 2 new WD20EARS
My script won't work with multiple drives...
This does
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
Nice... enjoy.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
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:
Offline
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:
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 packages • Zsh and other configs
Offline
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
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 packages • Zsh and other configs
Offline
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
Thats for both of my WD20EARS.
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
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 packages • Zsh and other configs
Offline
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
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
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
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
Last edited by Milena (2010-07-17 05:02:33)
Offline
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
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
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
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 packages • Zsh and other configs
Offline
Excelent, thx a lot!
Offline
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
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