Hot air

The other day I blogged about installing Debian on the D-Link DNS-323 NAS box, and it is really awesome (yay!). There were a few things missing however, most importantly for me was the fan to help cool the unit down. Well Martin Michlmayr built a new 2.6.29 kernel for me with a driver for the fan. THANKS!

I’ve a kernel for you now.

Edit the file /etc/apt/sources.list and add the following line:

deb http://people.debian.org/~tbm/orion lenny main

Now you can install the new kernel:

apt-get update
apt-get install linux-image-2.6.29-1-orion5x

After a reboot, you can control the fan this way:

echo 0 > /sys/class/hwmon/hwmon1/device/pwm1 # turn it off
echo 255 > /sys/class/hwmon/hwmon1/device/pwm1 # turn it to full speed

Any values between 0 and 255 will work.

This kernel also includes some performance patches from Marvell, so you
might see some performance increases too.

The new kernel works a treat, and indeed the fan does work. On my unit the device is under hwmon0, not hwmon1, but apart from that everything went smoothly. It will depend on your hard drive of course and how hot it runs, I just put mine on full-ball which isn’t too noisy (I think). AFAIK temperature sensing is not working yet, but if it was I could write a script to adjust the fan speed on the fly. For now I’m happy to just keep it at a comfortable level and keep an eye on the temps. Certainly without any fan working it was running too hot, so some fan is better than none at all!

I have yet to test any performance increase in the network performance, however I can confirm that scp is exactly the same slow speed at 2.x MB/sec and now I know why – thanks to top I can see scp and ssh maxing out the CPU. So it appears the unit just can’t decrypt fast enough, hence the bottleneck. I have installed nfs-kernel-server and will try this to see if performance is improved (I always use scp or rsync, so it might be good to have some speed increase!).

Thanks Martin!

-c

15 thoughts on “Hot air

  1. I recently had to transfer 60GB or so of backup files off and back on to my DNS-323 (thanks to your recent post I finally got around to moving my box from a chrooted debian to a native install 🙂 ).

    Don’t have any absolute measurements, sorry, but blatting it through an ad-hoc netcat pipe was bearable. The attempt at scp, however, was killed off after 12 hours.

  2. Oh, almost forgot! Thanks very much for your recent posts, including this one. If I can offer some advice as thanks, the DNS323 wiki ( http://wiki.dns323.info/ ) has some helpful advice on scripts and the like for more intelligent fan management.

  3. Hi Peter,

    I have a feeling if you do it with NFS or SMB it will be much faster.. but not as fast as taking the drive out and putting it into an external USB/eSATA unit 😉

    -c

  4. Thanks Peter, but I only put up my experiences with what others got working 😉 The wiki was where I first for the chroot environment installed and working. As for the fan, I did read it but thought it only worked when booted to the flash OS, not a native Debian install, but I might double check. Cheers!

    -c

  5. You might be able to get better speeds with scp if you specify a different cipher. I.e.: blowfish might be faster than the default aes128-cbc.

    Once you find the fastest one, just set that in ~/.ssh/config. I’m pretty sure in older versions of ssh the cipher ‘none’ turned encryption off, but that option seems to be gone.

  6. I am using Debian Lenny with the latest experimental kernel of Martin Michlmayr (2.6.30-rc5 Debian Kernel+Initrd). You might use the fans using ‘apt-get install lm_sensors’. Currently I trying to make use of the powerbutton, resetbutton and the leds. I even don’t know how to poweroff the device. But I think that only a matter of time… Debian works very well so far 🙂

  7. Hi Manuel,

    I shutdown the device and wait for the drives to spin down (listen for the “clunk”) and then I know I can safely turn it off 🙂 I’ll try lm_sensors.. please let me know if you get anywhere with the other bits!

    Cheers,
    Chris

  8. As far as know Erik Benada and Martin Michlmayr are working together to wipe out the GPIO issues. Erik Benada has already aplied many patches and is porting the GPIO-thing to GPIOlib … But it seems that the last kernel I got from Martin does not include all patches BUT I am still trying it out, flashed it yesterday 🙂

  9. Ahh, ok. Thanks for the info. I don’t mind the buttons not working. My main issue is the fan – which works, and I’d like it to crypt faster. It has an chip inside to do it, but AFAIK it’s not supported in the kernel yet, hence my blog about SSH algorithms. Once that works.. it’ll be a killer little box. For now I use arcfour over SSH or CIFS.

    -c

  10. Well I got the buttons and leds working with the kernel 2.6.30-rc6 (incl. patches from erik benada) build by Martin Michlmayr. Crypto-Support would be nice, too, I think 🙂 But we need to wait for that (>= 2.6.31), maybe.

  11. Hey Manuel,

    Did you have to configure anything to get them working, or did they work out of the box with the 2.6.30-rc6 kernel? I’m running Martin’s 2.6.29-2-orion5x kernel atm as it’s the latest in his repo.

    Cheers,
    Chris

  12. Nas:~# apt-get update
    Get:1 http://people.debian.org lenny Release.gpg [198B]
    Hit http://people.debian.org lenny Release
    Fetched 1B in 1s (1B/s)
    Failed to fetch http://people.debian.org/~tbm/orion/dists/lenny/Release Unable to find expected entry main/binary-arm/Packages in Meta-index file (malformed Release file?)
    Reading package lists… Done
    W: Couldn’t stat source package list http://people.debian.org lenny/main Packages (/var/lib/apt/lists/people.debian.org_%7etbm_orion_dists_lenny_main_binary-arm_Packages) – stat (2 No such file or directory)
    W: You may want to run apt-get update to correct these problems
    E: Some index files failed to download, they have been ignored, or old ones used instead.

  13. I don’t think that lenny is supported any more – in fact I don’t think you need a custom kernel any more. I upgraded my install to Squeeze and turned off Martin’s repo.

    -c

Leave a Reply

Your email address will not be published. Required fields are marked *