NSLU2-Linux USB harddrive spindown
Recently, I bought a Linksys NSLU2 network attached storage device and installed Linux on it. I have it boot over a 64 MB USB flash stick that I had to spare and I connected a ext3-formatted USB harddrive to it. It works flawlessly with Samba, serving the USB drive to all of my client OSes.
However, as I only need the USB harddrive maybe twice a day, I did not want it to run all 24/7. The main reason is, of course, that it wastes electricity, and additionally running all the time might have an unnecessary impact on the longevity of my drive. Especially because it is used only now and then.
Almost all the pages I found about this on the net mentioned that currently (and maybe forever) it is impossible to have a spindown time for USB harddrives, due to the SCSI driver emulation in the Linux kernel.
Today, however, I found an interesting thread in the nslu2-linux mailinglist. Robert Demski has provided a kernel patch as well as a binary package for the OpenEmbedded system (which is the base for the OpenSlug distro).
I managed to patch my openslug image accordingly and now USB spindown with scsi-idle works flawlessly for me with a Kernel 2.6.15-2. Once it is patched in the main images, you are good to go; If you want to build your own flash image right now, instead, here we go:
Read the rest of this entry »