Setting up OpenMediaVault

I hope everyone had a merry Thanksgiving! I spent some of my time setting up OpenMediaVault on an Acer Aspire 3610 that my Kolby gave me. It’s a pretty small machine, running an Intel Atom 330 1.6 GHz with 2 GB of RAM1, but I think it will be perfect for running my new NAS!

I’ve been dreaming of a NAS for some time, I’ve contemplated building one for at least two years, but could never justify the cost. What makes this different is that it doesn’t require any new outlay for equipment–I’m literally using what I have already!

I settled on OpenMediaVault because it was based on Debian, which I have more experience with2.

Here are some configuration tricks I need to use in order to get it to work How I Like It™:

CrashPlan

I use CrashPlan on my laptop and it’s great3! If you don’t have a backup plan, you need to stop reading and get one now. Seriously. What would you do if your computer was stolen, or the hard drive went kaput, or you accidentally deleted something? I want to make sure that data my NAS is storing is just as safe as the data on my laptop.

There’s a guide over on the OpenMediaVault forums which basically echos the official CrashPlan Linux installation guide. Everything went okay until I tried to launch the desktop client and I couldn’t get X11 forwarding to work. I was eventually able to get a headless client to run from my laptop connected over a tunneled SSH, but I didn’t want to have to muck with the ui.properties files every time I wanted to check on things. I also wanted to be able to run both my client and the OMV client simultaneously. So I went back and did some more work on the X11 issue and here’s what I found needed to happen:

For the purposes of this, the IP address of the OpenMediaVault server is 172.16.131.130

Log in to your terminal via SSH:

<br />
ssh root@172.16.131.130<br />

Note, if you get a ssh: connect to host 172.16.131.130 port 22: Connection refused, you need to enable SSH via the OMV online console first!

Prerequisites:

<br />
apt-get update<br />
apt-get install xorg<br />
echo &quot;X11UseLocalHost no&quot; &gt;&gt; /etc/ssh/sshd_config<br />
/etc/init.d/ssh restart<br />
apt-get install openjdk-6-jre<br />

Install CrashPlan

<br />
cd /tmp<br />
wget&amp;nbsp;http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_3.4.1_Linux.tgz<br />
tar -zxvf CrashPlan_3.4.1_Linux.tgz<br />
cd CrashPlan-install<br />
./install.sh<br />

Answer yes to install installing Java, and answer all the other questions as required. If you just press return, the defaults will work just fine (and that’s what I used).

Log out and back in with X11 forwarding enabled, then run CrashPlan:

<br />
exit<br />
ssh -X root@172.16.131.130<br />
/usr/local/bin/CrashPlanDesktop<br />

Give it a few seconds and you’ll see that familiar CrashPlan green.

Other notes:

  • It was helpful to debug with ssh -v
  • Looking through /usr/local/crashplan/log/ui_error.log was the key to understanding that the version of Java downloaded by CrashPlan was throwing errors (such as java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3448 or swt-pi-gtk in swt.library.path) and needed to be updated.

HFS+

I have a couple of drives that are formated in HFS+ that I wanted to use without having to reformat them. As a side note, I think NTFS is probably the best bet for multisystem compatibility when the potential for dealing with files larger than 4GB. A comment on the OMV blog by norse laid the basic ground work, but I also had to pull some information from Raam Dev’s blog about configuring HFS for Debian.

Note: hfsprogs 332.25-9 and below has a bug where “[f]ormatting a partition as HFSPLUS does not provide the partition with a UUID.“. The work around is to boot to OS X and use the disk utility to format the partition, but this doesn’t work as well when you’re using a VM. The solution is to use the unstable 332.25-10 release of hfsprogs.

<br />
echo &quot;deb http://ftp.debian.org/debian testing main contrib&quot; &gt;&gt; /etc/apt/sources.list<br />
apt-get update<br />
apt-get install hfsplus hfsprogs hfsutils<br />
sed -i '$ d' /etc/apt/sources.list<br />
apt-get update<br />

Then modify /var/www/openmediavault/rpcfilesystemmgmt.inc to be able to handle and mount HFS+ disks:

<br />
48c48<br />
&lt; 					  '&quot;jfs&quot;,&quot;xfs&quot;,&quot;hfsplus&quot;]},<br />
---<br />
&gt; 					  '&quot;jfs&quot;,&quot;xfs&quot;]},<br />
118c118<br />
&lt; 			  &quot;umsdos&quot;, &quot;vfat&quot;, &quot;ufs&quot;, &quot;reiserfs&quot;, &quot;btrfs&quot;,&quot;hfsplus&quot;))) {<br />
---<br />
&gt; 			  &quot;umsdos&quot;, &quot;vfat&quot;, &quot;ufs&quot;, &quot;reiserfs&quot;, &quot;btrfs&quot;))) {<br />
664,667d663<br />
&lt; 			break;<br />
&lt; 		case &quot;hfsplus&quot;:<br />
&lt; 			$fsName = $fs-&gt;getUuid();<br />
&lt; 			$opts = &quot;defaults,force&quot;; //force,rw,exec,auto,users,uid=501,gid=20&quot;;<br />

Finally, you may need to fsck your HFS+ disk if it’s being stubborn and mounting in read-only mode. With the partition unmount:

<br />
fsck.hfsplus -f /dev/sdaX<br />

WiFi

Getting WiFi to work took me down a rabbit hole that ended up being unnecessary. First, verify which Wireless you card you have. The easiest way to do this is using lspci:

<br />
apt-get install pciutils<br />
lspci | grep -i network<br />

You should see a line like:
05:00.0 Network controller: RaLink RT3090 Wireless 802.11n 1T/1R PCIe

Installing the RT3090 is pretty straight forward:

<br />
echo &quot;deb http://ftp.us.debian.org/debian squeeze main contrib non-free&quot; &gt;&gt; /etc/apt/sources.list<br />
apt-get update<br />
aptitude install firmware-ralink wireless-tools wpasupplicant<br />
sed -i '$ d' /etc/apt/sources.list<br />
apt-get update<br />

Edit /etc/network/interfaces to add the following:

<br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
    wpa-ssid mynetworkname<br />
    wpa-psk mysecretpassphrase<br />

Note: the Debian guide recommends restricting the permissions of /etc/network/interfaces to prevent disclosure of the passphrase.

Then run:

ifup wlan0

That’s all I have for now, I’m working on some methods for backing up other data to the NAS (such as my web site and GMail) which I’ll write up later.


  1. we tried using it to stream the Olympics, but it wouldn’t even do that very well, but I think that was due to the nVidia chipset not playing well with Ubuntu 

  2. FreeNAS and NAS4Free both being based on FreeBSD 

  3. I previously use Mozy, but they started charging by the GB, which wasn’t going to work for me