What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Non-zero status spinning down HD

mberteotti

Occasional Visitor
I keep on getting this warning "Non-zero status spinning down /dev/sda: 2". What's the problem? Status=2 means that HD doesn't spin down?

RT-N66U with 374.42.


Inviato dal mio Nexus 4 utilizzando Tapatalk
 
I keep on getting this warning "Non-zero status spinning down /dev/sda: 2". What's the problem? Status=2 means that HD doesn't spin down?

RT-N66U with 374.42.


Inviato dal mio Nexus 4 utilizzando Tapatalk

Probably means that this HDD isn't compatible with the spindown command.
 
I get the same problem as the guy above. But I'm not sure it's not spinning down. Infact after a while it says that the drive spinned up again (see below), probably because I'm accessing to it via samba. Is there any documentation about the sd-idle output meaning? I can't find it anywhere, doing a google search.

Code:
Aug 25 16:20:22 sd-idle-2.6[810]: spinning down /dev/sda after 5 mins 30 secs 
Aug 25 16:20:22 sd-idle-2.6[810]: Non-zero status spinning down /dev/sda: 2
Aug 25 16:23:52 sd-idle-2.6[810]: spinning up /dev/sda after 3 mins 30 secs 
...
Aug 25 16:29:23 sd-idle-2.6[810]: spinning down /dev/sda after 5 mins 31 secs 
Aug 25 16:29:23 sd-idle-2.6[810]: Non-zero status spinning down /dev/sda: 2
Aug 25 16:31:53 sd-idle-2.6[810]: spinning up /dev/sda after 2 mins 30 secs
 
I get the same problem as the guy above. But I'm not sure it's not spinning down. Infact after a while it says that the drive spinned up again (see below), probably because I'm accessing to it via samba. Is there any documentation about the sd-idle output meaning? I can't find it anywhere, doing a google search.
Maybe this will help.

http://tomatousb.org/forum/t-271603/sd-idle-2-6-disk-idle-spindown-program-for-2-6

Code:
# sd-idle-2.6 -h
Usage: ( runs as a daemon )
  sd-idle-2.6 [ -d devices ] [ -i idletime ] [ -c checktime ] [ -h --help ] [ -v --version ]
    -d  [a-z]+   include where a => /dev/sda, b => /dev/sdb (default is all disks)
       ![a-z]+   exclude
    -i n         n seconds a disk must be idle to spin it down (default 900, min 300)
    -c n         n seconds to sleep between idle checks (default 30, min 5)
    -h --help    usage
    -v --version version
  for example:
    sd-idle-2.6        will manage all disks with default times
    sd-idle-2.6 -d bc  will manage /dev/sdb, /dev/sdc with default times
    sd-idle-2.6 -d !bc will manage all disks except /dev/sdb, /dev/sdc with default times
    sd-idle-2.6 -i 600 will manage all disks spinning down after 600 seconds or 10 minutes

https://github.com/RMerl/asuswrt-merlin/blob/master/release/src/router/sd-idle/sd-idle-2.6.c
 
You'll have to look at the source code :)

In sd-idle-2.6.c we can see that the status code being returned is the unmodified value of "sg_io_hdr.status".

sg_io_hdr.status is the status code returned by the SCSI Generic driver (sg).

Looking here: http://tldp.org/HOWTO/SCSI-Generic-HOWTO/sg_io_hdr_t.html here http://tldp.org/HOWTO/SCSI-Generic-HOWTO/x255.html and here http://tldp.org/HOWTO/SCSI-Generic-HOWTO/x260.html status code 2 appears to mean "CHECK_CONDITION".

http://www.tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-Programming-HOWTO-21.html says:

When the status is CHECK_CONDITION, the sense data in the sense buffer is valid (check especially the additional sense code and additional sense code qualifier)."

"CHECK CONDITION. This status indicates that a contingent allegiance condition has occurred (see 6.6).

http://en.wikipedia.org/wiki/SCSI_contingent_allegiance_condition

So basically the device has returned an error of some sort. The next step should be to query the sense data in the sense buffer to find out more information. Unfortunately the program doesn't do this, so at the end of the day we're none the wiser. :mad:

:)
 
Thank you very much! :)
I guess I would better put my ear close to the hdd and hear if it sleeps or wakes up. :rolleyes:
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top