Category Archives: Linux

Linux server revamp

So i’ve been contemplating revamping my linux server in preperation for cutting the cord with my TV provider.  We have been watching streaming content or local content (transcoded DVD’s, BluRays, etc) for the last few weeks and not really watching anything live and I felt it was time to cut the cord for good.  i’m wasting a ton of money on tv programming that i’m not consuming.

I decided to reconfigure my servers as one main physical machine hosting 2 virtual machines (torrent/media serving and web).  I got the server up, got the vm’s going and had everything pretty much ready to go.  Tried to encode a media file to mp4 using handbrake and realized I had to go back to my old set up since the new version of handbrake is broken… 🙁

2 days lost in backing up data and installing to have to go back to my old setup.  Thank god i installed the new set up on a new hard disk instead of the one i had my original install on…

Put the old disk back in, booted up and back in business.  I’m kinda bummed that i had to revert, but found a few useful bits of info with the new installs and building VM’s in a headless virtual box system.  Also discovered mhddfs which is a way of pooling drives in linux without having to adhere to RAID rules or change formats or anything.  I have 2 2TB drives pooled together which house my running TV shows and i’m pooling 2 2TB drives together for my ended TV shows.  I’m going to try to do the same thing with my movie drives as soon as I figure out how i’m going to transition them off.  I’ve had to move a lot of data around this week in order to make this work.  I’ve been going with NTFS formatted drives on my server since linux will read it as long as ntfs-3g is installed and the Mac will read and write to them after installing Paragon NTFS.  Not much of a reason to format any new drives as OS X anymore…


Mounting NFS shares on OS X

I have serveral drives/directories on my linux server shared via nfs to the rest of my network

In order to mount the drives on my Mac, i have created a script to mount the shares.

sudo mount -t nfs -o nfsvers=2 <servername>:/media/USBHDD2 /mnt/usbhdd2
sudo mount -t nfs -o nfsvers=2 <servername>:/mnt/storage /mnt/srvrintstr
sudo mount -t nfs -o nfsvers=2 <servername>:/mnt/1.5TB_Media /mnt/1.5TB_Media
sudo mount -t nfs -o nfsvers=2 <servername>:/mnt/2TB_A /mnt/2TB_A
sudo mount -t nfs -o nfsvers=2 <servername>:/mnt/2TB_B /mnt/2TB_B

Fun with Linux!

After my success with Raspbian Wheezy on the Pi, I decided to challenge myself to get Linux running on my torrent/file server box running XP.  I also ran across a website that really helped me to understand how I wanted to approach my set up (

The set up that is used on that site mirrored alot of what I wanted to be able to do myself at home.  I attempted to duplicate the setup from that site for my own uses, but encountered some issues with getting the virtual machines working the way i wanted.  The set up outlined on that site consists of one physical machine running Ubuntu Server 64 bit with 2 virtual machines running Ubuntu server 32 bit (1 media server and 1 web/mail server.)

I took the XP hard drive out of the machine and installed an older 250GB drive that I had laying around and installed Ubuntu Server 12.04 on it.  I borked something up when doing the virtual machine set up and had to start from scratch.  After evaluating my real needs, I decided to forego the virtual machine route.  I realized that my main focus needed to be torrenting using Deluge and Flexget and then serving those files via samba or nfs to my other machines on the network.  I was less inclined to go the web/mail server route only because i could not really see a need for it.  I have a site hosted via GoDaddy and i’ve been happy with the service for the last few years.

I managed to get the server working with Deluge and Flexget and it was polling my favorite sites to get the stuff I wanted and appeared to be working perfectly.  After a week or so of monitoring the system, I realized that i was barely taxing the quad core processor and 4GB of RAM with the torrent part and figured I could utilize that horsepower in other ways.  Enter Handbrake.

I have been converting my DVD collection of movies and TV shows for my AppleTV for the last few years using my Mac Mini and it would convert fine.  I wasn’t really happy with the amount of time it took to convert a single movie/TV show and it typically taxed my processor quite a bit when it was running, so using my machine while converting was a bit of a pain.

I found a CLI version of handbrake that would run on my server and installed it and was amazed at the speed of the conversions.  i’m sure that the quad core and 64bit OS helped with that 🙂

I bought a few 2TB hard disks a few weeks ago and migrated the server to a 2TB internal drive and created more storage space for it.  I haven’t yet put the other 2TB drive in the system yet, but i’m planning on migrating the 12TB or so of music, software, audiobooks, ebooks, movies and TV shows to the server as I can.  The data is split up among numerous 1.5TB, 2TB and 1 TB drives on my Mini.  I’ll have to move data over to the server, convert the drives to ext4 and then move the data back once I have it all on the server.  This should help to make the media more manageable as it’ll all be in the same place and not split between my server and my Mac.

All in all, it’s been a fun and educational experience doing this.  I can’t wait to see what comes next…

Raspberry Pi and download automation

OK, so I’ve had a Raspberry Pi Model 2 for a while. I installed Raspbian Wheezy on it when i first got it and played for a bit. Neat device, but I had no “real-world” application for using it.

Since last year, I’ve been getting closer and closer to cutting my cable TV out since I can get 90% of what I want to watch via Netflix, Hulu or torrents. I’ve been researching ways that I could locate most of what the wife and kid watch on cable via streaming or downloading and how I could automate the process so that they could just sit down and have what they wanted to watch available to them. Right now, when i download shows/movies I have to manually push them to the AppleTV so that they can be watched by them.

I usually watch stuff on my phone or Nexus so I don’t mind the process of copying the media to my devices or streaming it. The wife and kid like the ability to just turn on the TV and just consume. I also tend to download the TV shows that I watch and keep them for a while in case I want to watch them again in the future. Most of the shows that my wife watches are throwaways, meaning that chances are the shows will get watched and then discarded or maybe re-watched if there’s nothing on standard programming.  My daughter is hooked on old family shows and cartoons, which I’ve either ripped from DVD or streamed.

I thought a bit about what I wanted to do for this.  I have some RSS feeds that I monitor to get the TV shows that I like and watch regularly so the automation piece was a no brainer.  RSS all the way.  I’ve also been having issues with Utorrent crashing.  I run that system pretty much headless, so it becomes a problem when I don’t check on it regularly.

My requirements were pretty basic:

  • automation – I wanted the system to automatically download the shows I tell it to and sort them to folders as TV Show -> Season which is mapped as a source for XBMC on the AppleTV in the living room.
  • transparency – The system had to be pretty much maintenance free once it’s up and running.  I wanted to avoid having to constantly tweak and move files manually.
  • Low power consumption and noise – I was planning on putting this system into our entertainment center cabinet, so it had to be quiet and not jack up my power bill running a full PC rig.  An added benefit would be if the system was unobtrusive so it didn’t look too out of place if I couldn’t tuck it back into a corner and hide it.

Based on this, I started looking at using my Pi as the device.  There are a few distros that run Linux under the hood with an XBMC gui.  I figured that this might be the best solution, but after tinkering with it for a bit in testing, this is not the solution for me.  I have multiple media player devices and the AppleTV is already set up and in use in the living room.  I had hacked it when I first got it so that I could play non-apple media, add additional storage and other fun hacker-ish things.  I’ve not been disappointed.  XBMC on it is responsive and i’m able to map shared drives with no serious issues.

I started building the Pi with Xbian and installed Deluge and Flexget.  Seemed to be working pretty well.  Now to test out some automation.  A little stumbling with creating the config files for Flexget to do what I wanted, but ironed those out and set it up to download a few shows and see how it went.  Everything seemed to be going well, but after a few days, i found I couldn’t connect to Deluge with the thinclient from my Mac.  Tried restarting deluge as root to no avail.  Rebooted Pi and it started working again.  Let it run for a few more days and it happened again.   So, back to the drawing board.  The more I thought about what I wanted, i decided to pursue getting the Pi set up as a Linux desktop that would be a torrent downloader and NAS.


Update:  The Pi has been running as a torrent/NAS machine for the last few weeks without any major issues.