PDA

View Full Version : [ubuntu] 8.10 and Hard Disk stopping


whonot
November 23rd, 2008, 09:08 AM
Hi,

have been using Ubuntu Hardy Heron for a few months installed inside WinXP on my old computer. Here I had already the problem that it didn't stop my external hard drive correctly when selecting unmount. I searched the Internet back then and found some sites saying it's a known issue.

I now have Intrepid Ibex installed on a new computer on separate partitions and it still has the same problem with the external HDD, but on top of that it now does the same thing with the internal one, so that every time I shutdown Ubuntu the HDD is still running when the power supply is turned off and makes an awful noise. Well, I don't have much knowledge about all this stuff, but I just can't believe this won't effect my HDD performance/life-time negatively.

I would appreciate, if anybody could tell me where the reasons for this might be and if there is a way to avoid this. I read somewhere that for the external hard drive you can use specific commands to use as a workaround, couldn't find them anymore though. And what about the internal one being properly stopped on shutdown ? Could it also be due to something completely unrelated to Ubuntu ? Hadn't had the problem with WinVista early on, yet haven't tested it since !

Thanks!

ps : I have Ubuntu 8.10 64bit version.

nixscripter
November 23rd, 2008, 08:51 PM
I've had the same problem, and solved it with a small hack to /etc/rc0.d/S90halt.

Put this at the bottom of the do_stop() function:


log_action_msg "Will now halt"
### Added to gently shutdown the hard disk
hdparm -f /dev/sda
sleep 1
hdparm -y /dev/sda
### End addition
sleep 1
halt -d -f -i $poweroff $hddown


Hope this helps.

whonot
November 25th, 2008, 08:34 AM
Thanks !

Seems the power is now cut off after the HD stops.
I'm still not sure though, whether it stops correctly, as it does way more noise than the 5 year old HD I had before.
Might actually just be the HD itself, cause now I heard the same after WinVista shutdown, weird is that I never noticed that before.

nixscripter
November 25th, 2008, 05:52 PM
Some HDs are just noisier than others, but usally a "pop" sound when they are powered down means they were ready to read or write when they had to suddenly pull the head back. I've been told that, at least for my laptop, not retracting disk heads can "shortening your disk's life by 30 times" -- supposedly.

Either way, the fact is that some hardware is dumb enough not to spin down the disk before it powers off. I'm glad I could help.