disk spin up and spindown

1,872 views
Skip to first unread message

knireis

unread,
Dec 14, 2010, 2:42:12 PM12/14/10
to Alt-F
In the log i see the disk spin up sometimes with no apparent reason.
No cron job running, no other computer is on in the network.
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. 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.

Is it possible to create a more 'agressive' spindown policy? While i
was still using the stock firmware, i never encountered these issues.

Joao Cardoso

unread,
Dec 14, 2010, 11:57:59 PM12/14/10
to al...@googlegroups.com
On Tuesday, December 14, 2010 19:42:12 knireis wrote:
> In the log i see the disk spin up sometimes with no apparent reason.
> No cron job running, no other computer is on in the network.

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?

knireis

unread,
Dec 15, 2010, 4:21:29 AM12/15/10
to Alt-F


On 15 dec, 05:57, Joao Cardoso <whoami.jc...@gmail.com> wrote:
> On Tuesday, December 14, 2010 19:42:12 knireis wrote:
> > In the log i see the disk spin up sometimes with no apparent reason.
> > No cron job running, no other computer is on in the network.
>
> modem/router also?
The modem/router is stil active. I will try with the network cable
disconnected from the nas.

>
> > 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
I have no packages installed, i created 1 user, but same things happen
without a user setup.
In a previous post you mentioned swap, i don't know if it is setup, i
formatted the drive in ext4 as 1 big partition with the wizard on the
alt-f webinterface.

>
> > 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:
No it is not, only cron is running (i think because of the ntpd to run
at 6.00 o'clock) and smb, ntp, inet, sysctrl, syslog

>
> 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
>but need to have the output of
>
> aufs.sh -l
aufs on / type aufs (rw,relatime,si=4016d691)
/rootmnt/root=rw
/rootmnt/rootsq=rr list

> top -bn1
Mem: 50976K used, 11060K free, 0K shrd, 14116K buff, 16592K cached
CPU: 0% usr 9% sys 0% nic 90% idle 0% io 0% irq 0% sirq
Load average: 0.02 0.04 0.00 1/40 3898
PID PPID USER STAT VSZ %MEM %CPU COMMAND
3898 3889 root R 1168 2% 9% top -bn1
2907 1 root S 7924 13% 0% smbd -D
2923 2907 root S 7848 13% 0% smbd -D
2905 1 root S 6220 10% 0% nmbd -D
3792 1 root S 1196 2% 0% syslogd -C -D -m 0
3666 1 root S 1184 2% 0% crond
3889 3888 root S 1184 2% 0% -sh
457 1 root S 1180 2% 0% /bin/sh --
1 0 root S 1176 2% 0% init
370 1 root S 1176 2% 0% inetd
3794 1 root S 1164 2% 0% klogd
3888 370 root S 1120 2% 0% dropbear -i
355 1 root S 580 1% 0% sysctrl
4 2 root SW 0 0% 0% [events/0]
3 2 root SW 0 0% 0% [ksoftirqd/0]
11 2 root SW 0 0% 0% [ata_sff/0]
8 2 root SW 0 0% 0% [bdi-default]
15 2 root SW 0 0% 0% [aufsd_pre/0]
7 2 root SW 0 0% 0% [sync_supers]
27 2 root SW 0 0% 0% [mtdblock0]
13 2 root SW 0 0% 0% [kswapd0]
9 2 root SW 0 0% 0% [kblockd/0]
31 2 root SW 0 0% 0% [mtdblock4]
29 2 root SW 0 0% 0% [mtdblock2]
30 2 root SW 0 0% 0% [mtdblock3]
52 2 root SW< 0 0% 0% [loop0]
147 2 root SW 0 0% 0% [jbd2/sda2-8]
14 2 root SW 0 0% 0% [aufsd/0]
28 2 root SW 0 0% 0% [mtdblock1]
12 2 root SW 0 0% 0% [khubd]
19 2 root SW 0 0% 0% [scsi_eh_0]
2 0 root SW 0 0% 0% [kthreadd]
6 2 root SW 0 0% 0% [async/mgr]
16 2 root SW 0 0% 0% [crypto/0]
5 2 root SW 0 0% 0% [khelper]
10 2 root SW 0 0% 0% [ata_aux]
34 2 root SW 0 0% 0% [usbhid_resumer]
392 2 root SW 0 0% 0% [rpciod/0]
20 2 root SW 0 0% 0% [scsi_eh_1]
148 2 root SW 0 0% 0% [ext4-dio-unwrit]

> ipkg list_installed
# ipkg list_installed
This is a frontend to ipkg.
ipkg is not installed, install using the web interface,
or using "ipkg -install [<mount_point>]"


>
> with a typical situation at hand!
Drive is spinning but should have spun down in my opinion.

> But is difficult to diagnose problems like this remotely.
> Experience varies with usage pattern. Have you read the related issue in the
> web page?
Yes i did, i just wondered why with alt-f the disk is hard to spin
down and with the stock firmware drives spindown almost exactly after
the 10 minutes idle. Could it be the ext4 in stead of the ext2 i used
with the stock firmware?

knireis

unread,
Dec 15, 2010, 6:25:59 AM12/15/10
to Alt-F
I pulled the network cable while the disk was spinning, after more
than a hour, it was still spinning. Then i rebooted the nas without
the network cable attached, after 1 hour it is still spinning, so
either the 10 minute setting does not work, or there is some internal
process which accesses the drive. But this last option does conflict
with the fact that when i force it into spindown via the webinterface
it stays in spindown.
One more experiment, i will force it into spindown with the
webinterface and then pull the network cable. I'll let you know.

knireis

unread,
Dec 15, 2010, 9:26:47 AM12/15/10
to Alt-F


On 15 dec, 12:25, knireis <mail...@jsierink.nl> wrote:

> One more experiment, i will force it into spindown with the
> webinterface and then pull the network cable. I'll let you know.

Well 3 hours later, no spinup
So it looks like alt-f does not (or with difficulty) put the disk to
sleep (not good).
But when the disk is in sleep alt-f does not wake it up (unless the
disk is accessed of course) (that is good)

Joao Cardoso

unread,
Dec 15, 2010, 11:36:06 AM12/15/10
to al...@googlegroups.com

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

knireis

unread,
Dec 15, 2010, 2:43:07 PM12/15/10
to Alt-F


On 15 dec, 17:36, Joao Cardoso <whoami.jc...@gmail.com> wrote:
> On Wednesday, December 15, 2010 14:26:47 knireis wrote:
> > On 15 dec, 12:25, knireis <mail...@jsierink.nl> wrote:
> > > One more experiment, i will force it into spindown with the
> > > webinterface and then pull the network cable. I'll let you know.
>
> > Well 3 hours later, no spinup
> > So it looks like alt-f does not (or with difficulty) put the disk to
> > sleep (not good).
> > But when the disk is in sleep alt-f does not wake it up (unless the
> > disk is accessed of course) (that is good)
>
> You are using B5 (reloaded or flashed?) and, after Submiting the Spindown
> timeout in disk->util, you have saved settings, right?

I flashed B5 and saved the settings

>
> Just to be sure, please execute the following command:
>
> # list flashed saved settings
> loadsave_settings -ll
>
-rw-r--r-- 1 root root 5997 Dec 13 14:01
set_2010-12-13_14:01:38.tgz
-rw-r--r-- 1 root root 5993 Dec 13 15:31
set_2010-12-13_15:31:23.tgz
-rw-r--r-- 1 root root 6005 Dec 14 12:27
set_2010-12-14_12:27:11.tgz
-rw-r--r-- 1 root root 6012 Dec 15 12:27
set_2010-12-15_12:27:08.tgz

> # misc configuration settings
> cat /etc/misc.conf
HDSLEEP_LEFT=10
SMARTD_INTERVAL=900
NTPD_DAEMON=no
NTPD_BOOT=yes
HDSLEEP_RIGHT=10


> 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

# rcall status
Usage: /sbin/rcall {start|stop|restart}

> thanks,
> Joao

knireis

unread,
Dec 15, 2010, 3:31:24 PM12/15/10
to Alt-F
I did the: hdparm -S 120 /dev/sda and thereafter disconnected the
network cable,
after 50 minutes the disk is still spinning.

Joao Cardoso

unread,
Dec 16, 2010, 12:13:22 AM12/16/10
to al...@googlegroups.com
On Wednesday, December 15, 2010 20:31:24 knireis wrote:

> 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

knireis

unread,
Dec 16, 2010, 4:45:42 AM12/16/10
to Alt-F
Switched off all services, saved config, rebooted, disk does not spin
down within 1 hour. Disconnected network cable, same thing, no
spindown. However in the log i saw that the disk did spin down last
night but only after about 6 hours. So spindown does work eventually
sometimes, but for me that is not good enough. I guess I'll go back to
the stock firmware, which is a pity because then i have to avoid using
a 4k advanced format drive.
Maybe i'll wait till version B6 and see if it behaves different.

knireis

unread,
Dec 16, 2010, 7:40:40 AM12/16/10
to Alt-F

> Switched off all services, saved config, rebooted, disk does not spin
> down within 1 hour. Disconnected network cable, same thing, no
> spindown. However in the log i saw that the disk did spin down last
> night but only after about 6 hours. So spindown does work eventually
> sometimes, but for me that is not good enough. I guess I'll go back to
> the stock firmware, which is a pity because then i have to avoid using
> a 4k advanced format drive.
> Maybe i'll wait till version B6 and see if it behaves different.

After writing this, i forced the disk in spindown and now a couple of
hours later it is still in spindown. So i think the problem is not a
service which keeps accessing the disk or preventing it going into
spindown, but the system will not (or only after many hours) go in
spindown on it's own.

Joao Cardoso

unread,
Dec 16, 2010, 10:24:51 AM12/16/10
to Alt-F
> After writing this, i forced the disk in spindown and now a couple of
> hours later it is still in spindown. So i think the problem is not a
> service which keeps accessing the disk or preventing it going into
> spindown, but the system will not (or only after many hours) go in
> spindown on it's own.

Yes, we had already concluded that.

As I told previously, at powerup or hotplug the HDSLEEP_LEFT/RIGHT
values stored in the /etc/misc.conf file, that must be stored in
flash, will be applied to the disks using the "hdparm -S" command.

I think that it would be useful, for other users to know, to open a
specific topic related to disks that do not spindown.

Could you please post the output from the following commands, in order
to identify the disk?

hdparm -I /dev/sda # or sdb

smartctl -ic /dev/sda # or sdb

Thanks

PS-Still another try! I'm persistent! Please try the following command
and see if after your spin down timeout it spins-dow.

hdparm -B 127 /dev/sda # or sdb

According to the manual, -B does:
Set Advanced Power Management feature, if the drive supports it. A
low value
means aggressive power management and a high value means better
performance.
Possible settings range from values 1 through 127 (which permit spin-
down), and values
128 through 254 (which do not permit spin-down). The highest
degree of power man-
agement is attained with a setting of 1, and the highest I/O
performance with a
setting of 254. A value of 255 tells hdparm to disable Advanced
Power Management
altogether on the drive (not all drives support disabling it, but
most do).

knireis

unread,
Dec 16, 2010, 1:20:01 PM12/16/10
to Alt-F
> hdparm -I /dev/sda # or sdb

ATA device, with non-removable media
Model Number: WD1000FYPS-01ZKB0
Serial Number: WD-WCASJ1686695
Firmware Revision:
Standards:
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 1953525168
device size with M = 1024*1024: 953869 MBytes
device size with M = 1000*1000: 1000204 MBytes (1000 GB)
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by standard, with device specific
minimum
R/W multiple sector transfer: Max = 16 Current = 0
Recommended acoustic management value: 128, current value: 128
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5
*udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow
control=120ns
Commands/features:
Enabled Supported:
* NOP cmd
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT cmd
* Mandatory FLUSH CACHE cmd
* Device Configuration Overlay feature set
* 48-bit Address feature set
SET MAX security extension
* SET FEATURES subcommand required to spinup after power
up
Power-Up In Standby feature set
* DOWNLOAD MICROCODE cmd
* General Purpose Logging feature set
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
supported: enhanced erase
276min for SECURITY ERASE UNIT. 276min for ENHANCED SECURITY
ERASE UNIT.
Checksum: correct

> smartctl -ic /dev/sda # or sdb

smartctl version 5.38 [arm-unknown-linux-gnu] Copyright (C) 2002-8
Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model: WDC WD1000FYPS-01ZKB0
Serial Number: WD-WCASJ1686695
Firmware Version: 02.01B01
User Capacity: 1,000,204,886,016 bytes
Device is: Not in smartctl database [for details use: -P
showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Thu Dec 16 18:59:44 2010 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
General SMART Values:
Offline data collection status: (0x84) Offline data collection
activity
was suspended by an
interrupting command from host.
Auto Offline Data Collection:
Enabled.
Self-test execution status: ( 0) The previous self-test routine
completed
without error or no self-test
has ever
been run.
Total time to complete Offline
data collection: (27180) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline
immediate.
Auto Offline data collection
on/off support.
Suspend Offline collection
upon new
command.
Offline surface scan
supported.
Self-test supported.
Conveyance Self-test
supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before
entering
power-saving mode.
Supports SMART auto save
timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging
supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 255) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x303f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.

> Thanks

no thanks

> PS-Still another try! I'm persistent! Please try the following command
> and see if after your spin down timeout it spins-dow.
>
> hdparm -B 127 /dev/sda # or sdb

/dev/sda:
setting APM level to 0x7F (127)
hdparm: HDIO_DRIVE_CMD: Input/output error

It looks like i can not change it to 127, i think i have a utility
somewhere which allows me to set these settings on a disk in my
popcornhour mediaplayer. I'll to change it.

Joao Cardoso

unread,
Dec 16, 2010, 4:32:46 PM12/16/10
to al...@googlegroups.com
...

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.

knireis

unread,
Dec 17, 2010, 3:09:20 AM12/17/10
to Alt-F



> 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.

Remains the question why did spindown timer work on this harddisk with
the stock firmware. How does D-Link implement this feature?

Joao Cardoso

unread,
Dec 17, 2010, 12:32:51 PM12/17/10
to al...@googlegroups.com

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.

knireis

unread,
Dec 17, 2010, 12:51:29 PM12/17/10
to Alt-F


> Who knows what will Alt-F do? It all depends on user reports.

Well, maybe i'll try alt-f in the future, for now i switch back to
stock firmware.

Joao Cardoso

unread,
Dec 17, 2010, 1:27:06 PM12/17/10
to Alt-F
You should read this http://support.wdc.com/product/download.asp?groupid=609&sid=113
(I'm not endorsing it!) and do some other Google searches, e.g.

http://community.wdc.com/t5/Desktop/Green-Caviar-High-Load-Cycle-Cout-after-short-operation-time/td-p/15731

You can check your current LLC (Load Cycle Count) using smart.

For years I keep my computers on 24/7.

I start doing it when, at the office, after returning from holidays, I
heard the "clang of the dead" when I turned on the hp workstation I
used to work. As the backup tape unity was old, the rubber rollers
didn't work well and no backup restore was possible -- Murphy law
strikes again.

A few years late, at home, I heard the same noise from a high-end scsi
server disk -- just to find out that the power up/down cycle
specifications was *1000*.

Nowadays technology has evolved, particularly because of laptop disks
and power saving consciousness. But nevertheless read your disk tech
specifications. Spinning up/down a disk has consequences.

Hope I will find it here again,
Joao



Joao Cardoso

unread,
Dec 17, 2010, 5:14:27 PM12/17/10
to al...@googlegroups.com

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 ;-)

spindown.sh

knireis

unread,
Dec 18, 2010, 4:08:17 AM12/18/10
to Alt-F



> 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.

I copied the script to /tmp and executed it with sh /tmp/spindown.sh
I don't know if this is the correct procedure.
Any it works, it went into spindown after 11 minutes.
here is the log
Dec 18 09:16:24 DNS323 user.notice spindown: sda_timer=0 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:17:24 DNS323 user.notice spindown: sda_timer=1 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:18:24 DNS323 user.notice spindown: sda_timer=2 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:19:24 DNS323 user.notice spindown: sda_timer=3 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:20:24 DNS323 user.notice spindown: sda_timer=4 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:21:24 DNS323 user.notice spindown: sda_timer=5 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:22:24 DNS323 user.notice spindown: sda_timer=6 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:23:24 DNS323 user.notice spindown: sda_timer=7 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:24:24 DNS323 user.notice spindown: sda_timer=8 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:25:07 DNS323 daemon.info sysctrl: temp=30.2 fan=0
Dec 18 09:25:24 DNS323 user.notice spindown: sda_timer=9 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:26:24 DNS323 user.notice spindown: sda_timer=10 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:27:24 DNS323 user.notice spindown: Spinning down sda
Dec 18 09:27:25 DNS323 user.notice spindown: sda_timer=11 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:27:27 DNS323 daemon.info sysctrl: right disk (sda) standby
Dec 18 09:28:25 DNS323 user.notice spindown: sda_timer=12 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:29:25 DNS323 user.notice spindown: sda_timer=13 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:30:25 DNS323 user.notice spindown: sda_timer=14 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:31:25 DNS323 user.notice spindown: sda_timer=15 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:32:25 DNS323 user.notice spindown: sda_timer=16 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:33:25 DNS323 user.notice spindown: sda_timer=17 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:34:25 DNS323 user.notice spindown: sda_timer=18 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:35:25 DNS323 user.notice spindown: sda_timer=19 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:36:25 DNS323 user.notice spindown: sda_timer=20 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:37:26 DNS323 user.notice spindown: sda_timer=21 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:38:26 DNS323 user.notice spindown: sda_timer=22 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:39:26 DNS323 user.notice spindown: sda_timer=23 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:40:26 DNS323 user.notice spindown: sda_timer=24 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:41:26 DNS323 user.notice spindown: sda_timer=25 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:42:26 DNS323 user.notice spindown: sda_timer=26 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:43:26 DNS323 user.notice spindown: sda_timer=27 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:44:26 DNS323 user.notice spindown: sda_timer=28 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:45:26 DNS323 user.notice spindown: sda_timer=29 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:46:26 DNS323 user.notice spindown: sda_timer=30 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:47:26 DNS323 user.notice spindown: sda_timer=31 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:48:26 DNS323 user.notice spindown: sda_timer=32 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:49:26 DNS323 user.notice spindown: sda_timer=33 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:50:26 DNS323 user.notice spindown: sda_timer=34 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:51:26 DNS323 user.notice spindown: sda_timer=35 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:52:26 DNS323 user.notice spindown: sda_timer=36 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:53:26 DNS323 user.notice spindown: sda_timer=37 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:54:26 DNS323 user.notice spindown: sda_timer=38 sda_rw=186
sdb_timer= sdb_rw=
Dec 18 09:55:26 DNS323 user.notice spindown: sda_timer=39 sda_rw=186
sdb_timer= sdb_rw=

> 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 ;-)

you are indeed very helpful and fast with service, i think I can go
ahead with buying the wd20ears or samsung f4eg disk

How can i run the script automatically?

Joao Cardoso

unread,
Dec 18, 2010, 7:22:23 PM12/18/10
to al...@googlegroups.com
On Saturday, December 18, 2010 09:08:17 knireis wrote:
> > 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.
>
> I copied the script to /tmp and executed it with sh /tmp/spindown.sh
> I don't know if this is the correct procedure.
> Any it works, it went into spindown after 11 minutes.

...

> 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.

spindown.sh

knireis

unread,
Dec 19, 2010, 12:59:05 PM12/19/10
to Alt-F
> For now, manually is the only option.
> I will setup a package for that, I will put it in my TODO2 list (done!)
>
thanks,

> Meanwhile, use the attached improved script, with docs included.

the improved script works fine for me

Wladimir Razumov

unread,
May 29, 2017, 6:01:09 AM5/29/17
to Alt-F, mai...@jsierink.nl
Hi, guys!
I've pinpointed one of possible reasons: transmission daemon. While I used Alt-F only for smb backups, DNS-325-A2 v.1.02 spinned down both Seagate ST4000DM000 absolutely correctly in given timeout. It was spinning only while backup procedure. Then we decommissioned this box and I took it home. Then I set-up and started to use Transmission. The case is: night, all equipment, including router, powered down manually with powerswitch. DNS-325 is not in same outlet, and means to work everytime-it-needed. So, logic is: no internet, transmission must seek for some time and then give up, but it always spinning-up drives.
will now cron transmission daemon stopping and starting hours.

воскресенье, 19 декабря 2010 г., 19:59:05 UTC+2 пользователь knireis написал:
Reply all
Reply to author
Forward
0 new messages