You are not logged in.

#1 2007-06-26 14:32:09

tealson
Member
Registered: 2007-06-14
Posts: 54

putting the hd to a rest

Hello Forum,
the topic is kind of strange but in my opinion it describes best the "thing" i would like to accomplisch.
I would like to put the hd of my notebook to sleep mode with hdparm during normal "surf, mail and irc sessions". I have about 512mb ram, soon 1gb and I am running fluxbux or xfce4 and there is always about 250mb free memory available. Is it possible to write all changes to the filesystem in a 200mb Unionfs filesystem and as soon as this fs is fully allocated, wake up my hd,  write the whole stuff  on it, and send the hd to sleep mode again?

I am aware, that if a power failure accurse all changed data will be lost, but it's just a surf station, the loss of a few surf or irc logs are not that bad... smile
regards,
tealson

Offline

#2 2007-06-26 19:38:31

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: putting the hd to a rest

You should be able to have a unionfs as root fs, and use it to combine a real partition (in ro) and a tmpfs partition (in rw).

If you want a quick and dirty solution (and possibly even stupid - lets see if someone got any other idea first wink ), you could use a backgrounded bash/sh script to query 'df' in an interval of a few seconds to see the size used/left on the tmpfs. And if there is a high amount of data in the tmpfs, mount the real partition as rw on a secound place, move the files from the tmpfs to the rw mounted partition, umount the rw partition, and go back to sleep.

Unfortunately, I have no experience of hdparm (*embarrassed sad *), but since you will need to read data from you hd on unexpected periods of time (when you start a new program, for example), it should be possible to make it put the drive to sleep automatically (and wake it up), so the script wont need to bother about that either (to make it even more stupid tongue ).

Offline

#3 2007-07-19 14:16:35

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: putting the hd to a rest

Did you solve your problem?

If you still search for a simple solution, I've just heard about a tool called laptop-mode-tools (available in extra), which might be a better alternative.

Offline

Board footer

Powered by FluxBB