LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-03-2006, 09:10 PM   #1
allan_r
LQ Newbie
 
Registered: Sep 2006
Location: florida
Distribution: fedora
Posts: 16

Rep: Reputation: 0
Why won't hda spin down


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?
 
Old 10-04-2006, 08:58 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
 
Old 10-04-2006, 03:27 PM   #3
allan_r
LQ Newbie
 
Registered: Sep 2006
Location: florida
Distribution: fedora
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the reply. Here is a copy of what top displayed, I'm don't know what this all means, but init sem to be always running.

Tasks: 94 total, 2 running, 92 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.0% us, 15.2% sy, 0.0% ni, 79.8% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 483664k total, 470964k used, 12700k free, 51772k buffers
Swap: 983032k total, 0k used, 983032k free, 239564k cached

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
2070 root 15 0 84428 14m 4116 S 0.3 3.2 17:30.09 X
1 root 16 0 1988 664 572 S 0.0 0.1 0:00.67 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.18 events/0
5 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
8 root 10 -5 0 0 0 S 0.0 0.0 0:00.12 kblockd/0
9 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
78 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd
133 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
134 root 15 0 0 0 0 S 0.0 0.0 0:00.35 pdflush
136 root 18 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
135 root 15 0 0 0 0 S 0.0 0.0 0:00.28 kswapd0
223 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod
 
Old 10-04-2006, 03:44 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
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.
 
Old 10-04-2006, 05:54 PM   #5
allan_r
LQ Newbie
 
Registered: Sep 2006
Location: florida
Distribution: fedora
Posts: 16

Original Poster
Rep: Reputation: 0
I don't know what gam_server is. I logout root and ran top again and here it is.


Tasks: 88 total, 1 running, 87 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3% us, 0.0% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 483664k total, 474136k used, 9528k free, 20836k buffers
Swap: 983032k total, 0k used, 983032k free, 359648k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2074 root 15 0 74868 5992 3556 S 0.3 1.2 4:32.36 X
2803 root 16 0 2124 992 796 R 0.3 0.2 0:00.03 top
1 root 16 0 1984 664 572 S 0.0 0.1 0:00.66 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0
5 root 11 -5 0 0 0 S 0.0 0.0 0:00.01 khelper
6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
8 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 kblockd/0
9 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
78 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd
133 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
134 root 15 0 0 0 0 S 0.0 0.0 0:00.01 pdflush
136 root 18 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
135 root 15 0 0 0 0 S 0.0 0.0 0:00.01 kswapd0
223 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod
298 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused
 
Old 10-04-2006, 06:45 PM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.

gam_server is for GNOME.
 
Old 10-04-2006, 11:41 PM   #7
allan_r
LQ Newbie
 
Registered: Sep 2006
Location: florida
Distribution: fedora
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 10-05-2006, 02:31 AM   #8
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 10-05-2006, 11:35 AM   #9
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
Code:
ln -s /etc/init.d/hdparm /etc/init.d/rc3.d/S99hdparm
ln -s /etc/init.d/hdparm /etc/init.d/rc5.d/S99hdparm
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.
 
Old 10-05-2006, 05:59 PM   #10
allan_r
LQ Newbie
 
Registered: Sep 2006
Location: florida
Distribution: fedora
Posts: 16

Original Poster
Rep: Reputation: 0
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.

I'll try the script and let you know if it works.
 
Old 10-05-2006, 06:10 PM   #11
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
 
Old 10-05-2006, 11:17 PM   #12
allan_r
LQ Newbie
 
Registered: Sep 2006
Location: florida
Distribution: fedora
Posts: 16

Original Poster
Rep: Reputation: 0
Got a error when I executed that command:
[root@server ~]# /sbin/hdparm -B 64 -S 60 /dev/hda

/dev/hda:
setting Advanced Power Management level to 0x40 (64)
HDIO_DRIVE_CMD failed: Input/output error
setting standby to 60 (5 minutes)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
integrated hda audio modem bluetooth , (intel hda audio does not work) reggae linux Linux - Laptop and Netbook 1 07-05-2006 10:13 PM
integrated hda audio modem bluetooth , (intel hda audio does not work) reggae linux Linux - Laptop and Netbook 2 07-05-2006 03:38 PM
to spin down or not to spin down, that is the question maenho Linux - Software 2 02-05-2005 08:41 AM
hd spin down Henning_1 Linux - Hardware 2 09-24-2004 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration