You are not logged in.

#1 2013-01-28 16:13:50

dx21
Member
Registered: 2012-09-14
Posts: 15

Western Digital HDD spindown problem

Hy all!
I've got a Western Digital Scorpio Blue 250GB laptop hdd. I want to use it as a file storage drive, because i have an ssd in my system, for the OS.

My problem is, that i can't really set the spindown time to my drive. When i use hdparm -B 127 or less, my hdd spin down after 8 sec (the head parking time is also 8 sec for this drive btw), no matter what the value of the -S in hdparm. When I set the -B value more than 127, my hdd never spin down.

hdparm -I output:

/dev/sdb:

ATA device, with non-removable media
	Model Number:       WDC WD2500BEVS-75UST0                   
	Serial Number:      WD-WXE308EC0938
	Firmware Revision:  01.01A01
Standards:
	Supported: 8 7 6 5 
	Likely used: 8
Configuration:
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:   16514064
	LBA    user addressable sectors:  268435455
	LBA48  user addressable sectors:  488397168
	Logical/Physical Sector size:           512 bytes
	device size with M = 1024*1024:      238475 MBytes
	device size with M = 1000*1000:      250059 MBytes (250 GB)
	cache/buffer size  = 8192 KBytes
Capabilities:
	LBA, IORDY(can be disabled)
	Queue depth: 32
	Standby timer values: spec'd by Standard, with device specific minimum
	R/W multiple sector transfer: Max = 16	Current = 8
	Advanced power management level: 126
	Recommended acoustic management value: 128, current value: 254
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 udma6 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   *	SMART feature set
	    	Security Mode feature set
	   *	Power Management feature set
	   *	Write cache
	   *	Look-ahead
	   *	Host Protected Area feature set
	   *	WRITE_BUFFER command
	   *	READ_BUFFER command
	   *	NOP cmd
	   *	DOWNLOAD_MICROCODE
	   *	Advanced Power Management feature set
	    	SET_MAX security extension
	   *	Automatic Acoustic Management feature set
	   *	48-bit Address feature set
	   *	Device Configuration Overlay feature set
	   *	Mandatory FLUSH_CACHE
	   *	FLUSH_CACHE_EXT
	   *	SMART error logging
	   *	SMART self-test
	   *	General Purpose Logging feature set
	   *	WRITE_{DMA|MULTIPLE}_FUA_EXT
	   *	64-bit World wide name
	   *	IDLE_IMMEDIATE with UNLOAD
	   *	Segmented DOWNLOAD_MICROCODE
	   *	Gen1 signaling speed (1.5Gb/s)
	   *	Native Command Queueing (NCQ)
	   *	Host-initiated interface power management
	   *	Phy event counters
	    	DMA Setup Auto-Activate optimization
	    	Device-initiated interface power management
	   *	Software settings preservation
	   *	SMART Command Transport (SCT) feature set
	   *	SCT Read/Write Long (AC1), obsolete
	   *	SCT Write Same (AC2)
	   *	SCT Error Recovery Control (AC3)
	   *	SCT Features Control (AC4)
	   *	SCT Data Tables (AC5)
	    	unknown 206[12] (vendor specific)
	    	unknown 206[13] (vendor specific)
Security: 
	Master password revision code = 65534
		supported
	not	enabled
	not	locked
		frozen
	not	expired: security count
	not	supported: enhanced erase
	88min for SECURITY ERASE UNIT. 
Logical Unit WWN Device Identifier: 50014ee2014374d9
	NAA		: 5
	IEEE OUI	: 0014ee
	Unique ID	: 2014374d9
Checksum: correct

I really don't know what is the problem here, please help me.

Offline

#2 2013-01-28 16:32:19

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: Western Digital HDD spindown problem

Can you post your rc.local?


In order to understand recursion, one must first understand recursion.

Offline

#3 2013-01-28 16:35:08

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#

smile

Last edited by dx21 (2013-01-28 16:35:36)

Offline

#4 2013-01-28 16:46:08

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: Western Digital HDD spindown problem

Have you added the hdparm line into the rc.local file as described in the wiki?


In order to understand recursion, one must first understand recursion.

Offline

#5 2013-01-28 17:01:29

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

No, i didn't. I don't want to make the changes permanent yet. Btw could you drop me a link? I can't find rc.local related part in the hdparm arch wiki.

Offline

#6 2013-01-28 17:02:40

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: Western Digital HDD spindown problem


In order to understand recursion, one must first understand recursion.

Offline

#7 2013-01-28 17:36:45

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

i've modified my rc.local just in case:

#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#
hdparm -B 127 /dev/disk/by-uuid/148a880c-b413-4748-b4a8-ddff5a9254d3
hdparm -S 6 /dev/disk/by-uuid/148a880c-b413-4748-b4a8-ddff5a9254d3

But as expected, the bahaviour is the same. sad

Offline

#8 2013-01-28 17:57:31

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: Western Digital HDD spindown problem

Try specifying your hdd as shown below instead of by the uuid.  Also, for the purpose of testing remove or comment out the second hdparm -S line.


hdparm -B 254 /dev/sda


In order to understand recursion, one must first understand recursion.

Offline

#9 2013-01-28 18:28:58

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

I can't use /dev/sdx, because the os choose radnomly between my ssd and my hdd. So i don't really know who will become the sda and sdb at the next boot.
About the testing: I don't really know why we messing with the rc.local, because when we execute a hdparm command from terminal (-S -B) the behaviour of the HDD changes instantly. (as far as i know)

Offline

#10 2013-01-28 23:16:18

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: Western Digital HDD spindown problem

So you have a separate ssd and hdd?  That the operating system chooses randomly?  I am not sure what you mean.  Give more info on your disk setup and I may be able to help you better.

We are using rc.local becauase the terminal commands won't stick between reboots.
Try the following line and then append this to your /etc/pm/sleep.d/50-hdparm_pm

#!/bin/sh
 
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then
	hdparm -B 127 /dev/disk/by-uuid/148a880c-b413-4748-b4a8-ddff5a9254d3 > /dev/null
fi 

then

chmod +x /etc/pm/sleep.d/50-hdparm_pm 

Hope that helps.


In order to understand recursion, one must first understand recursion.

Offline

#11 2013-01-29 12:12:23

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 3,610

Re: Western Digital HDD spindown problem

You should use something from /dev/disk/by-id and not from /dev/disk/by-uuid.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#12 2013-01-29 14:24:51

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

DeadDingo wrote:

So you have a separate ssd and hdd?  That the operating system chooses randomly?  I am not sure what you mean.  Give more info on your disk setup and I may be able to help you better.

We are using rc.local becauase the terminal commands won't stick between reboots.
Try the following line and then append this to your /etc/pm/sleep.d/50-hdparm_pm

#!/bin/sh
 
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then
	hdparm -B 127 /dev/disk/by-uuid/148a880c-b413-4748-b4a8-ddff5a9254d3 > /dev/null
fi 

then

chmod +x /etc/pm/sleep.d/50-hdparm_pm 

Hope that helps.

So, I have a laptop (Dell Inspiron 1525) with separate SSD and HDD.
SSD (OS) --->in the original hdd slot
HDD ---> in the ODD slot with caddy
Yes, the OS chooses randomly who become the sda and sdb, that's why i use uuid-s.

I know what is the rc.local, but i don't want to apply my changes every reboot yet, i'm just TESTING. Also, it's not important to keep my changes between sleep states yet because the same reason. I don't know why is this important right now.

Let's be my HDD the sda. I execute theese two commans by order:

sudo hdparm -B 127 /dev/sda

It's allow the spindown for the hdd, because the value less than 128. It seems it's working fine.

sudo hdparm -S 36 /dev/sda

  It's set the spindown time to 36*5=180 sec, but in my case, no matter what the value is, the real spindown time is always 8 sec (if allowed by the hdparm -B). So this is my REAL problem.

R00KIE: Why the id better than uuid? I tought they're just symlinks.

Yesterday I tried with Fedora LiveUSB but the effect was just the same. sad

Last edited by dx21 (2013-01-29 14:31:41)

Offline

#13 2013-01-29 17:52:15

DeadDingo
Member
Registered: 2012-09-29
Posts: 46

Re: Western Digital HDD spindown problem

hmmm.  Honestly this shouldn't be so difficult.  I assume you have double checked the UUID numbers of the hdd an ssd?


In order to understand recursion, one must first understand recursion.

Offline

#14 2013-01-29 19:08:06

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 3,610

Re: Western Digital HDD spindown problem

dx21 wrote:

R00KIE: Why the id better than uuid? I tought they're just symlinks.

In case you didn't notice, the symlinks in /dev/disk/by-uuid all point to partitions, some of the links in /dev/disk/by-id point to devices, which is what you want to use with hdparm.

Since your device doesn't always show up in the same place, using one of the symlinks in /dev/disk/by-id will solve that problem because it will always point to the right device node.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#15 2013-01-29 21:52:24

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

R00KIE wrote:
dx21 wrote:

R00KIE: Why the id better than uuid? I tought they're just symlinks.

In case you didn't notice, the symlinks in /dev/disk/by-uuid all point to partitions, some of the links in /dev/disk/by-id point to devices, which is what you want to use with hdparm.

Since your device doesn't always show up in the same place, using one of the symlinks in /dev/disk/by-id will solve that problem because it will always point to the right device node.

I didn't think about that. My mistake. smile But it doesn't solve my problem, because when i call manually the hdparm i always use sdx, and the problem still there.

Last edited by dx21 (2013-01-29 21:53:19)

Offline

#16 2013-01-30 14:27:26

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 3,610

Re: Western Digital HDD spindown problem

Your hd probably doesn't spin down when using hdparm -B 254 because the disk is accessed periodically as long as it is mounted, you may want to look at some laptop optimizations/tweaks that let the disk idle for longer and allows it to spin down.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#17 2013-02-02 11:59:35

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

I've tested it. It's not spin down with value of -B 254, and -S 4, even if it's unmounted. Also, this hdd isn't spin down, when the value greater than 127 as I told. sad
However when i call the hdparm -y /dev/sda, the hdd spin down instantly, and stays in that state, till i access some data.

Offline

#18 2013-02-11 15:07:44

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

Well i guess there's no way to fix this. sad This is not my first unsolvable problem with this HDD. I can't change the head parking time too (tried with wdidle3). WD should care about the advanced users too. :s I will think twice to buy another WD hdd.

Last edited by dx21 (2013-02-11 15:08:59)

Offline

#19 2013-07-28 10:13:33

dx21
Member
Registered: 2012-09-14
Posts: 15

Re: Western Digital HDD spindown problem

Hello again! I've got a new question. Is there any kind of software, wich can tell me when the hdd accessed last time? I hate to call the hdparm -y manually, so i want to write a script.

Offline

Board footer

Powered by FluxBB