My Mac Mini acting as a PLEX server was from late 2009 and had began stuttering when playing some recent high quality rips or transcoding.
It was time to upgrade.
Luckily I had an old i7-4790K processor laying around. I bought a case from amazon, and sourced a cheap 1150 motherboard locally. I also already had a 250gb SSD I wasn’t using. All I needed was some ram and I was in business.
I also wanted some form of storage and had heard about the ODroid HC2. I picked up the following gear from their site which came surprisingsly fast via DHL (a few days).
- 2x Cases
- 2x ODROID HC2
- 2x power cords
- 2x RTC Battery
- 2x 8gb SD cards
Then, from Amazon I picked up everything else.
- 2X 4TB Hard Drives
- 1X Power Supply
- 1X Spool of 14AWG Wire
- 1X Power Switch w/ Fuse
- 1X Power cable for the mains
Once I had everything wired up, and running I booted to the default OS using the DHCP addresses they got. Then I changed the IP to something static DHCP on my dhcp server, then added DNS through PFsense so my shared drives would be resolvable by name. Shit’s gettin’ real now dawg.
Then, I performed the following steps to get everything going.
- Install Arch Linux on Plex Server and configure (this would be a separate howto entirely). Install Plex Server or PlexPass Server.
- Plug your Odroids in, and get them on the network.
- SSH to both Odroids and then issue these commends on each one.
# passwd # sudo apt-get install glusterfs-server # sudo service glusterfs-server start # sudo service glusterfs-server status # sudo apt-get install xfsprogs # gdisk /dev/sda p d n <enter><enter><enter><enter> w y # sudo mkfs.xfs /dev/sda1 # sudo mkdir /data # sudo mount /dev/sda1 /data/ # df -T # blkid /dev/sda1 UUID=1234abc
- Now you’ll want to run the following differently on each odroid.
echo "UUID=1234abc /data xfs defaults 1 1" | sudo tee --append /etc/fstab
echo "UUID=5678xyz /data xfs defaults 1 1" | sudo tee --append /etc/fstab
Then run these commands on both odroids
# mount -a # df -T # sudo mkdir -p /data/vol0
Now run this on just one of the Odroids. Logically, I chose to do it on odroid1. Where mylocal.lan is my domain I use on pfsense.
# sudo gluster peer probe droid2.mylocal.lan # sudo gluster peer probe droid1.mylocal.lan # sudo gluster volume create vol0 replica 2 transport tcp droid1.mylocal.lan:/data/vol0 droid2.mylocal.lan:/data/vol0 # sudo gluster volume info vol0 # sudo gluster volume start vol0
Then on your PLEX server, run these commands to mount up your gluster network, and auto mount it.
# sudo mkdir -p /mnt/gluster # sudo mount -t glusterfs -o acl droid1.mylocal.lan:/vol0 /mnt/gluster # df -hP /mnt/gluster # cat /proc/mounts # echo "droid1.mylocal.lan:/vol0 /mnt/gluster glusterfs defaults,_netdev,noauto,x-systemd.automount 0 0" | sudo tee --append /etc/fstab
Now add some files to your gluster drive on the plex server. Then take a look at both your odroids. You should see the file exists in /data/vol0 as well on each of them. Congratulations you now have a replicating filesystem spread out over your two Odroids and used by Plex for storage.
Now you should reboot all three devices to make sure everything comes up on a reboot, and that everything still functions. If it doesn’t check your logs and repeat anything above.
Here she is in all it’s glory on my Lack-Rack (heh).