My Plug for the SheevaPlug
A month or two ago I picked up a Marvell SheevaPlug to use as a multipurpose home server. Previously, I'd been running all my network services (primarily this web site and an SSH server) on my iMac, but this had several downsides: I had to leave my iMac on all the time, and, more seriously, all my services went down every time I wanted to reboot into Windows. Being a lifelong Mac user, I didn't have an old PC lying around to dedicate as a full time Linux server, and my tiny apartment wouldn't accommodate a tower very well anyways. The SheevaPlug was an ideal alternative -- tiny, silent, very low power, and powerful enough for my home needs.
The plug comes with a 1.2 GHz single-core ARM processor, 512 MB of RAM, 512 MB of built-in flash (preloaded with an Ubuntu 9.04 installation), and a gigabit Ethernet port. The processor isn't going to compete with a typical dual or quad-core Intel processor, but it's got plenty of punch for a regular Linux installation and beats the heck out of a typical NAS box. The flash is something of a problem, since it's quite easy to fill up the 512 MB with applications and obviously you can't store any appreciable amount of media on it. Luckily, the plug also has a USB 2.0 port and an SD card slot. The board itself also has an eSATA connection, but the most common SheevaPlug model (manufactured by GlobalScale Technologies) doesn't have it exposed. Some newer manufacturers have started building in an eSATA port and some adventurous souls have successfully modded their plugs to expose the existing connection, but I don't trust myself that much with a soldering iron so I've stuck to USB for external hard drives. My plug and all peripherals only cost me about $200 total for the plug ($99, purchased here), a 500 gig hard drive ($50), an external USB enclosure ($30), and annoyingly steep shipping costs for the plug ($20). I'm not using the SD card slot at the moment, but a popular use for it is to put the kernel and OS on an SD card and just use a USB hard drive for media -- this is beneficial both because the bootloader is more reliable booting from an SD card than USB and also because it allows easily swapping out the OS on multiple cards.
The default Ubuntu installation is fully functional, which is nice because you can just connect the ethernet cable and SSH into the plug. Unfortunately, there are a few weird or broken things in the default install that make doing a clean install desirable. A bigger problem is that you can't upgrade the plug to Ubuntu 9.10 because 9.10 builds with an incompatible ARM instruction set, so as soon as support for 9.04 ends, you're out of luck. This is why a significant number of people have loaded other distros onto it (Debian and Gentoo being the two I've seen most mentioned). Being most familiar with Ubuntu, I went with Debian, which also has a great installation site courtesy of Martin Michlmayr. I installed everything on my USB hard drive and left the internal flash untouched as a backup. Booting the kernel off USB is a little flaky due to the buggy u-boot bootloader, but once the plug is booted it's rock solid for weeks on end.
I'm running a whole pile of services on my plug 24/7:
- This web site: Apache 2, PHP 5, and MySQL 5, with WordPress for the blog.
- The Transmission BitTorrent client, controlled via the slick web interface. Transmission is nice and efficient and rarely makes my plug sweat even when maxing out my cable connection.
- mt-daapd for serving music to iTunes clients on my network, gradually switching over to forked-daapd for both music and video streaming to Front Row.
- An NFS server sharing a dedicated media partition on the external hard drive -- I use this to share a single iPhoto library across my iMac and two laptops, and also house my music collection on it. I've set my iMac to manage my NFS music collection in iTunes directly, so whenever I import new music on my Mac, it gets copied over to the SheevaPlug automatically where it's picked up by forked-daapd and shared across the network. This also lets me easily sync my iPod on my Mac without maintaining two copies of my music library. I picked NFS for sharing vs AFP or Samba because (1) I don't have any Windows clients to worry about, and (2) NFS easily has the best performance. My LAN is only 100 mbit rather than gigabit, but the SheevaPlug easily maxes out my bandwidth (~11-12 MB/sec). I've read accounts that on a gigabit network, the plug can push around 30 MB/sec over NFS, though significantly less with Samba.
I'm constantly refining how I use my plug, but I've been very happy with how it's worked out, and I can now turn off or reboot my Mac into Windows at will without interrupting my site, torrents, or music streaming. Getting everything running just right definitely requires some careful research and trial and error, though -- don't expect to get everything working in one night (or one weekend, for that matter). Lastly, I should point you to the most useful general SheevaPlug resources on the web I found:
- The aforementioned Debian on SheevaPlug site for getting a fresh Debian installation running
- The ComputingPlugs wiki -- lots of good info for getting set up initially, though some of the kernel specific stuff (like patches) are out of date.
- The OpenPlug wiki -- I referred to this a couple of times when I couldn't find things on the ComputingPlugs site, and finally,
- The Plug Computer Forums -- forums for everything from the bootloader to software installations to hardware mods. Lots of good stuff and a place to ask questions if you're stuck.
Happy hacking!
May 19th, 2010 - 13:51
Very cool. I’m interested in picking up as Sheeva as well, but I’m curious where I can find a plug with eSata — you mentioned some manufacturers are now including them, but I haven’t found any. (I also don’t trust myself to buy a stock Sheeva and add the connection myself.) I know the GuruPlug Server Plus includes eSata, but from reading the forums it sounds like it is not stable so far.
May 26th, 2010 - 04:39
I don’t know of any US retailers offhand that sell an eSata version of the SheevaPlug, but New IT sells them in the UK (product link here) — my understanding is that it’s basically just the original SheevaPlug with the eSata mod applied. They also sell a few other modified plugs. I’ve only got the original model from Globalscale so I can’t speak to the reliability or quality of other manufacturers, but I believe New IT is reliable.
October 29th, 2010 - 11:44
Hi, good article. I have a sheevaplug at home and recently installed WordPress and mysql running with Apache2. My web site is fast enough. The only thing that is bugging me is the time it takes to save a post. I will be interested to see how long it takes to save this post, given the similarity of our environments…
October 29th, 2010 - 11:49
… WOW! that was blazingly fast. About 2 seconds! Nice! Is this blog really running on a sheeva plug ?
My blog takes about 10 seconds to save a post. It’s here by the way: unixetc.co.uk
I would like to to to my sheevaplug whatever it is you did to yours.
October 29th, 2010 - 12:20
The blog was running on my plug for awhile, but I was having some problems with my USB hard drive so I temporarily moved the site to my desktop, hence why it’s quite speedy right now. 10 seconds does seem excessive to save a post, though; I don’t think my plug ever took more than a couple.
October 29th, 2010 - 19:04
Thanks for replying. I found the problem. WordPress had this option turned on: “Email me whenever anyone posts a comment”. However, mail from the sheevaplug was broken after some firewall changes I made back in August, causing email requests to hang for about 7 seconds. I fixed the mail problem and – hey presto, posting time dropped from 10 to about 3 or 4 seconds.
This blog has a very fast posting time. You desktop PC must be a monster.