Jump to content

Vanilla kernel - disk spindown


john.glasson

Recommended Posts

I would like to upgarde my Cubietruck headless server from Legacy to Vanilla.

 

With Legacy if I boot from NAND I can get my hard disc to spin down. But with SD card/sda root file system (as required by Vanilla) I can't get my disc to stop: if I issue 'hdparm -Y /dev/sda' it spins up again after a short interval.

 

I have done everything I can think of to ensure that rsyslog is not writing to disc.

 

Syslog shows frequent ata error messages that seem to coincide with the disc re-starting. Error msg:

 

   kernel: [  104.477850] ata1.00: exception Emask 0x0 SAct 0x200 SErr 0x0 action 0x6

 

I have tried this on two different Cubieboards with different makes of hard drive. Same error.

 

Has anyone else encountered this, or had success with disc spin down with Vanilla?

Link to comment
Share on other sites

Output from armbianmonitor for my main server at http://sprunge.us/TALJ

 (also for my test Cubietruck at http://sprunge.us/KZMW

 

Thanks, this was just to confirm that you really have / on the SATA disk (which clearly can't work the way you want). Please try out

sudo iotop -ob -d5

to get the idea which processes are responsible for writing to /dev/sda3 (and therefore spinning up the HDD). BTW: on all SBC where a HDD is connected i let the rootfs remain on SD card or eMMC for exactly that reason: to let the disk spin down when not needed.

Link to comment
Share on other sites

Thanks, tkaiser.

 

Not sure that I can get a useful iotop since I'm currently running from NAND. But I did test this before switching back to the legacy kernel: with rsyslog.conf modified to prevent cron etc from logging, I was still getting frequent ata1.00: exception errors in the log, unrelated to any normal logging activity. As I mentioned, this was reproducable on a different Cubietruck with a different make of disc.

 

I'm interested in your comment that you let the rfs remain on SD card: does this not result in a significant performance hit? Maybe a usb stick would be faster?

Link to comment
Share on other sites

- be aware that rsyslog force disk sync (in default config) for auth.log : that mean that most messages wait a global sync but every login (and cron) force a disk flush.

 

- I also hate ATA exception/reset problem. In fact my fs was damaged (you should do an fsck on yours), but I think it is a consequence and not a cause of bus errors.

 

- I am pretty sure than this bus errors are caused by power surge and bad connections in power supply (at least for me). I improved my connection this morning and have not have any message since. In order to give you an idea, I use an IR transmitter for emulating remote - simply a couple of IR diodes with pulse code modulated by lirc. I always had problems with connectors. The pulse need 1 amp for peaks. It works, but after 24 hours of inactivity, I need to fiddle with the connectors to have a good signal. The audio connectors I use are simply not able to provide a reliable connection for 1 amp currant. Simple question of quality of contact - not cable. But you can have the same problem with bad PSU or thin cables ... USB plugs do not ensure much pressure on contacts and we generally have no idea of the material used. At best, avoid PSU with USB socket and never power a disk threw the board as you then may have 4 interfaces with resistance and contact problems between PSU and disk ...

Link to comment
Share on other sites

I'm interested in your comment that you let the rfs remain on SD card: does this not result in a significant performance hit? Maybe a usb stick would be faster?

 

There's no need for 'maybe', it's all about random IO and you can measure that. :)

 

Choose any of the recommended SD cards (I would prefer Samsung EVO with 32 or 64GB) and measure random IO. A Samsung EVO will outperform every HDD unless it's 15k WD VelociRaptors (or SAS drives that spin that fast). Some background info: http://forum.armbian.com/index.php/topic/1925-some-storage-benchmarks-on-sbcs/

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines