The #1 reason that home media servers setups do not work reliably and how to fix it: Adding high sustained throughput Non Local Storage,

Introduction

This post covers the most common cause of home AV setups using single-board computers (SBCs) failing and it's not what you'd expect.

In the next and final post we will add automatic subscriptions and downloads.

Overview

In this post, we will take the transmission server we setup and link it permanently to a location on a NAS drive (Even the cheapest single drive NAS will be fine)

I know a lot of people want a USB solution or a flash drive that works locally for recording. I've tried this and especially on the small low power computers they simply cannot keep up with the sustain I/O needed for concurrent recording/playback/download.

Why are you saying the Single Board Computers (SBCs) are not up to the Job?

Well, they are and they are not. SBCs are fine for Video Playback, Recording and Download but not for STORAGE / RETRIEVAL of large video files. Recording or Downloading even one HD stream locally so say a USB attached HD, SSD or SD card will slow the SBC down to a crawl. Sure they have hardware for playback of a single HD stream but that's it. Wring data on the SBC kills server performance as the virtual memory (SWAP file I/O) is swamped by the video write/read to LOCAL storage. It does not matter if you use an SSD or superfast MicroSD the problem is not at the storage device level it is the throughput of the SBC I/O controllers:

1) USB controllers on these small SBC are low bandwidth (slow)
2) Network controllers on these small SBC

Low Power SBC like the Rasberry Pi Model B is fine for SD recording and viewing and even some HD viewing. The Orange Pi units have issues with live HD streams (both SAT and Terrestrial) due to poor software support. For HD and general use, the Rasberry Pi 2 and 3 are unbeatable due largely to their software support.

So the secret to a happy setup is a dedicated NAS server, EVEN a basic single drive unit with a gigabit ethernet port that is around the same price as an external USB drive. The Seagate Storage Central units are fine for home use. Avoid internet sharing as the security on these units is not ready for the internet! Forget 10/100 switches just get a gigabit switch as you will have multiple concurrent HD streams which will not work on 10/100 ethernet. Again low speed is fine for playback (e.g. Wifi)

Once your NAS unit is plugged and setup we need to let our SBC know where to find the NAS.

Let's look at a dedicated SBC running transmission. A good setup up is to write the downloaded content to NAS using Samba.

Most distros now come with Samba build in e.g. https://libreelec.wiki/how_to/mount_network_share

First, let's add Samba support to Armbian

sudo apt-get install cifs-utilsftware
Say yes to confirm and you should be done installing Samba on the server.

Now we need to link the Linux server to the Samba share of the NAS. Let assume we have a folder called Recordings on the NAS for recording shows from TV / SAT and perhaps downloaded content.

We will call the user VCR on the NAS with a password of Betamax in this example.

Let's create a place for the files on the Linux file system. Although its called windowsshare the NAS will likely be a Linux server too ;) the mount command will run the changes (this normally happens at boot but we just edited the FSTAB file and we want to see the changes without a restart.

sudo mkdir /media/windowsshare
sudo mount -a
This will (re)mount all entries listed in /etc/fstab.For more secure options about this look at https://linuxnewbieguide.org/how-to-mount-windows-or-samba-shares-permanently/

If you look in /media/windowsshare you will see the files stored on the NAS or an empty directory if the VCR directory is empty.

It's worth noting that Microsoft has messed about with share names and the way Windows clients resolve server names. I'd recommend giving the NAS server and the Linux server static IP or bind their MAC address to a specific IP on your DHCP server (e.g. your router). This will eliminate any problems related to name resolution which is slow and error-prone at best. E.g. server names will be like this \\192.168.0.32

Ok now in the Web client click the spanner and in the dialogue for where to save file change it from /var/lib/transmission-daemon/downloads to our new location /media/windowsshare

If you want to add content for download remotely Remote Torrent Adder is a nice add-in for Chrome. I have several servers capable of download set up in Remote Torrent Adder the first server is the default. If you want to monitor transfers on your phone there are apps that allow this and provide notification/status updates.

The next post will show how to set up subscriptions and link these to the server automatically so when new content appears it gets downloaded automatically to the share we defined on the NAS.