modem/router also?
> Although i have set a time of 10 minutes in the webinterface (and
> submitted it) after spinup it usually takes a long time (up to 5-6
> hours) before disks spin down again.
Do you have packages installed? Which? see bellow
> So you would think something is
> using the disk, but if i force it to spindown with the webinterface,
> it will spindown immediately and remains spindown for quite sometime
> (can be for hours as well). So I see no reason why it does not
> spindown after the 10 minutes.
neither me, given what you said.
> Is it possible to create a more 'agressive' spindown policy? While i
> was still using the stock firmware, i never encountered these issues.
linux tried to alliviate those problems with the so called "laptop mode" -- to
avoid the constant spin/up down and head rectract on laptops disks.
Alt-F doesn't use that mode. But could.
All what Alt-F does is to inform the disk "spin down after N minutes of
*inactivity*" -- is the disk responsability to spindow. But if some process
keeps touching the disk, it will rearm the timeout.
That's why the "smart" daemon should have a disk verification period superior
than the disk spindow timeout -- otherwise "smart" whould constantly re-arm
the disk timeout.
Do you have smart running? See my log:
smartd[443]: Device: /dev/sdb, is in STANDBY mode, suspending checks
...
smartd[443]: Device: /dev/sdb, is back in ACTIVE or IDLE mode, resuming checks
(16 checks skipped)
There are some other disk powersave possibilities, but Alt-F doesn't use them.
Most of them try to save power by decreasing performance.
The tool the manages this is hdparm, the related options being
-B Set Advanced Power Management setting (1-255)
-C Check IDE power mode status
-S Set standby (spindown) timeout
-y Put IDE drive in standby mode
-Y Put IDE drive to sleep
-Z Disable Seagate auto-powersaving mode
Of those, Alt-F only uses -C to know the power status, -y to put it at sleep
using the "now" button in the web interface and -S at startup (or when Submit
is pressed) with the timeout value.
I'm afraid I can't do many more at the moment, except put the issue in my TODO
list, but need to have the output of
aufs.sh -l
top -bn1
ipkg list_installed
with a typical situation at hand!
But is difficult to diagnose problems like this remotely.
Experience varies with usage pattern. Have you read the related issue in the
web page?
You are using B5 (reloaded or flashed?) and, after Submiting the Spindown
timeout in disk->util, you have saved settings, right?
Just to be sure, please execute the following command:
# list flashed saved settings
loadsave_settings -ll
# misc configuration settings
cat /etc/misc.conf
in my system it gives:
NTPD_DAEMON=no
NTPD_BOOT=no
SMARTD_INTERVAL=30
HDSLEEP_LEFT=20
HDSLEEP_RIGHT=20
TUNE_DAYS=180
TUNE_MOUNTS=50
then try:
# set spindown to 10 minutes:
hdparm -S 120 /dev/sda
I did it and after 10 minutes the disk spins down.
I'm running nfs, samba, smart and cron (for ntp).
Use the following command to see what services are active:
# show status of all services
rcall status
thanks,
Joao
> I did the: hdparm -S 120 /dev/sda and thereafter disconnected the
> network cable,
> after 50 minutes the disk is still spinning.
You are not using the status web page, aren't you? It prevents disks from
spindow...
nor are you logged in and your current directory is on disk?
You can only try to pinpoint the problem, stopping all services, seeing if the
drive spins down, then start one at a time, to find the culprit.
Start by disabling all services at boot, (services->network/system) unckeck
boot enabled on all BUT NOT inetd, sysctrl and syslog, then save settings,
then reboot the box, and after powerup do not telnet/ssh it nor use its web
interface -- just watch and see if disks spin down. Wait a little more than
your current 10 minutes :)
I have no more clues for you, sorry.
B6 is about to be released, but disk spindown has not changed -- I think :-o
Thanks,
Joao
So, no advanced power management...
In one drive I have, I can see
...
Enabled Supported:
...
* Adv. Power Management feature set
and on that drive I can use the -B option bellow.
On another drive I don't see the "Adv. Power Management feature set", and I
can't use the -B option, I get the same error as you.
So, it seems that you are no going to be able to use it.
Timeout spindow works on my both drives. That is another difference, between
my two current drives and your's, under "Capabilities:"
mines:
Standby timer values: spec'd by standard, no device specific minimum
Standby timer values: spec'd by standard, with device specific minimum
yours:
Standby timer values: spec'd by standard, with device specific
I can't fully understand the wording consequences. Does that means that your
drive has a fixed "Standby timer values"? Not settable?
This issue seems to be drive specific, not Alt-F specific.
I don't know... looks like it's a "trade secret", as DLink didn't disclosure
the sources :-o
Probably one of their daemons look at disk statistics under /proc and
spinsdown the disks when it is appropriate.
There are several other techniques to do this, and also to avoid or delay
spinning up the disks, they were developed to conserve battery power on
laptops.
Who knows what will Alt-F do? It all depends on user reports.
In case you still have Alt-F, try the attached script.
Copy it to, e.g. /tmp (not to disk) and execute it; it logs results in the
system log.
It uses a very simple and rude strategy: it watches the number of reads and
writes from/to the disk and if they did not change in a given period of time,
it will spin down the disk.
You might want to edit on the top the number of minutes for the timeout.
Alt-F also has a faster service then DLink ;-)
...
> How can i run the script automatically?
For now, manually is the only option.
I will setup a package for that, I will put it in my TODO2 list (done!)
Meanwhile, use the attached improved script, with docs included.