Spindown troubles

I have one of those 10,000 rpm cheetah hard drives in a machine that I’m desperately trying to quiet down. I installed spindown so that it would turn the drive off after being idle for a 6 minutes as the machine is not going to be used a lot.

The problem is that spindown doesn’t seem to be doing anything at all. The spindown daemon is running. Furthermore, if I run the command sg_start --stop /dev/sda, the drive shuts down for a maximum of 8 seconds and then starts back up again. I am wondering if something is using the drive in the background or if I’m just missing a parameter somewhere.

rpm -q spindown
spindown-0.2.1-0.pm.1

/etc/spindown.conf
[General]
cycle-time = 60 # Number of seconds between cycles.

idle-time = 360 # The time in seconds a disk has to be idle before it is spundown.
# Do not use a value that is to small (less than 3600) unless you
# know what you are doing.

syslog = 1 # Turn this on if you want spindown to log messages using syslog.
# You will not want to turn this on if you are trying to spindown
# the disk with the root filesystem on.

Add as much disks as you want.

The following parameters are allowed: id, name, spindown and command.

- id:

You can find the id by doing “ls -l /dev/disk/by-id/”, the advantage of using

id over name is that you can swap disks while the daemon is running and it

doesn’t matter that the device name changes.

- name:

The name can be given up like this: sda, sdb, hda, hdc, …

- spindown:

This is a boolean value, put it on 1 if you want spindown to spindown the disk

or put it on 0 of you want spindown to leave it untouched. The default is 0.

- command:

The parameter to use to spindown the disk using sg_start. The default is “–stop”.

The device name will be automatically added behind this value.

- idle-time:

The time in seconds this disk has to be idle before it is spundown. This overrides

the idle-time configuration in the General section.

Only name or id are needed, but not both.

Examples:

[Disk 0]

id = ata-Hitachi_HTS54161-SB2404SJHD07JE

spindown = 1

[Disk 1]
name = sda
spindown = 1
command = --stop

Thanks a lot.
Mike

On 2008-08-02, mikepunt <mikepunt@no-mx.forums.opensuse.org> wrote:
>
> I have one of those 10,000 rpm cheetah hard drives in a machine that I’m
> desperately trying to quiet down. I installed spindown so that it would
> turn the drive off after being idle for a 6 minutes as the machine is
> not going to be used a lot.

I just use hdparm to do that, very easy. You disk seems to be ATA, so that
should ‘just work’ (c).

6 minutes seems very short time to do anything usefull, but you know your
needs better then me.

This should work:
hdparm -S 72 /dev/sda

> The problem is that spindown doesn’t seem to be doing anything at all.
> The spindown daemon is running. Furthermore, if I run the command
> sg_start --stop /dev/sda, the drive shuts down for a maximum of 8
> seconds and then starts back up again. I am wondering if something is
> using the drive in the background or if I’m just missing a parameter
> somewhere.
Well, if it’s your main drive… Things keep comming alive, all right. Never
had much luck spinnign down the / drive. Had more luck with the second
drive, containing only data and /var/spool/news.

Lately, I’ve been meaning to look into the documents I’ve heard about, that
describe how to reduce the use of the HD (in laptops). If that drive
contains you sustem, you should perhaps look into those, too.


The sand remembers once there was beach and sunshine
but chip is warm too
– haiku from Effector Online, Volume 1, Number 6

I’ll look into how to reduce hd usage. Thanks a lot. What’s the difference between sg_start and the command you gave me?

On 2008-08-03, mikepunt <mikepunt@no-mx.forums.opensuse.org> wrote:

> I’ll look into how to reduce hd usage. Thanks a lot. What’s the
> difference between sg_start and the command you gave me?

hdparm is part of Linux (every distro/release I’ve seen), the other isn’t.

Can’t give you a better answer, I didn’t know the other one.


The sand remembers once there was beach and sunshine
but chip is warm too
– haiku from Effector Online, Volume 1, Number 6