LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   hard drive clunk when shutting down (https://www.linuxquestions.org/questions/mandriva-30/hard-drive-clunk-when-shutting-down-562209/)

kno712 06-16-2007 05:21 AM

hard drive clunk when shutting down
 
After happily trying ubuntu for some time, I've decided to give a try to some other distro. Mandriva (kde version) looks very good, but I'm having a problem that stops me using it: when I shut down, the drive emits a sort of "bark" when the power turns off, which I can only assume comes from not being shut down previously.

I had the same problem in ubuntu, but I manage to solve it (this thread
https://launchpad.net/ubuntu/+source....17/+bug/67810 )

my concerns are:
- can it lead to problems regarding hardware lifetime ?
- is there a way to get a smoother shutdown process ?
- anyone noticed similar behaviour ?

Thanks a lot

jschiwal 06-16-2007 07:44 AM

What is your kernel version? I guess that since 2.6.20, pata drives are treated in the kernel as scsi drives. That may be at the heart of the problem.

kno712 06-16-2007 08:47 AM

Hi, jschiwal, thanks for your help


It is 2.6.17. My laptop is a Toshiba, with a SATA drive.

jschiwal 06-16-2007 04:48 PM

Then the sata drivers would be used in any case. Could it some sort of thrashing to various parts of the drive as the disk caches are being emptied out?

It might be instructive looking at the diskparm settings for the drive. As an experiment, try A) running "sync; sync" and B) sudo /sbin/hdparm -f </dev/sd#> before rebooting. The first one will empty the Linux hard disk caches. The second will empty the on drive cache. Do you still hear that sound when shutting down? If so, my guess is probably wrong.

Also look at the output of "sudo /sbin/hdparm -I /dev/<sd#>". Does anything stand out as being wrong. For example, if the current settings are far off from the supported settings, like using udma0 when udma5 is supported.

Is there a package you can install so that you can monitor S.M.A.R.T. messages? Or if smart support is enabled, do you see any problems reading /var/log/messages?

A drive making clicking noise could be an indication that the drive is going bad. You might consider purchasing a commercial program such as GRC's SpinRite. If the drive is going bad, it may be trying to park at a location that it can't find, or relocating an excessive number of blocks before shutting down.

kno712 06-16-2007 06:57 PM

Thanks a lot for your help. I really want Mandriva to give a try.

The laptop is new (only 6 months); of course it still could be a faulty drive, but I manage to solve it in Ubuntu, following the instructions that I found here so I think it is more likely to be a linux problem (windows has a gently shutdown as well)

I tried to apply the same solution in Mandriva, but they did not work.

The instructions in the above link are as follows:

write a file at "/etc/rc0.d/S00hdd-shutdown-workaround" which includes this two lines:

#!/bin/sh
echo 1 > /sys/class/scsi_disk/0\:0\:0\:0/stop_on_shutdown

then make it executable ("chmod +x filename")

jschiwal 06-17-2007 02:29 AM

Look in:
ls /sys/class/scsi_disk/0\:0\:0\:0/
and see if stop_on_shutdown exists. Your kernel may not have the patch.

http://www.nabble.com/-PATCH--sd:-im...-t3040866.html

kno712 06-25-2007 01:59 PM

hi, there. I've been on holidays for the last week. I'll check if stop_on_shutdown exists... and if not, how can find a solution? will a kernel upgrade solve the problem? how can I upgrade the kernel?


All times are GMT -5. The time now is 06:02 AM.