Some laptop hard drives have very aggressive power saving measures programmed into them. As a result, Windows ignores these settings and overwrites it with its own. On Ubuntu though, when you’re in Laptop Mode, the default settings are used unless you actually set it to not park the drive heads, and then there’s the possibility you’ll get a couple of bad sectors if you drop your laptop. Of course, if you’re capable of being careful of your things then you don’t have to worry about dropping your laptop. If your hard-drive is S.M.A.R.T capable then you can use monitoring tools to get the data you need, stored in Load_Cycle_Count. First you have to install smartmontools:
sudo apt-get install smartmontools or select it from Synaptic using the administrator.
Now, check if you have SMART enabled.
sudo smartctl -d ata -i /dev/sda
The output will tell you quite clearly if you have SMART enabled and the model of your drive. Mine, for instance, is:
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: FUJITSU MHW2100BH
Serial Number: NZ1CT732784D
Firmware Version: 8918
User Capacity: 100,030,242,816 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 4a
Local Time is: Wed Nov 7 20:35:38 2007 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
If support is Available, but not Enabled, you may have to wade into your BIOS to change things.
Anyway, then you check your drive health. You can grep for 193 to get Load_Cycle_Count
sudo smartctl -d ata -A /dev/sda
This will give you a list of stuff like this.
Most drive manufacturers say that their drives can handle 600,000 cycles. My Fujitsu MHW2100BH is one of those drives. Considering I’ve had this laptop for atleast 4 months (I can’t remember how long exactly) , 19172 load cycles means I have (600,000 / 19172) × 4 months of stable use left, that’s around 10 years. Works for me :)
And just to see how fast this is increasing, I have a loop running on a terminal that checks the value every 5 minutes (This dude’s idea) and for the past hour it hasn’t changed. That’s made me rather happy. Here’s the loop I use:
while(true); do smartctl -d ata -A /dev/sda | grep 193 >> smart.log; sleep 300; done Naturally, you have to be root. I think the sudo will time out after 15 minutes anyway, that’s why I didn’t use it.