Anyone know where I could find some documentation explaining the -B option of hdparm
and it's implications regarding hard disk shock resistance and wear and tear? Or perhaps you have an explanation of your own? The man page is quite limited. =/
I recently noticed a clicking sound coming from my laptop's (Ubuntu 7.04) hard drive every few seconds. Google showed me I was far from being alone - seems tons of GNU/Linux users have encountered this problem. It also seems to be a pretty dangerous thing, as AFAICT it eats away at the hard disk's life. FWIW, it's a confirmed issue in Ubuntu's bug thing (I assume on other distros too):
showed me my Load_Cycle_Count
was through the roof. So I got worried about my drive dying a horrible early death and decided to work around the problem with what seems to be the most often recommended approach:
sudo hdparm -B 255 /dev/sda
The workaround worked fine - the clicking stopped (I also added the command to the startup sequence, etc). Granted, I can't change the past and whatever damage was done is done. I'm just happy I caught this sooner rather than later (the laptop is still relatively new).
win32sux@candystore:~$ sudo smartctl -a -d ata /dev/sda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: Hitachi HTS541680J9SA00
Serial Number: SBXXXXXXXXXXXXX
Firmware Version: SB2OC74P
User Capacity: 80,026,361,856 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 7
ATA Standard is: ATA/ATAPI-7 T13 1532D revision 1
Local Time is: Mon Oct 1 22:16:52 2007 EST
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: (0x85) Offline data collection activity
was aborted by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
Total time to complete Offline
data collection: ( 645) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
Offline surface scan supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
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: ( 44) 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 0x000b 100 100 062 Pre-fail Always - 0
2 Throughput_Performance 0x0004 100 100 000 Old_age Offline - 1351
3 Spin_Up_Time 0x0007 253 253 033 Pre-fail Always - 0
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 591
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000a 100 100 000 Old_age Always - 0
8 Seek_Time_Performance 0x0004 100 100 000 Old_age Offline - 0
9 Power_On_Hours 0x0012 099 099 000 Old_age Always - 704
10 Spin_Retry_Count 0x0012 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 591
191 G-Sense_Error_Rate 0x000a 100 100 000 Old_age Always - 65536
192 Power-Off_Retract_Count 0x0032 099 099 000 Old_age Always - 259
193 Load_Cycle_Count 0x0012 093 093 000 Old_age Always - 79353
194 Temperature_Celsius 0x0002 144 144 000 Old_age Always - 38 (Lifetime Min/Max 22/48)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 1
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 253 000 Old_age Always - 0
223 Load_Retry_Count 0x000a 100 100 000 Old_age Always - 0
225 Load_Cycle_Count 0x0012 093 093 000 Old_age Always - 79353
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 1 -
# 2 Short offline Completed without error 00% 0 -
SMART 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.
So here's my questions: From what I've read, the clicking problem is due to excessive amounts of "disk head parking" going on. From what I understand, disk head parking is a safety measure which prevents damage to the drive when it's dropped, etc. For some reason, however, there is insane amounts of it happening out-of-the-box on some GNU/Linux setups. So what does this have to do with the disk's APM? From "man hdparm":
-B Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means bet‐
ter performance. A value of 255 will disable apm on the drive.
Does this mean my drive was spinning down every few seconds? Or is the parking a separate thing which doesn't require spinning down? I actually thought that by not enabling "laptop mode" I wouldn't have any spin downs.
win32sux@candystore:~$ cat /proc/sys/vm/laptop_mode
I know that the 255 disables the APM feature, but I would like to know where can I find documentation about the other 254 possible settings? The man page's "aggressive" description doesn't say much. For example, if I would set 254, how exactly does that affect the drive? Is there a time calculation that needs to be done, as with other settings? I've tried googling for ATA power management specifications but didn't have any luck. Basically, I'm worried that by completely disabling this APM I have increased the risk of my disk being damaged if my laptop is dropped or something like that. Any light you can shed on this would be - as always - greatly appreciated.