Sunday Nov 22, 2009

My Home Media Server using OpenSolaris, ZFS, and free software

A while ago, I wrote several blog entries about what I did to set up a media server at home.  I'm writing this blog entry to wrap things up with some details about how much it all cost, and the software I'm running on the computer now.

Background

I decided to design a "media server" for home that would be the main data storage for our family's music, photos, recorded TV shows and movies, and personal documents and backups of our home directories on the computers we commonly use at home.  I had a few objectives for the media server:
  1. All of this data would be in a single computer that we could grab and stick in the car in case of emergency.  Friends of ours lost their house, but they had the foresight of having all of their personal data (over a terabytes' worth) on a single file server, so when they evacuated the house, they didn't lose any personal data.  Seemed like a great idea to me.
  2. The media server would store data reliably; i.e., I assumed that a disk would fail, and I wanted the media server to be able to continue working in case of failure.
  3. Reduce noise in the house as much as possible.  That meant putting the server in the garage where it could make as much fan noise as it needed to, but we wouldn't hear a thing in the home office or where we watch TV.
  4. Keep the cost down to a reasonable amount.  This was not the primary factor, but it was important enough for me to pay attention to when shopping for the components.

What I Purchased

Here's the build of materials for the computer I put together (I'm sure prices on these will have gone down since I bought them in October 2008).  Total price of the system: $742.  If you take out the cost of the disks, the rest of the computer cost $345.
  • Motherboard (newegg.com, $62.99) : ECS Elitegroup A780VM-M2 Micro ATX AMD Motherboard.  Supported the cheap AMD processor I wanted, and had plenty of on-board SATA ports (6).  Remember, I want all the disk to be in a single enclosure for easy, snatch-and-grab transportation.
  • Memory (newegg.com, $69.99): GSkill 4GB (2 x 2GB) DDR2 SDRAM (PC2 6400).  No reason to get greedy, and it keeps power draw and price down for the system.
  • CPU (newegg.com, $59.50): AMD Athlon 64 X2 5000 Brisbane 2.6GHz Socket AM2 65W Dual-Core Processor.  Nice price for a processor that does everything I need in a media server that can also run some apps.  More on the apps in a bit.
  • Disks (newegg.com, $396.80): 2 Seagate Barracuda 1.5TB 7200 RPM SATA internal disks.  Prices have gone down considerably for the storage, but this was a fair enough price last year.
  • Case (Fry's Electronics, $130): Antec Sonata III Mid Tower ATX Case.  Got good reviews, came with a 500W power supply which is plenty for what I was putting in it, and has plenty of ports and internal drive bays for the storage.

How I Set Up The Media Server

Here is the first blog entry I wrote that describes my thought process about using ZFS on OpenSolaris to store our home's data.

Here is the second blog entry I wrote, giving all the details about what I needed to do to format the disks and set up the ZFS pools and filesystems.  This was based on the OpenSolaris 2008.11 release; I plan to upgrade to a more recent release (probably an OpenSolaris build after the June 2009 release; I'd love to try the new ZFS deduplication feature).  Everything has been running fine, with the exception of the TimeSlider feature for doing automated ZFS snapshots.  That was fixed in the June 2009 release.

What I'm Running On The Media Server

The media server is doing a few things for us at home; here are the services it's providing:
  • iTunes music storage.  We have a Mac mini that we use for iTunes; all of our music is in iTunes, and the Mac mini NFS-mounts a filesystem from the media server.  I tried both CIFS (Samba) and NFS.  I preferred NFS, but it seemed to have troubles with the Mac as an NFS client.  After reading James Gosling's blog entry on what he observed with Macs and Solaris and NFS, I made a tweak on the Mac mini and everything has been working smoothly ever since.  We make this library shareable to our other Macs on the home network.
  • iPhoto storage.  The same Mac mini also stores all of our photos.
  • TiVo media backup and playback.  There is a great open source Java application called Galleon that uses the TiVo Home Media Engine (HME) API; the API lets you write your own Java apps that show up as part of the TiVo's on-screen menu system, and it lets you talk to the TiVo to grab shows off the TiVo's disk and put shows on there, among other functions.  Primarily, we use it as a way to keep backups of shows that we don't want to lose in case the TiVo's disk crashes and loses data.  This has happened several times, mostly due to unforeseen loss of power.
  • Personal finances (via Intuit's Quicken software).  To do this, I run the free, open source VirtualBox software.  I used to use VMware, but VMware isn't free and it doesn't run on any version of Solaris.  VirtualBox runs on every operating system I use, it's free, and it's improving much faster than VMware is.  So, I run Windows XP as a guest OS inside VirtualBox, and use that guest OS to run Quicken.  When I'm feeling like the guest OS is getting slow or am worried that it's collected viruses, I just blow away that guest image and go back to an earlier snapshot.

My Wish List

Are any of you doing something similar with your home setups?  If so, maybe you have done some of the things I'd like to set up but haven't gotten done yet.  Here's my wish list of apps and features I'd like to add, and I'd like to do it all natively in OpenSolaris (in other words, none of these services would need to run in a guest OS like Windows or Linux under VirtualBox):
  • DLNA server running natively in OpenSolaris.  DLNA will give me the ability to share and stream my media (photos, music, video) to the PlayStation 3.  I've played with several solutions; more on this in a moment.
  • Live streaming of TiVo content from the media server back through the TiVo.  Galleon lets me transfer shows to and from the TiVo, but not play them live.  This is a feature that the ReplayTV product had (I still miss that product, and am sorry they went out of business), and their Java app was superior in several ways to Galleon.  But, it looks like somebody has written software to let you play TiVo shows from your media server straight through the TiVo.  I just haven't gotten it running on the media server yet.

Powered by ScribeFire.



Tuesday Aug 12, 2008

Kinesis Keyboard and the Apple Command Key

I have a Kinesis Model 130 keyboard, an ergonomic keyboard that I love to use. Actually, I have three of them, acquired over the past 10-15 years. I am convinced that they have saved me from tendonitis and carpal tunnel syndrome; that, and my switching to the Dvorak keyboard layout about 15-20 years ago.

But only recently did I try using the Kinesis with my Mac computers and the problem is that I couldn't find the Apple "Clover" key on the keyboard, certainly not in the place where it should be (in the center area of the keyboard, where Kinesis mounts the Alt/Ctrl/Home/End keys where the thumbs can type them).

Turns out the Kinesis keyboards do have the Clover keys mapped, but in different places depending on which model keyboard you have. On older models like my older 130, they are mapped to the embedded layer, to the "H" and "N" keys. (the embedded layer is the layer of keys that you get when you press the "Keypad" button; other keyboards would call this button "Num Lock") On more recent Kinesis keyboards that don't already have a standard Mac keyboard layout, Clover is found in the "PrintScn" and "Scroll Lock" keys.

Here is how to map from the embedded layer to the non-embedded layer. For example, mapping the Mac Clover key from the embedded layer to have it sit where the "Alt" key is (you press "Alt" to get "Clover"), follow the instructions below, which you can also find on Kinesis's web site on this page.

Remapping bottom layer windows key to top layer:

For PS/2 Contoured keyboards, the Windows key (or Command for Mac users) is located in the embedded "PrintScrn" and "Scroll Lock" keys. If you would like to remap the embedded Windows key to the top layer, follow these instructions:
  1. Turn Keypad ON.
  2. Press and hold the Progrm key and tap F12 (LED's on keyboard will flash rapidly).
  3. Press and release the "PrintScrn" key. (LED's will slow down).
  4. Press and release the destination key, for example- Right Alt (LED's will speed up).
  5. Press and release the "PrintScrn" key (LED's will slow down).
  6. Press and release the KEYPAD key.
  7. Press and release the SAME destination key, example- Right Alt (LED's will speed up).
  8. Exit by repeating step 2 (LED's will stop flashing).
Now, in this example, the Right Alt key will function as the Windows/Apple Command key when keypad is ON or OFF.
NOTE: For older PS/2 Contoured keyboards, the Windows / Apple Command ("Clover") key is located in the embedded "h" and "n" keys.

By the way, Kinesis now makes keyboards that easily map between a standard Windows and Apple keyboard layout with a simple key sequence you can press. I just purchased one of those, too...I'm a big fan of Kinesis.

One last note: I've had my oldest Kinesis keyboard for well 12+ years, and I still have no problems with it. They make a high-quality product. It's not cheap (maybe $300), but for how it makes my fingers feel, it's a no-brainer.

Sunday Aug 06, 2006

The Nike iPod Sport Kit in unsupported shoes

I got an iPod nano recently, to replace my third dead iPod Shuffle (watch this space for a rant on my woes with the iPod Shuffle).  Since running is my primary form of exercise, I decided to spend the extra thirty bucks or so and buy the Nike iPod Sport Kit, a device that lets you use your nano to track your running (or walking) workouts.  It uses a sensor that you put into your shoe, which transmits data to a device you plug into the nano.  Here's the catch:  the sensor is pretty sensitive about where it needs to go (into the midsole of your shoe), and there are only a few Nike shoes that have the proper hole in their midsoles that can fit the sensor.  I don't have any of thoes shoes.  Here's what I did to make it work with my non-Nike-supported shoes.

Here's What Not To Do

The first thing I tried was to place the sensor between the laces of my shoe and the tongue, as far forward as it would fit.  If you were looking at the shoe from above, the sensor would be visible, looking as if it were lashed to the shoe.  That didn't work at all; no motion was detected whatsoever.  Apparently the accelerometer in the device needs to have some pressure on it to help determine your footstrike; here in Nike/Apple's FAQ about the device.

Next, I tried placing the sensor between the side of my ankle and the shoe, sort of on the side of my Achilles tendon.   That seemed to work better, but it wasn't terribly stable (it jostled some) and I don't think it made for very accurate measurements.

Here's What Worked

Finally, I decided to carve my own divot out of the insole of the shoe.  Turns out that really isn't necessary to make the sensor work, but if you can carve a little divot into your insole, it'll help.  Otherwise, it feels a little bit like you're running with a pebble under the arch of your foot.

Step 1: Remove sole insert, optionally carve hole for the sensor.  I used an Xacto knife to carve this hole, which wasn't very deep (I hit the hard part of the sole and didn't want to cut into that for fear of ruining the ride of the shoe).  Turns out this step didn't do me much good; I don't recommend it unless you're bolder than I am and are willing to cut deeper than the soft tissue of your shoe's midsole.
Trail running shoe with divot cut into its midsole

Step 2:  Place the sensor in the midsole, directly under the highest point of your foot's arch.
The sensor placed in the midsole of my trail running shoe

Step 3: Tape the sensor to the midsole to keep it stable.  When the sensor was placed here and held in place by the tape, it worked perfectly.  This must be the proper place for it to optimally determine your foot stride.  When I compared the distance reported by the sensor vs. my Garmin Forerunner GPS unit, they matched well.  I also ran around a 400-meter track and the sensor was right on target.
The sensor, held in place by electrical tape

Once Again, Duct Tape Is Our Hero

Well okay, it was electrical tape in my case, but you get the point.  I'll probably buy a pair of Nike shoes that has the divot already made, because it's deep enough to fit the sensor in it all the way.  The way I did it here, I could feel the sensor during the entire run.  It wasn't too bad, not enough to really bother me or make a bruise on my arch; nothing like that.  But I'd like it better if I felt nothing at all, and I can't find a better place for the sensor so that it works correctly.  If anybody else has a better idea, I'd love to hear it.

Tuesday Jan 03, 2006

JDS, the Canon SD-450, and hotplug

First, Credit Where Credit Is Due

I don't have time to make this a long entry, which is probably a good thing. I just need a place to keep this info. (gotta give credit where credit is due; I am stealing the idea of keeping tech-admin notes in a blog from this guy, my vice president. Thanks, Juan Carlos.

The Problem

So I bought myself a Canon SD-450 digital camera. The thing is way cool, and after I took some initial photos with it, I wanted to upload them to Shutterfly. I run the Java Desktop System Version 3 on my notebook computer, so thought I'd just connect the camera and JDS notebook via USB and transfer the photos.

Nope. No worky.

A Bone-headed Move

Next step was to upgrade the "hotplug" package from its default version of 0.44-whatever to 0.50-whatever. That was a Bad Idea (tm). Don't do that. My wireless network hardware stopped working; /var/log/messages shows the following:

Jan  3 23:35:46 lummi kernel: ipw2100: Detected Intel PRO/Wireless 2100 Network Connection
Jan  3 23:35:56 lummi kernel: ipw2100: eth1: Firmware 'ipw2100-1.3.fw' not available or load failed.
Jan  3 23:35:56 lummi kernel: ipw2100: eth1: ipw2100_get_firmware failed: -2
Jan  3 23:35:56 lummi kernel: ipw2100: eth1: Failed to power on the adapter.
Jan  3 23:35:56 lummi kernel: ipw2100: eth1: Failed to start the firmware.
Jan  3 23:35:56 lummi kernel: ipw2100Error calling register_netdev.
Jan  3 23:35:56 lummi kernel: ipw2100: probe of 0000:02:05.0 failed with error -5

I found a few references to this kind of problem on the net, but the answer seemed to be to increase the timeout in the file /sys/class/firmware/timeout from the value of 10 to 100. I tried that several times; it didn't work. Also, I could no longer plug in my USB keyboard and mouse. And even the default Ethernet driver didn't load by default. Things got pretty grim.

The Solution

Finally, I checked with YaST to see what it thought the default version of hotplug should be for this version of the OS. I then asked YaST to please re-install that version. YaST did that, I rebooted, and -voila- everything is fine again. Network drivers are loaded by default and work fine. I'm typing this blog entry on my ergonomic USB-attached keyboard.

Whew!

About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle. What more do you need to know, really?

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today