Unix Technical Forum

Stopping Hard Drive From Spinning

This is a discussion on Stopping Hard Drive From Spinning within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hello, I wish to keep my laptop up and running 24 hours a day without wearing out the hard ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 06:20 PM
websiterepairguy@gmail.com
 
Posts: n/a
Default Stopping Hard Drive From Spinning

Hello,

I wish to keep my laptop up and running 24 hours a
day without wearing out the hard drive. How do I do
this?

Why do I care? Because I use my laptop as a personal
organizer. I keep phone numbers and other personal
information there.

I like to keep my laptop up and running 24 hours a day so
that it is always available for making brief notes in my
journal and other activities.

I only need 2 programs to do this:

vim

sc

In the past, I've done the same thing with a Toshiba Satellite 110CT
that I purchased on Ebay in May of 2001.

With my old laptop, I succeeded in stopping the hard drive
from spinning 24 hours a day by running my laptop in single
user mode all the time. Does this still work?

I assume that this worked on my old laptop because single user
mode does not seem to run the sync daemon. Is this still true?

I don't think so. I think something has changed for Slackware 9.0
because I see the bdflush daemon when I run the following command:

ps -e

There was no bdflush on my old laptop as far as I know. At least,
not in single user mode.

Does bdflush hit the hard drive every once in a while? I would think
so.

Yet, single user mode seems to be working. The hard drive seems to
be shutting off after one minute. This is exactly what I've asked it
to do in the setup menu at boot time.

The bdflush program does not seem to be hitting the hard drive if
I'm not typing at the keyboard. Is there a way to check to see whether
or not this is true?

Here's my configuration for a laptop I purchased on Ebay in
July of 2006:

Slackware 9.0

Toshiba 2595CDT Notebook computer
20 gig hard drive
400 mhz celeron
128MB RAM

In the past, I avoided losing data during power
outages by running vim from a script called "vim"
that looks like this:

********** Start Script ********
/usr/bin/vim $*
sync
*********** End Script *********

Likewise for sc:

*********** Start Script ********
/usr/bin/sc $*
sync
*********** End Script *********

Here's the linux version on my old
laptop purchased in May of 2001:

Linux 2.2.16

Here's the version information for
my new laptop purchased in July of
2006. This is the laptop running
Slackware 9.0:

Linux 2.4.20

The only reason I'm running Slackware
9.0 is because I happen to have a copy.
Also, I figure it will fit into this old laptop
without bumping up against the lack of
RAM.

So, does bdflush hit the hard drive or not?
That's my question. Specifically, will it
hit the hard drive after I've exited vim with
the above script by the same name that
does a sync operation last thing?

I don't know of anything that would cause
it to hit the hard drive when idle in single
user mode but I'm very ignorant of such things.
I simply don't know.

Thanks in advance to anyone kind and
thoughtful enough to answer.

Please don't hesitate to ask for more
information if needed.

Here's what ps -el looks like in single
user mode. Is there anything listed here
that is going to hit the hard drive periodically?

$ ps -el
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME
CMD
4 S 0 1 0 0 69 0 - 123 select ?
00:00:04 init
1 S 0 2 1 0 69 0 - 0 contex ?
00:00:00 keventd
1 S 0 3 1 0 79 19 - 0 ksofti ?
00:00:00 ksoftirqd_CPU0
1 S 0 4 1 0 69 0 - 0 kswapd ?
00:00:00 kswapd
1 S 0 5 1 0 69 0 - 0 bdflus ?
00:00:00 bdflush
1 S 0 6 1 0 69 0 - 0 kupdat ?
00:00:00 kupdated
1 S 0 10 1 0 59 -20 - 0 md_thr ?
00:00:00 mdrecoveryd
1 S 0 11 1 0 69 0 - 0 reiser ?
00:00:00 kreiserfsd
0 S 0 74 1 0 69 0 - 339 read_c tty2
00:00:00 agetty
0 S 0 75 1 0 69 0 - 339 read_c tty3
00:00:00 agetty
0 S 0 76 1 0 69 0 - 339 read_c tty4
00:00:00 agetty
0 S 0 77 1 0 69 0 - 339 read_c tty5
00:00:00 agetty
0 S 0 78 1 0 69 0 - 339 read_c tty6
00:00:00 agetty
4 S 1000 1092 1 0 69 0 - 591 wait4 tty1 00:00:00
bash
0 R 1000 1221 1092 0 76 0 - 858 - tty1 00:00:00 ps

Kind regards,

Ed

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 06:21 PM
michales
 
Posts: n/a
Default Re: Stopping Hard Drive From Spinning

websiterepairguy@gmail.com wrote:
> Hello,
>
> I wish to keep my laptop up and running 24 hours a
> day without wearing out the hard drive. How do I do
> this?


I am happy with this in /etc/rc.d/rc.local

hdparm -S6 /dev/hda
mount with option commit=600 (10 minutes!) Only with this dirty buffers stopped to annoying me
^^^ I don't know if it's dangerous ...

So, I think every 10 minutes your drive will spin. Maybe you want to experiment with those variables:

echo 1 > /proc/sys/vm/laptop_mode
echo 1 > /proc/sys/vm/drop_caches
echo 6000 > /proc/sys/vm/dirty_expire_centisecs

I din't understood if they do something good or... bad.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 06:21 PM
Eugene Nine
 
Posts: n/a
Default Re: Stopping Hard Drive From Spinning

websiterepairguy@gmail.com wrote:

> Hello,
>
> I wish to keep my laptop up and running 24 hours a
> day without wearing out the hard drive. How do I do
> this?
>
> Why do I care? Because I use my laptop as a personal
> organizer. I keep phone numbers and other personal
> information there.
>
> I like to keep my laptop up and running 24 hours a day so
> that it is always available for making brief notes in my
> journal and other activities.
>
> Kind regards,
>
> Ed


I know its not what you asked buy I've used my lapopts as organizers for
years and never shut off the drives with no problems. The MTBF listed for
drives works our to be about 3 years and I tend to upgrade to a larger one
sooner than that but the old one goes into use somewhere else. I currently
have a 120G in my laptop, a 60G that I had it in before, a couple 20G's
from laptops before that and a 3G from a laptop from 1998 that the ide
controller on the system board died, all have seen constant use and still
see use.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 06:21 PM
Jens
 
Posts: n/a
Default Re: Stopping Hard Drive From Spinning

websiterepairguy@gmail.com wrote:
> Hello,
>
> I wish to keep my laptop up and running 24 hours a
> day without wearing out the hard drive. How do I do
> this?
>


[...]

>
> I assume that this worked on my old laptop because single user
> mode does not seem to run the sync daemon. Is this still true?
>
> I don't think so. I think something has changed for Slackware 9.0
> because I see the bdflush daemon when I run the following command:
>
> ps -e
>
> There was no bdflush on my old laptop as far as I know. At least,
> not in single user mode.
>
> Does bdflush hit the hard drive every once in a while? I would think
> so.


I don't know about bdflush and the sync daemon. For my small server
running slackware 10.1 I set up hard drive spin down by running

/usr/sbin/hdparm -S 120 /dev/hda

at boot time and mounting all partitions with the noatime option. The
most frequent cron jobs are run once a day, syslogd is started with
option -m 0. I think this is all I did. At no activity from outside
the daily cron job is the only process that wakes up my server's
hard disk. I'm using multi user mode.

Jens
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 06:21 PM
Jerry Peters
 
Posts: n/a
Default Re: Stopping Hard Drive From Spinning

websiterepairguy@gmail.com wrote:
> Hello,
>
> I wish to keep my laptop up and running 24 hours a
> day without wearing out the hard drive. How do I do
> this?
>
> Why do I care? Because I use my laptop as a personal
> organizer. I keep phone numbers and other personal
> information there.
>
> I like to keep my laptop up and running 24 hours a day so
> that it is always available for making brief notes in my
> journal and other activities.


Google for "laptop mode". It's usually used to save power in battery
mode but should do exactly what you need.

Jerry
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 06:22 PM
Yeti
 
Posts: n/a
Default Re: Stopping Hard Drive From Spinning

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

websiterepairguy@gmail.com wrote:

> I wish to keep my laptop up and running 24 hours a
> day without wearing out the hard drive. How do I do
> this?


You may try the noflushd daemon <http://noflushd.sourceforge.net/>.

HTH,
Yeti
- --
This message is best viewed with open eyes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEuzQ1knQnYFXk9woRAqaZAJ9AI1Vkvf9I+rFUAUJwR8 SKggEVCACeOhuf
damq/bhvm9jXqv66AB0juko=
=itr4
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com