spindown HD in openSUSE 11.2

I’ve looked at a few ways to spindown my second HD but am having a hard time trying to keep it asleep. Something in the system seems to wake it up about every 15 minutes. In my 10.1 install, I was able to keep the drive asleep until I accessed it. In 11.2, I’m having problems. (Unfortunately I can’t remember how I had set it up in 10.1.)

I’ve tried the “spindown” package, which will spindown the drive, but it still wakes up 15 minutes later. I decided to go with a more simple method:

hdparm -S 120 /dev/sdb

in /etc/init.d/boot.local. This works, but still has the same wake up problem.

I’ve added “noatime” and “nodiratime” flags in /etc/fstab for the partitions, but that didn’t seem to help.

Any ideas? What’s the proper modern/11.2 method?

Thanks!

Vinh

After doing some more research, I found this sequence of commands to be run as super-user:

echo 1 > /proc/sys/vm/block_dump
while ( ! dmesg -c | grep sdb ); do sleep 1; done
echo 0 > /proc/sys/vm/block_dump

The first command dumps all disk access messages to /var/log/messages. The next command searches for accesses to sdb drive and prints them. The last command turns off the disk access logging. The main caveat is that this will write a ton of messages to /var/log/messages. I did these commands right after the drive woke up to see what processes were accessing the drive.

I found that a daemon, smartd, was accessing the drive sdb, so I looked that up. smartd is a service to test the reliability of the drives. Since my sdb drive doesn’t really support such a capability, I saw no need for it. I couldn’t figure out a way to disable smartd for sdb alone so I decided to disable smartd altogether.

From YaST, I selected System->System Services (Runlevel). I scrolled down to smartd and clicked on Disable. I accepted the change and that was it.

My drive has been quiet until I’ve accessed it.

i think this is just a wonderful thread (thanks for coming back and
filling us in) and i just wanna throw some words (tags?) into the
thread’s text so maybe more folks can find it with a forum/google search:

laptop power saving battery extending hard drive harddrive wake up
wake-up spin down spin-down sleep idle rest 11.2

i hope someday someone (since the community uses so much green ink)
will consolidate all of these tips into how to howto how-to :wink:

solved [SOLVED]


palladium

[QUOTE=palladium;2100359]i think this is just a wonderful thread (thanks for coming back and
filling us in) and i just wanna throw some words (tags?) into the
thread’s text so maybe more folks can find it with a forum/google search:

laptop power saving battery extending hard drive harddrive wake up
wake-up spin down spin-down sleep idle rest 11.2

/QUOTE]

Agree with the sentiment,but what makes you think it’s a laptop???

gminnerup wrote:
> Agree with the sentiment,but what makes you think it’s a laptop???

didn’t think it was (or was not)…but, have seen many laptop owners
here asking how to keep their hard drives asleep…


palladium

I appreciate the thanks. I think people who post questions should summarize what worked for them. During this “quest” I found many suggestions given and the original posters would just say “thanks” in the end and not specify which of the solutions worked for them. I personally like to “close out” my questions with a summary.


For people with laptops/netbooks, I think the power management software in openSUSE works quite nice, but I’ve actually never bothered to see if my netbook drive spins down while idle. (I know it does when I put the whole netbook to sleep though.)

In this particular situation, I was trying to put to sleep a drive on a desktop, where power management software doesn’t apply.

I’m still curious as to what is the proper/modern way to spin down a drive: hdparm, spindown, ???

linuxvinh wrote:
> In this particular situation, I was trying to put to sleep a drive on a
> desktop, where power management software doesn’t apply.

really? are you certain that power management software can ‘see’ if it
is installed on a laptop or a desktop tower and then refuse to work
depending on which it is??

i don’t think so! how would it know if the connected hard drive is in
a portable package or one of these:
https://infosecurity.us/images/first_google_server_farm.jpg


palladium

Power management very much applies to desktops. Mine “hibernates” (suspends to disk) a lot of the time, although “hibernation” seems an odd term to describe a means of stopping it from overheating in the Sydney summer…

How do I set power management software to only spindown a secondary drive while the rest of the system is in use?

Hi
Just upgraded my Laptop from Opensuse 12.1 to 12.1, for some reason my “hdparm -S 15 /dev/sda” setting did not work anymore. I “think” the upgrade activated the smartd service, after stopping it , my harddisk now spins down again.
MANY THANKS FOR THE TIP
Philippe

pfeifp wrote:
> linuxvinh;2100344 Wrote:
>> After doing some more research, I found this sequence of commands to be
>> run as super-user:
>>
>> echo 1 > /proc/sys/vm/block_dump
>> while ( ! dmesg -c | grep sdb ); do sleep 1; done
>> echo 0 > /proc/sys/vm/block_dump
>>
>> The first command dumps all disk access messages to /var/log/messages.
>> The next command searches for accesses to sdb drive and prints them. The
>> last command turns off the disk access logging. The main caveat is that
>> this will write a ton of messages to /var/log/messages. I did these
>> commands right after the drive woke up to see what processes were
>> accessing the drive.
>>
>> I found that a daemon, smartd, was accessing the drive sdb, so I looked
>> that up. smartd is a service to test the reliability of the drives.
>> Since my sdb drive doesn’t really support such a capability, I saw no
>> need for it. I couldn’t figure out a way to disable smartd for sdb alone
>> so I decided to disable smartd altogether.
>>
>> From YaST, I selected System->System Services (Runlevel). I scrolled
>> down to smartd and clicked on Disable. I accepted the change and that
>> was it.
>>
>> My drive has been quiet until I’ve accessed it.
>
>
> Hi
> Just upgraded my Laptop from Opensuse 12.1 to 12.1, for some reason my
> “hdparm -S 15 /dev/sda” setting did not work anymore. I “think” the
> upgrade activated the smartd service, after stopping it , my harddisk
> now spins down again.
> MANY THANKS FOR THE TIP
> Philippe

This is a very old thread!

But just before other people start to read it and get the idea that
disabling smartd is a good idea, please don’t do that!

smartd is a very useful tool and almost all disks do support it (in fact
if the thread weren’t so old, I’d be interested to know which one doesn’t).

You can configure smartd to run as often or as infrequently as you would
like, so there’s no reason for it to interfere with your disks spinning
down. Please man smartd.conf for details.