Choiseul
Posts: 1
Joined: Thu Apr 06, 2017 2:18 pm

Pi 3 + Plex Server + WD Myclous NAS

Thu Apr 06, 2017 3:27 pm

Hello

I currently watch movies stored on a WD Mycloud HDD via Plex (hosted on a laptop) on my Playstation 4.

To save having to boot up my laptop every time I want to watch a Movie I heard that the Raspberry Pi 3 would be a great solution.

I have managed to get Plex Server running on my Pi (via this tutorial https://pimylifeup.com/raspberry-pi-plex-server/). I can detect the pi-plex server running on my client (PS4 and Android Phone).

I am now struggling to point my Pi/Plex at my WD MyCloud.

I've tried a few tutorials for mounting NAS devices without any luck.

Can anyone recommend a course of action to get my Pi/Plex Server to point at my media files on my WD Mycloud?

Thank you in advance!

salexson
Posts: 4
Joined: Thu Apr 13, 2017 5:44 pm

Re: Pi 3 + Plex Server + WD Myclous NAS

Thu Apr 13, 2017 6:00 pm

I haven't don't this with a WD storage device, but I have done it with many others. It should follow the same basic NFS export/mounting procedures.

1. Assuming you have a shared folder of some sort on the WD storage for your media, you need to enable NFS for that share (sometimes simply labeled as Linux/UNIX access). The easiest (and least secure) would be to allow all users/hosts to access the share via NFS. The WD storage may have controls for limiting access to a single host or user authentication (using samba). It is up to you how secure you want/need to be.

2. On the Pi, you simply need to add an entry in the /etc/fstab for mounting the share using NFS. The basic format of this is:

Code: Select all

<wd_storage_hostname/IP>:<share_volume_name>     <local_mount_point>     nfs     ro,soft,vers=3    0 0
For example, assuming your WD storage hostname is "WDCloud", your shared folder on the storage is "/disk/Media", and local path on your Pi that you want the media mounted is "/srv/Media", you would add the following entry:

Code: Select all

WDCloud:/disk/Media     /srv/Media     nfs     ro,soft,vers=3    0 0
You need to be sure the local mount point exists, so with the example above,

Code: Select all

mkdir -p /srv/Media
This will create the target directory (-p creates any required parent directories). Finally, you need to actually mount the filesystem. Easiest way to do this is run

Code: Select all

mount -a
This will mount ALL filesystems (won't harm filesystems that are already mounted). If you want to mount this one filesystem specifically,

Code: Select all

mount /srv/Media
Either way, it will be mounted read-only (the "ro" option). This should be fine if you only plan to have Plex read the media library on it. If you do need it to be read-write, change the "ro" option to "rw" (or omit it completely). Keep in mind, the share on the WD storage needs to allow read-write access as well.

This assumes the share is not protected by a username and password. If you want/need to protect the share with a username/password, the basic mounting principle is the same. You would need to simply export the share for Windows, and mount it as a CIFS filesystem. The best way to store the credentials would be to create a file on the Pi filesystem somewhere (maybe in /etc or /var/nfs) with the credentials in it, readable only by root, then specify the file as an argument to the CIFS options.

Code: Select all

//WDCloud/disk/Media     /srv/Media     cifs     ro,soft,credentials=/var/nfs/media.creds    0 0
IMO, CIFS offers lower performance than NFS when accessing the storage device. However, it does offer the security of username/password.

Once it is mounted, you can add "/srv/Media" (using the example above) as a library to Plex.

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Pi 3 + Plex Server + WD Myclous NAS

Sun Apr 16, 2017 3:57 pm

Been at this all morning. For the life of me, I can't get this to work. It's so frustrating.
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Pi 3 + Plex Server + WD Myclous NAS

Sun Apr 16, 2017 4:02 pm

There's this guy too, but he moves too fast and I can't read the code. Then, some of the code didn't work on my RPi3
https://www.youtube.com/watch?v=OknPA1eJMeg&t=306s
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

S0litaire
Posts: 215
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ

Re: Pi 3 + Plex Server + WD Myclous NAS

Sun Apr 16, 2017 5:44 pm

What errors are you getting?
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Pi 3 + Plex Server + WD Myclous NAS

Mon Apr 17, 2017 6:04 pm

S0litaire wrote:What errors are you getting?
I only managed to get to creating a new directory. The terminal didn't allow me to add a line in the /etc/fstab file.
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

salexson
Posts: 4
Joined: Thu Apr 13, 2017 5:44 pm

Re: Pi 3 + Plex Server + WD Myclous NAS

Mon Apr 17, 2017 7:12 pm

JayinHouston wrote:
S0litaire wrote:What errors are you getting?
I only managed to get to creating a new directory. The terminal didn't allow me to add a line in the /etc/fstab file.
What error did you get when trying to add the entry to /etc/fstab. Assuming you are using the default user, pi, you would have to use sudo to launch your editor, for example,

Code: Select all

sudo vi /etc/fstab
vi is just an example editor. You can always use your editor of choice (emacs, nano, etc...)
You can also redirect echo to add the line:
sudo echo "</etc/fstab line>" >> /etc/fstab
Be sure to use the '>>' (double) not a '>' (single) so you append the line to the file and not replace the entire file with the single line.

Same sudo requirement for the mount command,

Code: Select all

sudo mount /srv/Media
If you are doing this all as 'root', you won't need sudo.

If you post exactly what errors/events occurred when you tried to add the entry, I can help with more detail.
Last edited by salexson on Mon Apr 17, 2017 9:20 pm, edited 1 time in total.

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Pi 3 + Plex Server + WD Myclous NAS

Mon Apr 17, 2017 7:47 pm

Using nano, I was able to get it to work! the vi didn't allow me to return to a new line. Now, I have another question, How do I delete directories I've created? I know mkdir allows you to create a directory. How do I delete one?
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

salexson
Posts: 4
Joined: Thu Apr 13, 2017 5:44 pm

Re: Pi 3 + Plex Server + WD Myclous NAS

Mon Apr 17, 2017 9:19 pm

rmdir <dirname>

the directory has to be empty of all files and subdirectories

Leaskovski
Posts: 11
Joined: Tue May 12, 2015 9:29 am

Re: Pi 3 + Plex Server + WD Myclous NAS

Sun Apr 23, 2017 9:06 pm

Ok, so I followed that guide, and Plex is all working fine, plus I have added my photo library on my mounted external HDD.

Why is plex caching loads of files to /Library/Application Support/Plex Media Server/Media? It has managed to fill the SD card with 1GB of data. When you add a photo location, does it not load them from there? Surely it doesn't cache them as well? Or is this just thumbnails?

Is there a way to relocate this folder?

eneon
Posts: 1
Joined: Tue Feb 13, 2018 3:08 am

Re: Pi 3 + Plex Server + WD Myclous NAS

Tue Feb 13, 2018 3:13 am

Hi guys I followed your steps. However on mount I am getting an error.

Code: Select all

mount.nfs:  access denied by server while mounting <IP>:/<folder location>/

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 5 guests