Debian on my NSLU2: The Revenge of the Swirl

  • flash • saving • selinux • it • linux • ftp • samba • clock • personal • firmware • nas • hdd • memory • sharing • http • english • curiosity • nslu2 • debian • optimization • unslung • hacking
  • 296 words

After some playing with Unslung on my Linksys NSLU2, I realize it was a "very limited solution" for our needs. We need to share 4 (sometimes 5) NTFS (or others) volumes, where everyone of them is 500GB: this is too much even for the modified firmware of Unslung, unable to read the full directory trees (and the contained files) of my massive movie's collection.

So, I came back to the Debian/NSLU2 solution. This time, with all the intention to make it work. It's quite pointless to report here all the things I did to make it work in the way I want/need. I'll just write down the most important bits:

  • Memory Optimization:
    • remove unused kernel modules (blacklisting in /etc/modprobe.d/blacklist)
    • remove unnecessary services/daemons (like exim4 or nfsd)
  • Mount volumes "by-label", to avoid messes in mounting if the /dev files associated with the particular devices changes (reboot, unplug/replug, etc.) (take a look at this page for more info)
  • Use the noatime option in the /etc/fstab file to avoid the system to update the "last-access" field in the i-nodes: this is very important to reduce I/O on Flash memories
  • Reduce the swappiness of the kernel (reduce the I/O)
  • Install fuse and compile ntfs-3g by hand: on Debian stable it's not available yet (I could have used stable-backports but no one compiled ntfs-3g for [en:ARM] :( )
  • Configure one [en:Samba] share for Disk. This avoid the problem of Samba calculating "free-space" when the sub-directory of a share is the mount point of a different disk.
  • De-underclock the NSLU2: the CPU (XScale-IXP42x Family rev 1 (v5l)) is soldered to the board with a pin configuration that makes it run half of is speed. I just removed the Resistor that realize that particular configuration. More info here and here.

comments powered by Disqus