You are not logged in.
Pages: 1
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
Can you post your rc.local?
In order to understand recursion, one must first understand recursion.
Offline
#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#
Last edited by dx21 (2013-01-28 16:35:36)
Offline
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
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
In order to understand recursion, one must first understand recursion.
Offline
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.
Offline
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
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
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
You should use something from /dev/disk/by-id and not from /dev/disk/by-uuid.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
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.
Last edited by dx21 (2013-01-29 14:31:41)
Offline
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
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
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. 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
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
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.
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
Well i guess there's no way to fix this. 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
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
Pages: 1