Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I setup a file server at home running fc5 with two hard drives (hda and hdb). The 2nd drive (hdb) spins down ok using the hdparm command but hda won't. I also notice that the hard drive activity LED flash every 3-4 sec., could this be the problem and if it is how can i stop this activity?
I think you're right that the disk drive activity is preventing hda from spinning down. You can use the top utility to see what is running when the disk activity light turns on. The top utility runs in a terminal. If you are using a GUI then open a terminal window such as Konsole or Gnome Terminal. Then just type the word top and press the enter key.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2831 root 15 0 2700 1412 916 S 18.5 0.3 1:12.46 gam_server
2874 root 15 0 178m 50m 16m S 1.0 10.7 4:09.07 firefox-bin
This display is saying that a program called gam_server and a program called firefox-bin are the highest CPU users at the time that top was running. We know that firefox-bin is the Firefox web browser. I don't know what gam_server is.
It looks like you are running Firefox when you are logged on as root. That is a bad idea.
The display makes me wonder what the gam_server program is. It is certainly busy. Firefox is also busy. Do you have Firefox set to automatically look for updates to extensions and themes? Maybe Firefox is running some streaming Flash stuff.
The init process is the master of all processes. It is the first process that is created when the kernel loads and it is the last process to be killed when the computer is shut down.
Last edited by stress_junkie; 10-04-2006 at 03:49 PM.
First, why are you spinning the hard drives down. This reduces the lifespan of the hard drives. It is better to have the hard drives working at 100% (on) or at 0% (off).
syslogd, crond, and many other services needs to be stopped before going into standby mode. I only recommend putting your system in standby mode if it is a notebook computer.
The drive is been used in a file server at home which will not get a lot of use at time. So having it down for most of the day would add less wear to it.
I do not know why you think that turning off a hard drive when you are not accessing it will make it last longer. It is better for any hard drive to stay on all the time and with out power management. Turning the hard drive on and off and on puts a lot of stress on the motor and voice coil. If you want to save power, use 2.5 inch hard drives.
Unlike Electro, I think that if you keep your computer on 24/7 it makes sense to spin down the hard disks when they haven't been used for a while to save electricity. I agree with Electro that good hard disks can generally run for years so I wouldn't worry about the disks wearing out. I just added a script to my system startup to make them spin down after twenty minutes of inactivity.
Code:
#!/bin/bash
# This program will set the advanced power management and spin down time for
# the hard disks.
# -B is the advanced power management switch. Value of 255 disables apm.
# -S is the spin down time. Value of 240 spins down the drive after 20 minutes
# of inactivity. Longer timeout values are available.
/sbin/hdparm -B 64 -S 240 /dev/hda
/sbin/hdparm -B 64 -S 240 /dev/hdb
/sbin/hdparm -B 64 -S 240 /dev/hdd
Then I created links to this file in the rc3.d and rc5.d directories.
That still doesn't answer why hda isn't spinning down. Electro identified the gam_server process. We know that a disk won't spin down if it is being accessed so that must be the short answer to your question.
Last edited by stress_junkie; 10-05-2006 at 11:50 AM.
I keep the system on 24/7 for over 2 yrs and the drive that was on there you can now hear it from 50 ft when it spins up. I don't eant it to happen to the one i'm running now.
Keep in mind that if you have a lot of system logging going on for such things as firewall messages then the disk will never spin down. My computer is behind a Linksys router so I get almost no firewall messages. My system log has a lot of timestamps from the system logger because nothing pertinent was logged for an hour.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.