X
Tech

Still Livin' La Vida Linux

It's been over a year since I wrote about my conversion to a Linux based digital media environment. This time I guess it's the MPAA who would be calling me a criminal, rather than the (RIAA) but other than that it's the same thing I've been doing with my music for my own enjoyment, so I don't feel bad about it.
Written by Jeremy Allison, Contributor

[The opinions expressed here are mine alone, and not those of Google, Inc. my current employer.]

It's been over a year since I wrote about my conversion to a Linux based digital media environment, and since it's the holiday season (or just after) I thought it was time to update the story, and describe some new Linux-based devices I'm using that others might find useful.

In the original essay I spoke about converting all my physical CD's to digital files into the patent-free FLAC (Free Lossless Audio Codec) format. At the time I was looking at the Sonos multi-room music system to play the files. I took the plunge and ended up buying a four room system last year. They aren't cheap, but they're the most robust devices I own. They never crash (and for a device as sophisticated as this, that's a real pleasure). I've owned televisions that fail more often than the Sonos boxes. The Sonos platform is based on an embedded Linux kernel, but the user interface is completely custom, using separate Linux-based controller devices to select play lists (although you can also use an iPhone). This is embedded Linux done right. It is incredibly easy to use. My wife, who is an avowed technophobe, finds it simple to program the music she wants. I'm trying to find excuses to buy more of these devices as it's such fun to have all your music available anywhere you want, or even listen to Chinese traffic radio broadcasts (available on the Sonos over the Internet) – although I'm running out of rooms to put them in :-).

I was so impressed with the ease of use of the Sonos that I ended up buying one of their all-in-one (including amplifier and speakers) S5 systems and giving it to my brother in the UK for Christmas. Bear in mind this is someone who would call me if his desktop background on Windows got accidentally changed and scream down the phone “my computer is broken!”, so I really didn't want to give him a system requiring any kind of technical support. I had converted him from his old Windows XP system to a desktop Linux system running Ubuntu earlier this year, and had only one support call since then (involving OpenOffice) and I really wanted to keep that score. So far it's been a complete success, although I did have one tech support call caused by him resting his chessboard  on top of the “volume minus (-)” button on the unit, and wondering why he couldn't hear any sound or turn up the volume using the controller. As I explained to his wife later, just when you think something is foolproof, the universe gives birth to a better fool. In order for the Sonos to play the music, the files need to be available on a Network Attached Storage (NAS) device. Now this is where my Samba experience becomes useful, as Samba is a core component of most home NAS devices. As the total amount of music I have is under 200Gb, I was able to re-use an old HP Media Vault NAS box I had spare at home. The HP Media Vaults are Linux and Samba based NAS units. This is one of the original units, not the modern versions they're selling now. It's so old it still uses ReiserFS as its primary file system, which gave me some concern before using it, but it's been fine as a mirrored 200Gb storage unit. It's really easy to set up with any client as it has a web-based administration interface, and as a basic music store it's given me no trouble. Point the Sonos devices at a Samba share on the box, give them a user name and password to use, and they'll go off and index all your music with no troubles at all. A few minutes later you're listening to anything from your complete collection.

I had to set up a NAS server for my brother as well, in order for them to encode their CD's for their Sonos unit. This is where I got lucky. I was given a modern Netgear ReadyNAS NVX NAS server with two 500GB mirrored drives. It's a Linux-based NAS, using Samba to provide Windows network storage and I'm very familiar with the developers. It's built like a tank (which I didn't appreciate whilst having to carry it in my luggage from San Jose, California to Sheffield in the UK) and is incredibly robust. It's really easy to set up and use. It has a modern web interface that is very intuitive to use, has two gigabit ethernet interfaces and hot swappable slots for four more drives. I was sorely tempted to keep it for myself but my brother also needed something to back up his work so his needs ended up being greater than mine. The fan was a little too noisy for them to tolerate it sitting in their kitchen so I ended up hiding it in the attic room connected via a D-Link Powerline Ethernet-over-power setup. It made me weep to see the gigabit network port throttled by that bottleneck (the ethernet over power speed doesn't get close to gigabit) but it works well enough in their environment. I expect after a while they'll forget the server exists, as it just sits there silently doing its job in the best traditions of an appliance.

Last year I spoke about tackling the problem of my ever growing DvD movie collection. I managed to solve that problem this year with the help of a really clever new device. After looking at all the options available I settled on the SageTV HD Theater system. At under $200, they're cheap enough to get one for each television and they're completely silent. They play anything. They can play disk based DvD images, DvD images stored as an .ISO file, AVI files, music in any non DRM (Digital Restrictions Management) format, files in the the Open Source Matroska Media format, and any variant of MPEG format I've ever seen. They also play video directly off the Internet and allow you to watch YouTube videos directly on your TV. Makes you realize how bad flash video encoding is when you see it that large :-).

They have HDMI and digital audio outputs (both coaxial and fiber optic), and are small enough that they're pretty unobtrusive next to a big screen TV (except for a really annoying blinking ethernet light that everyone ends up covering with black tape). When not in use they default to a really nice slideshow application displaying all your photographs that they have detected on the NAS storage.

Again, these devices are Linux and Samba based, and you can even telnet into the box as the root (super) user and mess around. The user interface is really nice (written in Java), with an easy set up, and they also connect to a NAS server via the Linux kernel CIFS/SMB (Common Internet File System protocol – the protocol that Samba implements) to play movies and music. I only use them for movies, as I have the Sonos boxes for music. My only problem with them is they're not as robust as the Sonos boxes, and occasionally I find I have to reboot one of them that seems to have gone to sleep all by itself. It's not often enough to be irritating, but I wish they were as reliable as the Sonos boxes.

One thing I love about them is that the developers at Sage are really fast at fixing any problems you report. It's a matter of a few minutes to update to a new version over the Internet (and just like a Linux distribution you are in control of when you update, not them) and new versions are posted very regularly. So far they've fixed a problem I found navigating a certain DvD menu, an issue with aspect ratio display, and rather embarrassingly for me they found a bug in the latest version of the Samba server by the way they were driving the Linux client. I always test the latest Samba versions on my home server (“eating our own dogfood” as the saying goes) so hopefully I catch issues like these before regular customers and vendors get to see them.

Back in the original story I rather quaintly estimated I'd need “one or two terabytes of storage” to cope with my DvD collection. Ha. Ha. Ha. I severely underestimated my squirrel-like tendencies with movies. So far I have about 20 terabytes worth of movies on those annoying physical disks, and that's just with regular DvD's. I haven't moved to BluRay yet as the DRM on this format is so offensive that I know of no reliable way (yet) to copy the data from these disks onto network available storage.

I have a perfectly serviceable Ubuntu desktop at home (with 8GB of memory) running Linux so I decided to turn that into my movie media server. I bought an eight bay hot-swappable eSATA TowerRaid box from the local Frys Electronics in San Jose, and eight 1.5 Tb disks. That gave me 12 Tb of storage total, but given the failure rates of large drives I ended up using the TowerRaid box as a JBOD (Just a Bunch Of Disks) tower and using the Ubuntu Linux kernel software RAID5 code instead of the custom Linux RAID driver code that came with the TowerRaid controller card. I formatted it with ext4 and set up the latest Samba code (from our git tree) to provide NAS service for the 9.5 Tb available after the RAID formatting. Other than the problem I reported earlier that the SageTV boxes found it's been a completely reliable setup, and all for under $1,500.

I still don't have enough space for all my movies, so I've been migrating them onto the NAS server as I want to watch them. It seems to work, and hopefully by the time I'm running out of space on the array I'll be looking at upgrading to 4TB disks (or maybe even Solid State Disks by then). I've been using a combination of the Linux “vobcopy” command or the excellent KDE created “k9copy” command to copy the DvD's onto my home server, both of which seem to deal nicely with the evil CSS (content scrambling system) DRM that DvD's are encoded with. This time I guess it's the Motion Picture Association of America (MPAA) who would be calling me a criminal, rather than the Recording Industry Association of America (RIAA) but other than that it's the same thing I've been doing with my music for my own enjoyment, so I don't feel bad about it.

Let me know how you have been solving your music and movie storage problems as you too move to “La Vida Linux”, I'd love to hear from you!

Editorial standards