1 Kodi PI, 1 Server PI. Can it be done?

Soldato
Joined
18 Apr 2003
Posts
2,684
Location
England
To replace a 10yr old gas guzzling tower thats on all the time I got 2 x PI 2b.

One PI (A) for sharing backed up media from an ext USB2 drive etc. running Ubuntu Mate (effectively making this a NAS).
One PI (B) running Kodi.
Both by LAN into a hub5. I tried using the USB port on the router which is fast enough to play 1080p from but the write speed to the USB drive is only 1.2mb/sec.

As my Linux abilities are pretty poor my stumbling blocks are:
1) Getting PI (A) ext USB drive to power down when not used for 15 mins.
2) Sharing media from PI (A) ext USB drive on network for PI (B) Kodi & hopefully a Windows laptop/Android phone.

Or does anyone have a better idea on how to set this up? thanks guys
 
Hdparm can be used to set a standby timeout on your drive and you probably want to use samba for sharing the drive over the network, Google should have more than enough guides for both but if you get stuck on anything feel free to ask more specific stuff on here?
 
Samba is horribly inefficient and the pi will struggle with it, you'll be much better off using NFS.
 
I'd save yourself the heartache, buy a Synology, use NFS shares, then set up a MySQL db on the Synology.

It's laughably easy, once it's set up, it will take you ~15 seconds to add more RPi OpenElec clients to your system.


Synology are very low power consumption.
 
The Synology looks awesome, drool.
Still persevering with the PI, so far ive easily managed to get NFS shared on the network for Kodi but I need Windows access to the Pi drive too. Although my Win8pro dont support NFS, only the Enterprise version has NFS. To this end I'm running an older Windows in Virtualbox to try & get NFS working... this is getting complicated now.
 
If you're using Kodi on Windows, Kodi can connect to the NFS shares. You don't need to touch any Windows settings.

The reason I'd use something other than a Pi as the server is because of the limited read/write speeds. Limited to 12.5 MB/s (absolute max), by the network card.
 
I'm still using kodi on a Windows PC until I'm happy with Kodi running on another Pi as I'd need get a HDMI to digital audio for the Pi.

Yes, the limited bandwidth from the Pi is frustrating esp as ive just hooked up a hub5 & seen gigalan speeds for the first time. Maybe the next Pi will have gigalan.

Fine tuning the NFS share atm as when rebooting the Pi it either mounts the drives under a different drive name so they dont pop up in the export or dont mount them for sharing.
 
If anyone else wants know how setup a NFS share on Ubuntu Mate for Pi here is what I got to work, which may also work on another Ubuntu. (going from memory, hope its right)

sudo apt-get install nfs-kernel-server

sudo nano /etc/default/nfs-kernel-server
*Verify that
NEED_SVCGSSD=no

sudo nano /etc/default/nfs-common
*To the bottom of the file, add
NEED_IDMAPD=yes

sudo /etc/init.d/nfs-kernel-server restart

sudo nano /etc/exports
*To the bottom of the file, add your shares
/media/username/movies *(rw,all_squash,insecure)
/media/username/music *(rw,all_squash,insecure)

sudo /etc/init.d/nfs-kernel-server restart
 
Back
Top Bottom