Welcome! Log In Create A New Profile

Advanced

debian & spindown of ext hdd

Posted by tom 
tom
debian & spindown of ext hdd
August 30, 2010 12:34PM
hi,

got everything up & running on the dockstar with new debian install. now i was wondering how i can achieve an spindown of the external hdd. what do i need to install?

thx

ps: its a seagate freeagent
ecc
Re: debian & spindown of ext hdd
August 30, 2010 03:30PM
I haven't used any of these on my DockStar, but all of these packages contain utilities that should be able to spin down a SCSI disk (and therefore a USB drive):
scsitools
sdparm
sg3-tools
The Google turns up a few daemon-based approaches as well.
tom
Re: debian & spindown of ext hdd
August 31, 2010 03:38AM
sdparm did the trick. thx!!!
Re: debian & spindown of ext hdd
October 18, 2010 10:45PM
Can you tell me if I can use it to spin down external hdd after some idle time, say 15 minutes? If I can how? Thanks.
Signal9
Re: debian & spindown of ext hdd
November 20, 2010 12:18AM
I used hd-idle package from dev-eth0.de. Spin down after 30mins inactivity.

echo "deb http://www.dev-eth0.de/dockstar/ squeeze main" >> /etc/apt/sources.list
wget http://www.dev-eth0.de/dockstar/repo.key
apt-key add repo.key; apt-get install hd-idle
Re: debian & spindown of ext hdd
December 02, 2010 06:52AM
Signal9 Wrote:
-------------------------------------------------------
> I used hd-idle package from dev-eth0.de. Spin down
> after 30mins inactivity.

I have installed hd-idle and it nominally works. However, something keeps waking up the disk periodically and I'm darned if I can figure out what it is! The event appears about 4x per hour. I cannot find a cron job with this frequency. Samba logging has been disabled, but it didn't really seem to coincide with the spurious wake-ups. Nothing in the logs has a correlation for that matter.

Anyone have a guess as to what's causing this?
ecc
Re: debian & spindown of ext hdd
December 02, 2010 05:20PM
shirsch Wrote:
-------------------------------------------------------
> I have installed hd-idle and it nominally works.
> However, something keeps waking up the disk
> periodically and I'm darned if I can figure out
> what it is!

Try installing "iotop" (from squeeze, not lenny) and running

# iotop -o -b -qqq

It will only print lines for processes that are writing to disk.
Re: debian & spindown of ext hdd
December 03, 2010 08:15AM
ecc Wrote:
-------------------------------------------------------
> shirsch Wrote:
> --------------------------------------------------
> -----
> > I have installed hd-idle and it nominally works.
>
> > However, something keeps waking up the disk
> > periodically and I'm darned if I can figure out
> > what it is!
>
> Try installing "iotop" (from squeeze, not lenny)
> and running
>
> # iotop -o -b -qqq

Great suggestion - thanks! Turns out to be 'nmbd'. I have no idea what it's doing, though. There are no corresponding entries in the logs. I tried everything I could think of to suppress logging. Ended up setting samba to syslog only, level=0, then configured rsyslog.conf to discard everything from nmbd and smbd. Made no difference at all. I suspect whatever nmbd is doing does not pertain to log activity at all, since there was never a corresponding timestamp on any of the files involved prior to my fooling with it.

I'm sort of stumped at this point.

UPDATE: Ok, found it. It wasn't logging. Samba uses two directories for its internal databases: /var/cache/samba and /var/run/samba. The write activity was to files in both locations. As a quick fix, I stopped Samba, made both of these directories into mount-points for small ramfs filesystems (1M each) and restarted. Bingo! No more wake-ups :-)



Edited 1 time(s). Last edit at 12/03/2010 11:01AM by shirsch.
Re: debian & spindown of ext hdd
December 03, 2010 01:40PM
shirsch Wrote:

...
> UPDATE: Ok, found it. It wasn't logging. Samba
> uses two directories for its internal databases:
> /var/cache/samba and /var/run/samba. The write
> activity was to files in both locations. As a
> quick fix, I stopped Samba, made both of these
> directories into mount-points for small ramfs
> filesystems (1M each) and restarted. Bingo! No
> more wake-ups :-)

Newbie question. Do you have debian on flash drive or off the hard drive? If it is running on flash drive, how come /var/... ends up on the HD?
Re: debian & spindown of ext hdd
December 03, 2010 03:03PM
funtoy1001 Wrote:
-------------------------------------------------------
> shirsch Wrote:
>
> ...
> > UPDATE: Ok, found it. It wasn't logging.
> Samba
> > uses two directories for its internal
> databases:
> > /var/cache/samba and /var/run/samba. The write
> > activity was to files in both locations. As a
> > quick fix, I stopped Samba, made both of these
> > directories into mount-points for small ramfs
> > filesystems (1M each) and restarted. Bingo!
> No
> > more wake-ups :-)
>
> Newbie question. Do you have debian on flash drive
> or off the hard drive? If it is running on flash
> drive, how come /var/... ends up on the HD?

I have debian running from the attached hard drive. Too many problems with USB based boots (as reported by others on this list).
Re: debian & spindown of ext hdd
December 03, 2010 07:39PM
I also am running my Dockstar entirely off of a hard drive. This works fine for me on the Dockstar, but I could never quite make it work on the SheevaPlug. I believe the reason for this is that the Sheeva required an external USB hub, unless you intended to only have a HD on it (and even then it was not recommended to draw the drive power from the Sheeva's USB port), and the hub seemed to interfere with the uBoot's ability to boot from the HD.

There are pros and cons to this approach, but on the whole I prefer it. My thumb drives are now dedicated to testing, staging, and backups.
Re: debian & spindown of ext hdd
December 06, 2010 09:28AM
Signal9 Wrote:
-------------------------------------------------------
> I used hd-idle package from dev-eth0.de. Spin down
> after 30mins inactivity.
>
> echo "deb http://www.dev-eth0.de/dockstar/ squeeze
> main" >> /etc/apt/sources.list
> wget http://www.dev-eth0.de/dockstar/repo.key
> apt-key add repo.key; apt-get install hd-idle


I tried the above and i get ....

root@debian:/etc/apt# root@debian:/etc/apt# apt-key add repo.key; apt-get install hd-idle
-bash: root@debian:/etc/apt#: No such file or directory
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package hd-idle

Seems like it did not find hd-idle.

Can you see what I am doing wrong?
Thanks
P
Signal9
Re: debian & spindown of ext hdd
December 08, 2010 02:35PM
Did you do the following tasks?

# Add the dev-eth0 repository to your apt source
echo "deb http://www.dev-eth0.de/dockstar/ squeeze main" >> /etc/apt/sources.list

# Fetch the apt key for dev-eth0
wget http://www.dev-eth0.de/dockstar/repo.key
Re: debian & spindown of ext hdd
December 09, 2010 09:59PM
I tried it too, no luck. Does not work.
Re: debian & spindown of ext hdd
December 14, 2010 02:16PM
Phreon Wrote:
> I tried the above and i get ....
>
> root@debian:/etc/apt# root@debian:/etc/apt#
> apt-key add repo.key; apt-get install hd-idle
> -bash: root@debian:/etc/apt#: No such file or
> directory
> Reading package lists... Done-------------------------------------------------------
> Signal9 Wrote:
> --------------------------------------------------
> -----
> > I used hd-idle package from dev-eth0.de. Spin
> down
> > after 30mins inactivity.
> >
> > echo "deb http://www.dev-eth0.de/dockstar/
> squeeze
> > main" >> /etc/apt/sources.list
> > wget http://www.dev-eth0.de/dockstar/repo.key
> > apt-key add repo.key; apt-get install hd-idle
>
>

> Building dependency tree
> Reading state information... Done
> E: Unable to locate package hd-idle
>
> Seems like it did not find hd-idle.
>
> Can you see what I am doing wrong?
> Thanks
> P


No, that error message is from apt-key not apt-get. apt-key cannot find the file repo.key. If apt-get couldn't find a package you'd get an error message that looks like:

E: Unable to locate package hd-idle

Have you downloaded repo.key? If so, is it in the directory where you are running apt-key? If not then it should be.
Re: debian & spindown of ext hdd
December 15, 2010 10:42PM
I was also getting the:
E: Unable to locate package hd-idle
error message. I had to run:
apt-get update
before I ran:
apt-key add repo.key; apt-get install hd-idle
After that hd-idle installed just fine.

David
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: