aarklon
Earlier I wrote an article discussing the hyperactive APM modes that some drive manufacturers use and how that leads to excessive head parking and severly reduced drive life. It seems newer versions of Ubuntu and Kubuntu are coming with APM on the drives completely disabled (a setting of 255 using the -B option of the hdparm command). This is all swell and good but disregards the fact that many of us have hardware that doesn't support the 255 option and rely on the slightly lower setting of 254, which doesn't completely disable APM on the drive but causes it to be very, very slow to park.
So let's set up the system for the rest of us. First we need to edit the /etc/hdparm.conf file and add this at the end. Please be aware that your hard drive may not be "/dev/sda" like mine, so make sure you get that part right for your system.
/dev/sda {
apm = 254
}
Finally, let's reboot and check our current APM settings on the drive to be sure our settings are being applied at startup. The command to check the drive's current state is:
sudo hdparm -I /dev/sda|grep "Advanced power management level:"
If that shows you a value of 254 then you're golden. Congratulations on extending the life of your hard drive. It looks like the folks at Ubuntu also got this sorted out for both ATA and SATA drives when resuming from sleep, but do yourself a favor and check that on your system as well.
As a side note, how can you tell how many times the heads have parked? First, install the smartmontools package, then check the number of load cycles that the drive has gone through:
sudo apt-get install smartmontools
sudo smartctl -A /dev/sda|grep "Load_Cycle_Count"
As a rule of thumb most consumer drives can load cycle at or just above 500,000 times. Be aware that this isn't a hard limit, it's just a guess. Your mileage will vary.
source: http://eric.biven.us/2008/10/09/my-hard-drive-is-clicking-again-so-im-stopping-it-cold-when-ubuntu-boots/
see: http://ubuntuforums.org/showthread.php?t=1021561&highlight=hard+drive+clicking
I tried what is said in this howto and found that my clicking sound
has
now reduced to a very small noise, now what i want is to eliminate
this sound completely, so how to do it ?
what is the method/means to know if hardware doesn't support 255
option ?
How to find out the optimal apm value for a particular hard disk ?
NB: I use ubuntu 8.04.1
propman
http://www.samsung.com/global/business/hdd/
Anton Ertl
Yes, the load cycles would also be my first guess, a start-stop cycle my second. You can check which one is the case with the method mentioned in the posting:
smartctl -a /dev/hda|grep Count
If the Start_Stop_Count goes up on clicking, it's a start-stop cycle (full spindown and spin-up); if only the Load_Cycle_Count goes up, then it's a load cycle (parking and unparking the head assembly in its rest position).
> I tried what is said in this howto and found that my clicking sound
>has
> now reduced to a very small noise, now what i want is to eliminate
>this sound completely, so how to do it ?
> what is the method/means to know if hardware doesn't support 255
>option ?
From what I read in the hdparm man page, trying 255 does not hurt. So you could try it, and if there's still clicking, settle for 254. For my purposes 254 is good enough, though.
What I find strange is that you write that the clicking is reduced to a very small noise; a load cycle should have the same volume when it happens, it should just happen much more rarely. Maybe the lower-volume stuff is ordinary head-moving noise. You may be able to reduce that noise with "hdparm -M 128 /dev/..." (sorry, I don't know the name of this setting in /etc/hdparm.conf).
The other thing I wonder about is: What do you mean when you write "whenever the computer stops"?
sheridan hutchinson
There are two types of clicking that occur. Either, I'm dying clicking from the drive itself, or the sound of the drive heads parking due to power management.
As you describe this happening when activity calms down I'm going to assume the latter.
If this a laptop? If this is a laptop this is desirable as it will decrease power usage.
In Debian or Ubuntu the laptop-mode-tools package manages this. You need to go through the configuration file with a fine tooth comb to get the settings how you want them. If you do use laptop-mode-tools you can be assured that there is a way of disabling this when on AC and or battery.
If you are using a desktop then this is and odd situation however I think you could use hdparm and configure that to disable the powermanagement completely.
annalissa
when i issue the command sudo telinit 0 or when i click system ->
Quit option
the following is the o/p of my smartctl command
zodiac@ubuntu:~$ sudo smartctl -a /dev/sdb
[sudo] password for zodiac:
smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce
Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: SAMSUNG HD252HJ
Serial Number: S17HJ9DQ803060
Firmware Version: 1AC01113
User Capacity: 250,059,350,016 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Not recognized. Minor revision code: 0x52
Local Time is: Sun Dec 28 11:38:48 2008 EST
==> WARNING: May need -F samsung or -F samsung2 enabled; see manual
for details.
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection
activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine
completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (3751) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before
entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 63) minutes.
Conveyance self-test routine
recommended polling time: ( 8) minutes.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE
UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 100 051 Pre-fail
Always - 0
3 Spin_Up_Time 0x0007 094 094 011 Pre-fail
Always - 2840
4 Start_Stop_Count 0x0032 100 100 000 Old_age
Always - 55
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail
Always - 0
7 Seek_Error_Rate 0x000f 253 253 051 Pre-fail
Always - 0
8 Seek_Time_Performance 0x0025 100 100 015 Pre-fail
Offline - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age
Always - 84
10 Spin_Retry_Count 0x0033 100 100 051 Pre-fail
Always - 0
11 Calibration_Retry_Count 0x0012 100 100 000 Old_age
Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age
Always - 55
13 Read_Soft_Error_Rate 0x000e 100 100 000 Old_age
Always - 0
183 Unknown_Attribute 0x0032 100 100 000 Old_age
Always - 0
184 Unknown_Attribute 0x0033 100 100 099 Pre-fail
Always - 0
187 Unknown_Attribute 0x0032 100 100 000 Old_age
Always - 0
188 Unknown_Attribute 0x0032 100 100 000 Old_age
Always - 0
190 Temperature_Celsius 0x0022 076 066 000 Old_age
Always - 403963928
194 Temperature_Celsius 0x0022 071 065 000 Old_age
Always - 29 (Lifetime Min/Max 0/7444)
195 Hardware_ECC_Recovered 0x001a 100 100 000 Old_age
Always - 10
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age
Always - 0
197 Current_Pending_Sector 0x0012 100 100 000 Old_age
Always - 0
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age
Offline - 0
199 UDMA_CRC_Error_Count 0x003e 100 100 000 Old_age
Always - 0
200 Multi_Zone_Error_Rate 0x000a 100 100 000 Old_age
Always - 0
201 Soft_Read_Error_Rate 0x000a 253 253 000 Old_age
Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 0
Warning: ATA Specification requires self-test log structure revision
number = 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective Self-Test Log Data Structure Revision Number (0)
should be 1
SMART Selective self-test log data structure revision number 0
Warning: ATA Specification requires selective self-test log data
structure revision number = 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute
delay.
Anton Ertl
Ok, so you halt the system. Parking the head is fine under these circumstances, and clicking is normal; now that I think of it, my system also produces a very audible click when I shut it down, and that may well come from the Samsung drive I have (HD753LJ). And the hdparm apm (-B) setting won't affect this; the -M setting might make it quieter, but I doubt it.
Is there any particular reason why you want to make that click
quieter?
>zodiac@ubuntu:~$ sudo smartctl -a /dev/sdb
Hmm, no Load_Cycle_Count (neither for my Samsung disk), but since this is a desktop disk, it probably won't park the head unless it is spinning down (i.e., load-cycle count = start-stop count).
anton ertl
Sheridan Hutchinson
[heads parking]
>If this a laptop? If this is a laptop this is desirable as it will
>decrease power usage.
AFAIK parking does not decrease power usage. Laptop drives do it as a safety precaution: if the user drops the laptop, the chances of the drive surviving are much better if the heads are parked than if they are not.
Spinning down does decrease power usage (but spinning up again takes a few seconds, so drives are much more reluctant to do it).
However, the OP uses a 3.5" desktop drive.
Back to laptops and heads parking:
However, in Linux normally the system writes the atime of various files every few seconds, so it unparks the heads very shortly after they are parked, leading to very high load-cycle counts for some drives unless you tell the drive to be less aggressive with their head parking (my latest laptop drive reached 300000 load cycles before I noticed that); you can then reach the life expectancy of the drive (a SMART VALUE entry of 0) wrt load cycles in less than a year on some
drives. So you should either tell the drive to be less aggressive with parking, or tell the OS to write less (e.g., by mounting the file systems with the noatime option, and/or by using laptop mode). On my laptop I took the first approach.
aarklon
BTW how could you figure out from the o/p of sudo smartctl -a /dev/sdb ,that i am using desktop hard disk ?
pascal hambourg
Probably from the device model "SAMSUNG HD252HJ". BTW, my Hitachi hard disk drive also makes a clicking sound when parking the heads at shutdown. I believe this is perfectly normal.
Aragorn
It is. Most hard disk models park the heads on the inner cylinder, but Hitachi disks park their heads on a ramp outside of the platter circumference. Yet, all modern hard disks not only park their heads in the sense of "moving them away from the readable/writable surface of the
platters" but they will also lock the heads in their parked position. As such, you would hear two sounds: one from the heads moving to their respective landing zone, and one from the heads being locked in place there.
Anton ertl
AFAIK that's no longer true. They used to do that several years ago, but nowadays the surfaces and the heads are so smooth that they would stick together if the heads landed on the surface, so now they are all doing this:
No comments:
Post a Comment