DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-10-18 23:04:03

blomi
New member
Registered: 2010-10-18
Posts: 2

Determinate HDD state

Hi,

how do I determinate the state of the discs, e.g if its active, idle or in standby?
The command hdparm -C /dev/sda just gives me a "drive state unkown".
With dmesg the status is printed out ("awake now" / "stand by now") but it's a bit complicated to use this in a script.
Preferably  the solution just uses the DNS323 firmware commands.
Maybe there is some information in /proc?

Configuration: DNS323 with FW 1.08 and fun_plug 0.5.

Thanks for your help.

Greetings,
Blomi

Offline

 

#2 2010-10-19 02:02:26

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Determinate HDD state

Take a look at dns323-spindown in http://www.inreto.de/dns323/utils/

Be aware of putting such an executable on a disk that you are trying to get the status of!


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#3 2010-10-28 20:41:30

blomi
New member
Registered: 2010-10-18
Posts: 2

Re: Determinate HDD state

Hi karlrado,

thanks for the advice! It works fine. For everybody else interested:

1. Using the dns323-spindown which is already installed by fun_plug doesn't work (disk starts spinning), because it's on the disk. Just copying to /tmp also doesn't work (probably because it references some libs on the disk). But using the dns323-spindown from http://wolf-u.li/3403/lueftersteuerung- … vision-c1/ on /tmp works fine. The program dns-323-spindown is included in the package uwfancontrol http://ffp.wolf-u.li/additional/ffp-mis … -1.1-4.tgz in folder ffp/var/opt/uwfancontrol/

2.  To interpret the result of dns323-spindown have a look at the source code

Code:

data[1] = 2 to get pm support state, return value in data[2]
             return value is bitmask 
             bit 0 set means hd0 supports PM
             bit 1 set means hd1 supports PM

data[1] = 3 to get pm state, return value in data[2]
             return value 1 means at least one drive is active
             return value 2 means all drives spun down

For example

Code:

$dns323-spindown
[03] hd0 hd1
[01] ACTIVE

means:
Both disks support power management
at least one disk is active

Last edited by blomi (2011-06-30 22:51:55)

Offline

 

#4 2011-06-30 20:06:16

cinergi
Member
Registered: 2011-01-02
Posts: 14

Re: Determinate HDD state

Hello Blomi,

I'm having the same problem as you, i.e. the dns323-spindown command accesses the hard drive even if I run it from /usr/bin.  I tried the link you provided to the alternate version but I don't see where I can download it.  It doesn't help that I can't read German.  Could you please be kind enough to provide a direct link?

Thanks!
cinergi

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB